This tutorial shows the Multi-value property of Entities.
This tutorial requires that the general tutorial Bot is running
npm run tutorial-general
Multi-value Entities accumulate values in a list, rather than storing a single value. These Entities are useful when users can specify more than one value. Toppings on a pizza for example.
Entities marked as Multi-value will have each recognized instance of the Entity appended to a list in the Bot's memory. Subsequent recognition appends to the Entity's value, rather than overwriting.
Start on the home page in the Web UI.
- Select New Model.
- Enter MultiValueEntities for Name.
- Select Create.
- Select Entities in the left panel, then New Entity.
- Select Custom Trained for Entity Type.
- Enter toppings for Entity Name.
- Check Multi-valued to enable the Entity accumulate one or more values.
- Check Negatable.
- Select Create.
- Select Actions in the left panel, then New Action.
- Enter Here are your toppings: $toppings for Bot's Response.... The leading dollar sign indicates an Entity reference.
- Select Create.
- Select Actions in the left panel, then New Action.
- Enter What toppings would you like? for Bot's Response....
- Enter toppings for Disqualifying Entitles.
- Select Create.
Now you have two actions.
- Select Train Dialogs in the left panel, then New Train Dialog.
- Enter hi for the user's utterance in the left chat panel.
- Select Score Actions.
- Select What toppings would you like? from the Actions list. The percentile is 100% as the only valid Action based on the constraints.
- Enter cheese and mushrooms for the user's utterance in the left chat panel.
- Highlight cheese then select +toppings.
- Highlight mushrooms then select +toppings.
- Select Score Actions.
- Select Here are your toppings: $toppings from the Actions list.
- Enter add pepper for the user's next utterance in the left chat panel.
- Highlight pepper then select +toppings.
- Select Score Actions.
- Select Here are your toppings: $toppings from the Actions list.
- Enter remove cheese for the user's third utterance in the left chat panel.
- Highlight cheese then select -toppings.
- Select Score Actions.
- Select Here are your toppings: $toppings from the Actions list.
[!div class="nextstepaction"] Pre-Trained entities