In order for your bot to understand what the user said, some words of the user's utterance are more important than others. Typical examples for such important words include so-called named entities like cities or product names. One way of catching those is to use entities.
Each entity covers a collection of one or more words called 'entries', which all have some characteristic in common. For example, they all denote cities in the Netherlands:
In order to enhance natural understanding, the entries can have variables carrying additional information about each entry. For example, different names may denote the same city, like "Den Haag" and "The Hague". With variables it is possible to map these different variants to the same city name. Another example is the code of the nearest airport, which is useful to have in flight booking scenarios.
In the entity examples above, all entries are strings. Note that entries may also consist of other entities or language objects.
In order to use the entity covering the cities of the Netherlands in your flow, simply add %CITIES_NETHERLANDS.ENTITY
to your language condition.
The variables city and airportCode can be accessed using attached scripts.
Teneo comes with a collection of prebuilt entities that are ready to be used. Some of them have been machine learned, for example geographical entities like cities or adresses, others have been hand-crafted, for example a list of colors. A full list of available entities can be found here.
Besides the pre-built entities, you may also create your own ones. See Create custom entities for guidance. For an example of how to use them in a flow, see Build a slot filling flow.
Was this page helpful?