Forms
Forms
Note
There is an in-depth tutorial here about how to use Rasa Forms for slot filling.
Configuration File
Form Basics
Using a FormAction, you can describe all of the happy paths with a single story. By “happy path”, we mean that whenever you ask a user for some information, they respond with the information you asked for.
## happy path
* request_restaurant
- restaurant_form
- form{"name": "restaurant_form"}
- form{"name": null}
Custom slot mappings
Validating user input
After extracting a slot value from user input, the form will try to validate the value of the slot.
Handling unhappy paths
Of course your users will not always respond with the information you ask of them. Typically, users will ask questions, make chitchat, change their mind, or otherwise stray from the happy path.
The requested_slot slot
The slot requested_slot is automatically added to the domain as an unfeaturized slot. If you want to make it featurized, you need to add it to your domain file as a categorical slot.
Handling conditional slot logic
Many forms require more logic than just requesting a list of fields.
Debugging
The first thing to try is to run your bot with the debug flag.