How can a slot be defined as both list and unfeaturized?

I had a slot preferences defined as unfeaturized and the story went like this :

  • add_booking
    • utter_ask_preferences
  • enter_preferences{“preferences” : “”}
    • slot{“preferences” : “”}
    • utter_ask_budget

It worked fine. Then i converted the slot to list type :

slots:
  preferences:
    type: list

and ADDED below story to stories.md

  • add_booking
    • utter_ask_preferences
  • enter_preferences{“preferences” : []}
    • slot{“preferences” : []}
    • utter_ask_budget

Now the bot doesn’t trigger the utter_ask_budget action and goes into fallback.

Why is this happening ? What is the way to define a slot as both list and unfeaturized ?

@erohmensing any thought on this please ? Thanks!

Hey @vivekanon, the issue is with your stories. Adding an event like - slot{"preferences": []} implies that the slot was unset at this point in time, which is not the case (it’s set to nothing from the beginning). So the story should rather look like this:

* add_booking
  - utter_ask_preferences
* enter_preferences
  - utter_ask_budget

The user didn’t provide any info (there were no entities present in enter_preferences) and so the state of the preferences slot did not change. Typically a slot can only be actively unset by a custom action.

If the user did provide preferences, it would look like this:

* add_booking
  - utter_ask_preferences
* enter_preferences{"preferences": "bla"}
  - slot{"preferences": ["bla"]}
  - utter_ask_budget

The format of your unfeaturized story should also be different if no entity is present:

* add_booking
  - utter_ask_preferences
* enter_preferences
  - utter_ask_budget