Teneo comes with a collection of pre-built Entities which you may use in your flows. However, sometimes we need to create custom entities for our bot. This works as well on Teneo as it does for LUIS. This is the case for the different kinds of coffee types that are served at Longberry Baristas. In the following section, we will walk you through the creation of this custom entity on LUIS. You can find more information on how to create the same entity on Teneo here.
Let's create the entity for recognizing the different kinds of coffees that are served at Longberry baristas. In LUIS we have different options for how to create this. For this example, we will create a list entity:
COFFEES_SERVED
.Normalized values | Synonyms |
---|---|
Americano | americano, americanos, americano's, americanos' |
Cappuccino | cappuccino, cappuccinos, cappuccino's, cappuccinos' |
Cortado | cortado, cortados, cortado's, cortados' |
Espresso | espresso, espressos, espresso's, espressos' |
Frappuccino | frappuccino, frappuccinos, frappuccino's, frappuccinos' |
Latte | latte, lattes, latte's, lattes' |
Lungo | lungo, lungos, lungo's, lungos' |
Macchiato | macchiato, macchiatos, macchiato's, macchiatos' |
Ristretto | ristretto, ristrettos, ristretto's, ristrettos' |
Flat white | flat white, flat whites' |
Brewed coffee | brewed coffee, brewed coffees, filtered coffee, filtered coffees |
The end results should look like this.
In Try Out, the entity will get a LUIS prefix indicating it is from LUIS and an .ENTITY suffix:
Before we create our entities, it might be a good idea to create a folder that we can use to store them. This is not required, but as a solution grows, folders help to structure your Teneo assets. To create the folder, proceed as follows:
Language Objects
and hit Enter.Now its time to translate the values stores from our previously created LUIS entity inside a Teneo entity.
LUIS_COFFEES_SERVED
(the type .ENTITY is automatically defined).luisCoffeeType
.Entry | luisCoffeeType |
---|---|
%$LUIS_COFFEES_SERVED.ENTITY | _USED_WORDS |
The end result should look like this:
Now that we have added an entity that stores coffee types. Let us proceed with adding one more entity but this time for the following coffee sizes:
Normalized values | Synonyms |
---|---|
small | small |
medium | medium, regular |
large | large, big, supersize, venti |
We have finally created an entity that stores different coffee types. Now its time to use this entity inside a flow and extract the values.
Was this page helpful?