Match entities are entities detected only when the user uses a string that matches a pre-defined string.
Create a match entity
There are 2 possibilities for detecting a match entity:
To create a match entity:
- Go to the Entities page and click on Match entities.
- To add new entity, click Add match entity. Here, you can choose between the 2 options:
- Match text: for example, the different values of a @product entity.
- Match pattern: this one uses RegEx expressions to match a particular format, like a customer ID for example. For instance, if you have @customer_ID as a match entity, and have provided the following regex pattern: [a-z]{5}[0-9]{2}. This means that when a users says "My customer ID is terwf33" – which consists of 5 letters and 2 numbers – it is saved as the match entity @customer_ID with the value "terwf33".
3. Make sure to train your NLP.
4. Test your bot. Imagine building an FAQ bot. One of the things it can do for the user, is trace their lost package. For the bot to be able to find this lost package, it needs the package number. To get this number, the conversation would look like this:
The bot now recognises the package number without asking for it.