Entities

Each intent parameter has a type, called the entity type, which dictates exactly how data from an end-user expression is extracted.

Dialogflow provides predefined system entities that can match many common types of data. For example, there are system entities for matching dates, times, colors, email addresses, and so on. You can also create your own developer entities for matching custom data. For example, you could define a vegetable entity that can match the types of vegetables available for purchase with a grocery store agent.

Entity terminology

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 the EntityType type.

  • 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:

    • carrot
    • 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 the Entity type (EntityType.Entity or EntityType_Entity for some client library languages).

  • Entity reference value and synonyms: Some entity entries have multiple words or phrases that are considered equivalent, like the scallion example above. For these entity entries, you provide one reference value and one or more synonyms.

Hai trovato utile questa pagina? Facci sapere cosa ne pensi:

Invia feedback per...

Dialogflow Documentation
Hai bisogno di assistenza? Visita la nostra pagina di assistenza.