Introduction:
An entity is a piece of information the chatbot needs to answer the question. If you look at an intent as an action sentence, entities give you specific information about that action
What exactly is an entity?
Hi! I want to order one large pizza with mushrooms, pineapple and onions.
In this example, the action is 'to order a pizza', it's the goal you want to achieve. 'Mushrooms', 'pineapple' and 'onions' tell you more about the subject of the action, pizza. They all belong to the same category: they're all toppings.
In chatbot terms:
- 'to order a pizza' is the intent
- 'pizza topping' is an entity
- 'mushrooms', 'pineapple' and 'onions' are values of the entity 'pizza topping'
Likewise 'large' is a value of the entity 'pizza size'. Just as 'one' is a value of the entity 'number of pizzas'.
Entity name | Description | Value |
pizza.number | Number of pizza's | Number |
pizza.size | Size of the pizza | Small, medium, large |
pizza.topping | Toppings | Mushroom, Pineapple, Onions, Pepper, Salami, Ham |
One way to keep your entities organised, is to name the <noun>.<attribute>, where <noun> is the main subject of your intent (pizza), and <attribute> is the specific information about the main subject (topping, size, number).
What are entities good for?
Chatbots can extract entities from utterances and save them for later use. This is great for:
- Personalisation. For example, you can ask a customer for their name, and use it throughout the rest of the conversation.
- Triage. You can let your bot ask for specific information that can be sent to your live agents, so that they can start their customer conversation with more context and details.
How to create entities
There are two ways of creating entities:
- in Understanding
- and directly from within an utterance in a user turn.