Working with intents

Introduction:

In this article, we explain how to create an intent and then how to work with it.

 


Create a new intent:

Let's create an intent for ordering a pizza.

  1. Go to Build > Understanding and open the Intents tab.
  2. In the field Create new intent enter the name of your intent (order_pizza), and click (+) to create it.
  3. In the field Add new utterance, add an utterance for you intent. In our pizza example, this could be phrases like 'I would like a pizza please', 'I want to buy a pizza with mushrooms and pineapple', 'Order pizza', 'pizza please'.
  4. Click Save examples to save your utterances.
  5. Click Train

image3.png


Mark utterances with entity values:

Next, look for entities in your utterances, and mark them with entity values. 

image1.png

To mark utterances with entity values:

  1. Double click on the word you want to mark. The marked word is displayed in the Value field.
  2. From the Entity field, select the entity that you want to associate the value to. In our case, this is pizza.topping.
  3. Click Save examples to save your utterances.
  4. Click Train

Create an entity from within an utterance:

image4.png

When you're marking your utterances and find that you don't have an appropriate entity yet, you can create one from within an utterance (so that you don't have to switch from intents to entities):

  1. In the utterance, mark the entity value for your new entity. In our case, we want to create a new entity 'pizza.size', so we mark 'medium'.
  2. In the Entity field, enter the name of your new entity.
  3. Click Save examples to save your utterances.
  4. Click Train