There is a problem with categorical slots that worries me a lot.
Dialog example:
User: I want a chocolate bar?
Bot: You can buy a chocolate bar in our store using the link: ...
User: I want a white chocolate (the entity "white" is extracted and placed in the slot)
Bot: You can buy a white chocolate bar in our store at the link: ...
User: I want a chocolate bar?
Bot: You can buy a white chocolate bar in our store at the link: ...
First problem: the slot is not updated to the value “None” if the intent goes without specifying the entity.
The second problem: For example, the User sealed himself up and asked “I want a wite chocolate”, then the extracted entity will be “wite” despite the fact that there is no such slot category, how to cope with this? I know that you can use synonyms, but it is impossible to take into account all the typos.
nlu:
- intent: i_want_a_chocolate_bar
examples: |
- I want a chocolate bar
- want a chocolate
- I want a [white](chocolate_type) chocolate
- want a [white](chocolate_type) chocolate
- I want a [milk](chocolate_type) chocolate
- want a [milk](chocolate_type) chocolate
- I want a [dark](chocolate_type) chocolate
- want a [dark](chocolate_type) chocolate
stories:
- story: i_want_a_chocolate_bar
steps:
- intent: i_want_a_chocolate_bar
- slot_was_set:
- chocolate_type: null
- action: utter_i_want_a_chocolate_bar
- story: i_want_a_white_chocolate
steps:
- intent: i_want_a_chocolate_bar
- slot_was_set:
- chocolate_type: white
- action: utter_i_want_a_white_chocolate
- story: i_want_a_milk_chocolate
steps:
- intent: i_want_a_chocolate_bar
- slot_was_set:
- chocolate_type: milk
- action: utter_i_want_a_milk_chocolate
- story: i_want_a_dark_chocolate
steps:
- intent: i_want_a_chocolate_bar
- slot_was_set:
- chocolate_type: dark
- action: utter_i_want_a_dark_chocolate
domain:
intents:
- i_want_a_chocolate_bar
entities:
- chocolate_type
slots:
chocolate_type:
type: categorical
values:
- white
- milk
- dark
responses:
utter_i_want_a_chocolate_bar:
- text: "You can buy a chocolate bar in our store using the link: ..."
utter_i_want_a_white_chocolate:
- text: "You can buy a white chocolate bar in our store at the link: ..."
utter_i_want_a_milk_chocolate:
- text: "You can buy milk chocolate in our store at the link: ..."
utter_i_want_a_dark_chocolate:
- text: "You can buy a dark chocolate bar in our store at the link: ..."
session_config:
session_expiration_time: 60
carry_over_slots_to_new_session: true