How to ignore intent when filling a form

I want to ignore certain intents when filling a form. I looked at the documentation but using ignored_intents key will only ignore the filling of a slot but not the intent altogether. So actions defined with that intent are still carried out. How to completely ignore intents when a form is active?

Hi @Bert

There is no configuration that would allow you to ignore all intents in a form that are not relevant in that form. That is because maybe the user wants to get out of the form (e.g. intent stop) and then you need to deal with that either through directly stopping the form or through asking whether they are sure that they want to stop. You do so by training unhappy path for your form like here Forms There is no way around training for those cases.

So my advice: Identify the intents that may occur during your slot and train rules and stories that handle this. You could even train a story with:

- story: User interrupts the form 
  - intent: request_restaurant
  - action: restaurant_form
  - active_loop: restaurant_form
   - intent: has_question
   - intent: want_to_do_x
   - intent: want_to_do_y
  - action: utter_handle_this
  - intent: stop
  - action: action_deactivate_loop
  - active_loop: null

In which utter_handle_this would be something like: “Sorry I first need to finish that form before I handle that request. Ask me again, if I have collected all data.”

Or: If the intent would be handled with one action then you can train a rule for every case and handle that intent in between with one action…

Hope that helps