About Natural Language Understanding (NLU)

Depending on your chatbot, you may be able to use natural language understanding to improve the performance of your bot by:

  • Training it to identify the correct intention from the message.
  • Training it to identify key words (entities) in the message in order to select the next best interaction for the conversation.
  • Reducing the number of times that the default message is sent to users.

Training a bot in this way means that you do not need to manually enter all the possible utterances for an intention.

Example intention

Consider the example of a dining intention. Users might send messages (utterances) similar to these:

where's a good chinese restaurant
i want a burger 
show me pizza places 

These are examples of places to eat. In order to respond correctly to these messages, a bot needs to match the messages sent by users to the dining intention. To improve the accuracy of the matches, Communicate uses entities.

Example entity

To improve the accuracy of the matching process, the bot uses entities to extract specific values from utterances. In the above example, the entity representing places to eat might be restaurant. For each entity, you set up at least one example, such as:

  • restaurant
  • chinese
  • takeaway
  • pizza

For alternative examples, or more specific examples of a general example, you add synonyms. For the takeaway example, synonyms might be: takeout, drive thru. Synonyms are optional.

Entities are separate from intentions and can therefore be used by any intention.

Note: Communicate only matches on one of the entities in an utterance. So for the utterance where's a good chinese restaurant in the center, the bot will match on either the restaurant entity or the location entity (if center is an example of a location).

Accessing the entity value in the utterance

You can access the entity value in an utterance in the same way that you access other variables:

Where used Example
In messages sent to users, enclose the entity in curly brackets. {restaurant}
In an Action interaction, access the data through the context object. context.restaurant

Setting up intentions to use NLU

For details, see: