Entities are Dialogflow's mechanism for identifying and extracting useful data from natural language inputs.
While intents allow your agent to understand the motivation behind a particular user input, entities are used to pick out specific pieces of information that your users mention — anything from street addresses to product names or amounts with units. Any important data you want to get from a user's request will have a corresponding entity.
The term entity is used in this documentation and in the Dialogflow console to describe the general concept of entities. When discussing entity details, it's important to understand more specific terms:
Entity type: Defines the type of information you want to extract from user input. For example, vegetable could be the name of an entity type. Clicking Create Entity from the Dialogflow console creates an entity type. When using the API, the term entity type refers to an
Entity entry: For each entity type, there are many entity entries. Each entity entry provides a set of words or phrases that are considered equivalent. For example, if vegetable is an entity type, you could define these three entity entries:
- scallion, green onion
- bell pepper, sweet pepper
When editing an entity type from the Dialogflow console, each row of the display is an entity entry. When using the API, the term entity entry refers to an
EntityEntrywould be a better name than
Entityfor this object, but we need to maintain backwards compatibility when improving the API.
Dialogflow is equipped with numerous system entities, which allow agents to extract information about a wide range of concepts without any additional configuration. For example, system entities are available for extracting dates, times, and locations from natural language inputs.
If you need to extract information about concepts beyond those covered by Dialogflow's system entities, you can define your own developer entities. For example, a brand might create an entity type to recognize its unique set of product names.
It is also possible to define entity types that apply only to a specific conversation. For example, you might create an entity type to represent the time-sensitive options available to a particular user when making a booking. These are called session entities.
The documents in this section describe the various categories of entities and how you can use them.