Hi everyone!
I’m struggling with this situation, and don’t know if I am setting up the entities correctly. In my example, the user asks for a list and can provide little details (i.e. asking for a more general list) or provide more details (i.e. asking for a more refined list):
# domain.yml
entities:
- facility_type
and
# nlu.yml
intent: list_facilities
- list of [hotels](facility_type)
- list of [luxury hotels](facility_type)
When the user inputs “I want a list of luxury hotels”, then I get two entities extracted: luxury hotels
and hotels
.
And tracker.get_slot("facility_type")
in the custom action returns only hotels
, even though both entities were identified.
Three questions:
-
Keeping only the
facility_type
entity, there any way to favor the more specific entity over the more generic one? -
Or should I define the entities differently, so that [luxury] is something as a modifier of the facility type?
-
And moving to a more complex scenario… what if the user wants to further refine the list, such as: “Provide a list of luxury hotels with pool in New York”. Would that call for several modifiers, and what are the recommendations to set up the entities to enable these wider cases?
As I’m starting with Rasa, hope I can get input from more experienced users on what would be the “best practice”.
Thanks!