I am designing a bot for a navigation service.
The problem is that users can use the same phrases with different entities. For example, “Find a cafe” and “find a KFC”.
nlu:
- intent: searchPlaces
examples: |
- Find a [food]{"entity":"placeCategory"}
- Find a [Cafe]{"entity":"placeType"}
- Find [KFC]{"entity":"placeName"}
stories:
- story: search/main
steps:
- intent: searchPlaces
- or:
- slot_was_set:
- PlaceName
- slot_was_set:
- PlaceType
- slot_was_set:
- PlaceCategory
- action: utter_search
responses:
utter_search:
- condition:
- type: slot
name: PlaceName
value:
text: "A list of places called {placeName}"
- condition:
- type: slot
name: PlaceType
value:
text: "A list of places with type {placeType}"
- condition:
- type: slot
name: PlaceCategory
value:
text: "A list of places with category {placeCategory}"
- text: "Nothing found"
As a result, the bot chooses a random response, even if it does not contain the correct entity. Sometimes the bot substitutes entities from previous requests, sometimes it simply replaces the value with “None”.
How can I fix it?