Match intent or fallback

All, I’ve been working on a rasa bot and I’ve hit a roadblock I can’t seem to find any documentation for. Maybe I’m over thinking it. Let’s consider the following scenario:

Bot: What is your reason for chatting today?

If user says anything that matches intent1, intent2, or intent3, do A. If user says anything else, do B

I’m thinking I need to use a form, and fill a slot based on intent1, intent2, or intent3. Then in the story, if the intent isn’t filled, I can assume it’s B.

I would prefer not having to use a custom action for this and could simply handle it in a story itself but I’m not sure if that’s possible.

Hope I made sense.

Hi @atxai!

You can definitely handle this in stories. It would look something like this:

## do_A
* greet
    - utter_greet
* intent1 OR intent2 OR intent3
  - action_do_A

## do_B
* greet
    - utter_greet
* out_of_scope
  - action_do_B

See or statements for more info.

Hope that helps. :slightly_smiling_face:

Hey, thanks for the reply. I knew about OR statements but I wasn’t thinking they would work here. Consider:

## do_A
* greet
 - utter_greet
 - utter_need_help
* intent1 OR intent2 OR intent3
 - utter_self_help
* did_not_help
 - utter_sent_ticket

## do_B
* greet
 - utter_greet
 - utter_need_help
* (any other text besides intent1 OR intent2 OR intent3)
 - utter_sent_ticket

I don’t know how to cover the case of any other text, besides maybe using a form. I don’t think a FallbackPolicy would work when for this I need to do something other than the default fallback action, unless you meant something else by out_of_scope. I can’t really define all of the other possible things they would say.