How to Stop Bot's Default Follow-Up Question After Initial Response? - Rasa CALM - Rasa Community Forum
👋 Introducing the Rasa Playground
How to Stop Bot’s Default Follow-Up Question After Initial Response?
post by dauvannam1804 on Jul 30, 2024
Hi everyone,
I’m following the Building Assistants: Bot Starts Conversation guide on Rasa Pro. My bot responds correctly but then asks “How else can I help you?” right after and i don’t want bot to behave like that.
Here is the flow and the response:
image1108×218 35.7 KB](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/3X/7/3/7358875fbfd5794a054541198af1fa8fb5719ed1.png "image")
Any help would be appreciated.
Thanks!
post by jtrasa on Jul 30, 2024
What you’re seeing is a pattern, specifically pattern_completed. It runs automatically when a flow completes.
One easy way to remove the follow up question is to customize utterance utter_can_do_something_else to say nothing, like this:
# add this to your domain.yml
version: "3.1"
responses:
utter_can_do_something_else:
- text: ""
post by dauvannam1804 on Jul 31, 2024
Thank you for the response but I want to disable the default pattern_completed only for this specific flow, but keep it enabled for other flows. How can I achieve this?
post by l2nguyen on Jul 31, 2024
You can modify your pattern_completed so that it does not happen after certain flows. See example below:
flows:
pattern_completed:
description: a flow has been completed and there is nothing else to be done
steps:
- noop:
next:
- if: context.previous_flow_name == 'start_conversation' or context.previous_flow_name == 'another_flow'
then:
- action: action_cancel_flow
next: END
- else:
- action: utter_can_do_something_else
next: END
post by dauvannam1804 on Jul 31, 2024
I have modified the pattern_completed as shown in the example and retrained the model, but the bot still responds the same way.