This tutorial shows how to use Entity Resolvers in Conversation Learner
This tutorial requires that the general tutorial Bot is running
npm run tutorial-general
- Resolver Type is an optional property of Custom Entities.
- Entity Resolvers utilize the power of the pre-trained entity recognizers in LUIS to provide additional detail and clarity for your Custom Entity.
Start on the home page in the Web UI.
- Select New Model.
- Enter Entity Resolvers for Name.
- Select Create.
- Select Entities in the left panel, then New Entity.
- Enter departure for Entity Name.
- Select datetimeV2 for Resolver Type.
- Select Create. Dismiss the informational popup by selecting OK.
- Repeat steps 1-4 to create a second Entity named return with datetimeV2 resolver type.
- Select Actions in the left panel, then New Action.
- Enter You are leaving on $departure and returning on $return for Bot's Response....
- IMPORTANT - When typing in $[entityName] you need to hit enter or click on the entity in the drop down otherwise Conversation Learner will consider this to be text instead of an Entity.
- Notice that the Required Entities field will also get these Entities and they cannot be removed. This prevents this action from becoming available until both required Entities are present.
- Select Create.
- Select New Action to create a second Action.
- Enter When are you planning to travel? for Bot's Response....
- Enter departure and return for Disqualifying Entities. These tell our Bot to NOT take this action if either of these Entities contain a value.
- Select Create.
-
Watch the Training: [Status] in the upper left corner for Completed.
- You can click the "Refresh" link if this takes too long.
- Training status "Completed" is necessary so that our Entity Resolvers work when we train the Model.
-
On the left panel, click "Train Dialogs", then click the "New Train Dialog" button.
-
Type in the first user utterance, "book me a flight".
-
Click the "Score Actions" button.
-
Select the response, "When are you planning to travel?".
-
As the user, respond with, "leaving tomorrow and returning Sunday next week".
- Notice how Conversation Learner has detected two "Pre-Trained date" Entities in that user turn.
-
In the "Entity Detection" panel, select the text "tomorrow" and label it as "departure"
-
Also label the text "Sunday next week" as "return"
-
Click the "Score Actions" button.
- Notice how the "Memory" pane contains your departure and return dates.
- Hover over each one and observe how the Entities are date objects which clearly capture the actual calendar date as opposed to "Sunday" or "tomorrow".
-
Select the "You are leaving on..." Bot response.
-
Click the "Save" button.
[!div class="nextstepaction"] Enum entities