Hi all, I’ve been trying to understand when the best time to use a form is vs just having the entity recognition auto-fill the slot.
I’ve got a hypothetical use case where I want to ask the user for their favorite type of swallow:
African Swallow European Swallow
I can write some stories like this:
- story: swallow question 1 steps: - intent: swallow - action: utter_ask_favorite_swallow - intent: inform entities: - swallow_type: "African" - slot_was_set: - swallow_type: "African" - action: "The African Swallow is my favorite as well!" - story: swallow question 2 steps: - intent: swallow - action: utter_ask_favorite_swallow - intent: inform entities: - swallow_type: "European" - slot_was_set: - swallow_type: "European" - action: "The European Swallow is my favorite as well!"
This seems to work well for me, I’ve sort of enumerated all the possible ways someone could interact with the bot when trying to answer the swallow question. With the Rasa memoization policy the core model can predict with correct action to take with 1.0 confidence. If the user asks about an unrelated intent there are no issues. If the inform intent is classified and the agent has not asked the swallow question, I can have the agent just say I don’t understand.
When or should I use a form here? I’ve had problems with forms in the past where:
- the slot could get set ahead of the form being activated.
- Rasa gets confused if the form is interrupted either by another intent or another form and only listens
- The form gets interrupted and correctly deactivated -because the user is asking other questions but then the form automatically reactivates itself.
When is the correct time to use the form? Do I have to train Rasa for every type of interruption? Does Rasa ignore rules when a form is active?