Hi, I’m using Rasa and I developed for educational purposes a chatbot whose code is here: github link
I’m trying to understand the use of slot_was_set in stories after activating a form which requires a slot with custom mapping.
In my chatbot I have, for example, these slots:
stars:
type: list
influence_conversation: true
mappings:
- type: custom
conditions:
- active_loop: form_review
requested_slot: stars
set_restaurant_list:
type: bool
influence_conversation: true
mappings:
- type: custom
and I manage the activation and submission of the forms in this way:
- story: Input the average review (stars) for restaurants
steps:
- intent: stars
- slot_was_set:
- restaurant_type: "something"
- action: action_reset_review
- slot_was_set:
- stars: null
- slot_was_set:
- set_restaurant_list: null
- action: form_review
- active_loop: form_review
- slot_was_set:
- stars: [4, 5]
- slot_was_set:
- requested_slot: null
- active_loop: null
- action: action_set_restaurant_list
- action: action_give_last_restaurant_list
Using this “logic”, everything works perfectly. If instead I write the stories this other way
- story: Input the average review (stars) for restaurants
steps:
- intent: stars
- slot_was_set:
- restaurant_type: "something"
- action: action_reset_review
- slot_was_set:
- stars: null
- slot_was_set:
- set_restaurant_list: null
- action: form_review
- active_loop: form_review
- slot_was_set:
- requested_slot: null
- active_loop: null
- action: action_set_restaurant_list
- action: action_give_last_restaurant_list
removing the slot_was_set after submitting the form, the chatbot doesn’t work fine: in the middle of the conversation, it doesn’t reply to the user. (fallback prediction)
My question is, then, should I always put slot_was_set in the stories if I submit a form that is not managed by the RulePolicy?