I generated a story using rasa interactive to handle an unhappy path where the user denies providing the information that a form asks for. I added the generated training data but when i test it out using rasa shell I get the followin error
rasa.core.actions.action - Failed to extract slot user_email with action email_form
Looking at debug and after it correctly classifies the intent (“deny”) it incorrectly predicts the following action as “email_form” even though my story says the action_deactivate form should come after the *deny intent… Maybe I just need more training data around the deny intent…
2020-04-28 12:20:25 DEBUG rasa.core.processor - Received user message 'i dont know' with intent '{'name': 'deny', 'confidence': 0.417738676071167}' and entities '[]'
2020-04-28 12:20:25 DEBUG rasa.core.processor - Logged UserUtterance - tracker now has 10 events.
2020-04-28 12:20:25 DEBUG rasa.core.policies.memoization - Current tracker state [None, {}, {'intent_lookup_mail_server': 1.0, 'prev_action_listen': 1.0}, {'prev_email_form': 1.0, 'intent_lookup_mail_server': 1.0, 'slot_requested_slot_0': 1.0, 'active_form_email_form': 1.0}, {'prev_action_listen': 1.0, 'intent_deny': 1.0, 'slot_requested_slot_0': 1.0, 'active_form_email_form': 1.0}]
2020-04-28 12:20:25 DEBUG rasa.core.policies.memoization - There is a memorised next action 'action_deactivate_form'
2020-04-28 12:20:25 DEBUG rasa.core.policies.form_policy - There is an active form 'email_form'
2020-04-28 12:20:25 DEBUG rasa.core.policies.ensemble - Predicted next action using policy_3_FormPolicy
2020-04-28 12:20:25 DEBUG rasa.core.processor - Predicted next action 'email_form' with confidence 1.00.
2020-04-28 12:20:25 DEBUG rasa.core.actions.action - Calling action endpoint to run action 'email_form'.
A categorical slot should have more than one values, are you using this form to fill only the user_email slot? As I can see in the debug logs, action_deactivate_form is predicted by the memoization policy but it was overruled by the form policy. Did you retrain your model after making the requested_slot categorical?
Yes the form is being used to fill only the user_email slot. I tried to make the slot required for the action without a form but actually you recommended I should use a form haha I tried the other way and it wasnt working.
Yes, I retrain the model every time I change the training data.
I will add more values to requested_slot
I believe that is due to your FormPolicy precedes other policies that you have in your config.yml. As long as you have an active form, it will keep using the FormPolicy for the next action even though your have stories to handle unhappy paths. It first tries to validate and extract value for the requested_slot and then predict the next action. There are some other similiar posts which recommend to handle those errors by using custom slot mapping and skip certain intents within your forms if you do not want to get those errors.