Handle Small talk in the middle of a flow

Hi, is it possible to handle small talk in the middle of a story without a form?

bot: Do you want coffee?(quick replies: yes, no) user: yes(or type “yes please”) bot: (replied with front end form to be filled by user) user: how are you today? (or other small talk intents)

Expected response:

  • responded based on the small talk intent Reality(for me):
  • submit the form without any data(keep going into the flow)

Keep wandering if this is possible just like dialogflow that can handle intent switching everytime. The NLU keep predicting the correct intent, but RASA Core does not do the same.


same like this thread

There’s a new policy for exactly this: MappingPolicy.

You can map certain intents to certain utters, e.g.

* how_are_you
- utter_Im_fine

You can map these two together by activating MappingPolicy in you policy ensemble and placing a trigger in your domain file.

That should look like this:

- how_are_you: {triggers:utter_im_fine}

This makes it so the bot answers that intent in any flow, and then returns to the flow uninterrupted.

check it out on the rasa docs.


Thank you so much, will look further into this.

Hi Remy, i tried this solution and it’s awesome, but if i type something else other than the story flow, it predicted as the intent in the flow, and the story keep continuing, is it any way around to stop the story and create a fresh start?

This looks like an NLU issue. It predicts the wrong intent it seems.

You can test your stories using the --debug flag.

creating a fresh start is done by using /restart. You can embed that in a button for instance, or have your bot explain that to a user. TwoStageFallbackPolicy has this in-built in its workings.

Okay, clear, thanks for your answer and solution Remy, appreciate it :smiley:

No problem, Yanuar.

good luck!