Listing entities and set slots in stories - best practises

I have a few questions regarding “best practises” for listing the entities or slots set in stories. Since each question itself would have relatively small answers, I wasn’t sure whether to have separate topics for each of them. In any case, let me know I’ll split this.

1.Does listing entities in stories affect conversation flow significantly? or do only slots do that? (Assuming that entities aren’t autofilling slots here).
For example, if I’m building a bot to suggest apartments based on number of bedrooms, budget and location, and I want to use stories for this instead of forms,

story: provide apartment details - number of bedrooms and location
steps:
- intent: ask_for_apartment_suggestions
  entities:
    - bedrooms: 4
    - location: new york
- action: action_ask_for_budget

story: provide apartment details - number of bedrooms and budget
steps:
- intent: ask_for_apartment_suggestions
  entities:
    - bedrooms: 4
    - budget: 500000
- action: action_ask_for_location

are these two stories always going to work conditionally based on which entities are detected, or would I always have to use slots for this kind of behavior?


2. Does mentioning value of set slots or entities make a difference when compared to just listing the entity or slot names?
Is this:

story: provide apartment details - number of bedrooms and location
steps:
- intent: ask_for_apartment_suggestions
  entities:
    - bedrooms: 4
    - location: new york
- action: action_ask_for_budget

the same as this?

story: provide apartment details - number of bedrooms and location
steps:
- intent: ask_for_apartment_suggestions
  entities:
    - bedrooms
    - location
- action: action_ask_for_budget

3. if no entities are listed, does it mean that no entities are expected to be extracted?
Is this:

story: provide apartment details - number of bedrooms and location
steps:
- intent: ask_for_apartment_suggestions
  entities:
    - bedrooms: 4
    - location: new york
- action: action_ask_for_budget

the same as this?

story: provide apartment details - number of bedrooms and location
steps:
- intent: ask_for_apartment_suggestions
- action: action_ask_for_budget

Is the bot likely to prefer one over the other depending on whether entities are extracted or not?


4. Is it a good practise to write slot_was_set for each slot separately or can you group them together?
Are these two equivalent or is there a preferred convention?

story: provide apartment details - number of bedrooms and location
steps:
- intent: ask_for_apartment_suggestions
- slot_was_set:
    - bedrooms: 4
    - location: new york
- action: action_ask_for_budget

and

story: provide apartment details - number of bedrooms and location
steps:
- intent: ask_for_apartment_suggestions
- slot_was_set:
    - bedrooms: 4
- slot_was_set:
    - location: new york
- action: action_ask_for_budget

Thanks in advance.

3 Likes

Just in case this post got buried under the newer ones…

Just in case this post got buried under the newer ones…

Just in case this post got buried under the newer ones…

bump

bump

bump