rasa-sdk: Nicely deal with repeated slot validation failures in forms
Description of Problem: When a user is not providing the correct value for a requested slot, the form goes into an infinite loop re-asking for that slot. After N validation failures, the form should provide a better explanation of the requested slot, and then ask the user if they want to continue or not.
Overview of the Solution:
- Add a global parameter defining how many repeated slot validation failures are allowed. Configurable by user.
- Allow user to define an
explain_{slot}method, similar to thevalidate_{slot}method.
Everything else should work out-of-the-box.
Examples (if relevant): A demonstrator implementation using current capabilities was implemented as a custom action in financial-demo for rasa 2.0, currently maintained in the rasa-2-0 branch
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 3
- Comments: 19 (8 by maintainers)
@kaustuk I think we can keep this issue. I added to my team’s project board.
@kaustuk , @wochinge ,
A logic was implemented in the financial-demo, currently available in the
rasa-2-0branch: https://github.com/RasaHQ/financial-demo/tree/rasa-2-0The logic is a customization of the
FormValidationAction, and can be found here: https://github.com/RasaHQ/financial-demo/blob/rasa-2-0/actions/custom_forms.pyI think it would be great to generalize this logic and implement it as a standard feature of the forms in Rasa, and updating the regular FormValidationAction in rasa-sdk.