Entities
Entity types are used to control how data from customer's message is extracted.
ThumbCrowd 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, phone numbers and so on. You can also create your own custom entities for matching custom data. For example, you could define a shirts entity that can match the types of shirts available for purchase with a store agent:
I want to buy a blue shirt
I want to buy a red short
In both cases, the intent is to buy something. The color is a useful information, but we don’t want to have a different intent for each color.
The color is an additional information to extract and that’s a perfect candidate for an entity Entities are elements you want to extract from a user utterance.
Trainable entities
In most cases you must teach your assistant how and where to find entities in your utterances. You can do this by tagging entities in the user utterances you provide as examples.
In the example below, a user wants to buy a shirt and want to specify a color:
Again, to boost the accuracy of your assistant, you want to add several examples of utterances with that entities.
The goal here is to give examples with enough variety so you model can learn to generalize to utterances not in your training data. In other words, you want to add enough data so your assistant starts to understand sentences it has never seen before.
For intents, it is about using a variety of words, and not just repeating the same sentence with a color variation.
For entities, it is about teaching your assistant how to retrieve it in different sentences. From your examples, your model should understand:
The content of your entities: give several colors (not necessarily all possible colors but enough to observe that it starts picking up colors it hasn’t seen before)
The words before and after the entity.
Keep in mind that the entity is not tied to an intent. You might use the same color entity with another intent.
Entity synonyms
Let’s suppose you are building a flight booking chatbot. Users will generally use cities as origin and destination, but the API you’ll be using will need airport codes. Entity synonyms can be used for that. In the example below, we mapped the city of light to CDG and The big apple to JFK in the synonyms.
Adding synonyms in the table is not enough
You still need to teach the entity extractor the various forms an origin or a destination could take by adding more examples to the training data.
Last updated