Configurations
Default Behavior
Rasa ships a default behavior for every conversation repair case that works out-of-the-box. Each case is handled through a pattern which is a special flow designed specifically to handle the case:pattern_continue_interruptedfor interruptions.pattern_correctionfor corrections.pattern_cancel_flowfor cancellations.pattern_skip_questionfor skipping collect steps.pattern_chitchatfor chitchat.pattern_completedfor completion.pattern_clarificationfor clarification.pattern_internal_errorfor internal errors.pattern_external_agent_processingfor user messages received while a background A2A task is still running.pattern_cannot_handlefor cannot handle.pattern_human_handofffor human handoff.pattern_session_startfor procatively starting a session by the assistant.pattern_validate_slotfor applying real-time validations on slot values which are strictly independent of any business logic.pattern_repeat_bot_messagesfor when the user asks the assistant to repeat an utterance.pattern_customer_satisfactionfor collecting customer satisfaction feedback at the end of a conversation.
pattern_user_silencefor handling user silences in voice assistants.
Conversation repair cases are expected to work out-of-the-box. This means that if the default behaviour is good enough for the assistant’s use case, then the flow corresponding to the pattern handling the repair case is not needed in the assistant’s project directory.
The Contextual Response Rephraser helps the default responses from patterns to
fit in naturally with the context of the conversations.
Modifying default behaviour
It is possible to override the default behaviour of each conversation repair case by creating a flow with the same name as that of the pattern used to handle the corresponding case, likepattern_correction. If the pattern uses a default action which needs to be modified, you can override the implementation of the default action by implementing a new custom action and use that custom action in the flow.
It is possible to add a link step from a pattern to a flow, except for pattern_internal_error, where link steps are not allowed.
Additionally, you can link a pattern to the pattern_human_handoff or the pattern_chitchat.
Make sure the assistant is re-trained after the modification is completed.
Since most of these patterns interrupt another flow, they should be
kept short and simple.
Sample Configuration
Modify Rasa’s response when a flow concludes:flows.yml
domain.yml
Common Modifications
Here are some common modifications to the default behavior.Requiring Confirmation
You can change the default implementation for a correction and require a confirmation from the user before a slot is updated, e.g. this would result in a conversation like this: User: I want to send some money to Joe Bot: How much money do you want to send? User: 50$ Bot: Do you want to send 50$ to Joe? (Yes/No) User: Oh wait!! I meant to say to John, not Joe! Bot: Do you want to update the recipient to John? (Yes/No) User: Yes! Bot: Updated recipient to John Bot: Do you want to send 50$ to John? (Yes/No) User: … A common correction scenario To achieve the above confirmation, create a flow namedpattern_correction which is defined as follows:
flows.yml
domain.yml
Implementing a Human Handoff
Currently, the default behaviour for a human handoff is to inform the user that the assistant cannot help with the request. However, in scenarios where customer service is available, implementing a human handoff becomes relevant. You can implement a human handoff by writing a custom action and overriding the flow namedpattern_human_handoff:
flows.yml
domain.yml
React dependent on the current flow
You can change a pattern’s behaviour depending on the flow that was interrupted. This can be done by using thecontext object in the if condition of a pattern:
flows.yml
inform_user step is only used if the flow that
was interrupted is called transfer_money.
Handling agent and MCP tool failures
New in 3.17When a ReAct/A2A sub agent call or an MCP tool call fails, Rasa triggers
pattern_internal_error with structured failure context in context.info. You can override the default pattern flow and branch on this context—for example to show a tool-specific message, log the failing agent, or route to human handoff.pattern_internal_error shows a generic utter_internal_error_rasa message. When the failure comes from an agent or MCP tool call, the pattern frame’s info dict is populated so you can distinguish failure sources in flow predicates and responses. Other internal errors (for example empty user input or input that exceeds the character limit) continue to use context.error_type instead of context.info.error_source. See the Internal Error context reference for error_type values.
Access these fields in flow conditions as
context.info.<key> (for example context.info.error_source is "mcp_tool") and in responses via Jinja as {{ context.info.tool_name }}.
Override pattern_internal_error and branch on context.info.error_source:
flows.yml
{{ context.info.error_message }} or {{ context.info.agent_name }}.
Handling user messages during background A2A tasks
New in 3.17When an external A2A sub agent runs a task in the background, Rasa triggers
pattern_external_agent_processing for new user messages until the A2A task finishes.pattern_external_agent_processing responds with utter_agent_busy.
Use this pattern to tell users that the assistant is still waiting for the external agent, or to route them to another flow while the background task continues.
For example, override the pattern to show a domain-specific status message:
flows.yml
domain.yml
Free form generation for chitchat
By default, chitchat is turned off, and the assistant responds with the defaultutter_cannot_handle response.
To switch to free-form generated responses, override the default behavior of pattern_chitchat by
creating a flow named pattern_chitchat which is defined as follows:
flows.yml
Fallback to free-form responses for not relevant answers in Enterprise Search
In case theEnterpriseSearchPolicy is used and the
relevancy check is enabled, the assistant will fall back
to pattern_cannot_handle in case no relevant answer could be found in the knowledge base and a predefined
response is triggered.
To update this behaviour, you can override the pattern_cannot_handle flow to link to the pattern_chitchat flow in
order to allow the assistant to answer with a free-form response.
flows.yml
Skipping clarification
By default, clarification will check on the users intention by asking the user to choose from a list of flows. In some cases, it may be desirable to skip clarification and move directly to starting a flow by adding a link step directly to that flow.flows.yml
Preventing multiple Clarifications
By default, clarification will continue to check on the users intentions regardless of the number of times it has asked. This can be avoided by counting the number of clarification requests and linking to the human handoff pattern if this count reaches some threshold.flows.yml
action_increase_clarification_count to be
implemented
and added to the domain.yml along with the clarification_count slot.
Triggering clarification when multiple StartFlow commands are predicted
New in 3.15You can now configure the assistant to trigger a clarification request when multiple
StartFlow commands are predicted by the Command Generator while no flow is currently active.StartFlow commands while no flow is currently active, both flows are started sequentially.
To trigger a clarification request instead, set the CLARIFY_ON_MULTIPLE_START_FLOWS environment variable to True.
Note: This setting only applies when there is no active flow in the conversation.
If a flow is already active, the default behavior continues regardless of this setting.
Configuring the maximum number of clarification options
New in 3.15A configurable limit has been introduced for the number of clarification options presented to the user.
initial_value of the max_clarification_options slot to your desired value in your domain.
domain.yml
Using the rephraser for repeats
By default, the repeat pattern triggers an action which collects all bot utterances since the last user utterance and sends those again. This works well for assistants where LLM generated output should not be sent directly. If your setup allows for LLM generated output, you can improve the experience with the repeat pattern a lot by allowing more specific repeats from a wider context of messages.Overwriting the repeat pattern
First, update your flows to override the repeat pattern definition, and introduce a custom response (in this example it’s calledutter_repeat_pattern_response):
flows.yml
Customise the response
In your domain file, define the new response (utter_repeat_pattern_response in our example), with the rephraser turned on, together with a custom rephrase_prompt. The rephrase_prompt property is required here to implement the repeating logic.
domain.yml
Configuring the Rephraser
The followingendpoints.yml config section makes sure that the rephraser is turned on,
and that it gets to see the raw conversation history for the last 10 steps.
Keep in mind that increasing the size of the conversation history turns here will
increase it for all rephrasings done by the assistant. Have a look at the rephraser’s
documentation to learn more about
this component.
endpoints.yml
Common Voice-specific Pattern Modifications
Handling Call Start and Call Metadata
New in 3.11We have unified the call handling patterns across Voice Channel Connectors,
all voice channels handle call starts, ends and metadata in a similar manner.
/session_start when the call is picked up
along with the call metadata. This intent triggers the Session Start pattern. Here’s
a customized pattern that sends utter_greet when the call connects:
flows.yml
call_idis the unique call identifier from Twilio (CallSidparameter as sent by Twilio Voice)user_phoneis the phone number of the user (Caller)bot_phoneis the phone number of the bot (Called)directionis the call direction. It can be eitherinboundoroutbound
action_session_start is triggered at the beginning of each Rasa session
and it can be used to set certain slots based on this metadata. These slots can be
used in your utterances for a dynamic greeting. Here is an example:
Handling the End of a Call
Call can be ended by the user or by the assistant.- When the call is ended by the user
/session_endmessage is received by the assistant along with aSessionEndedevent to the conversation. - Assistant flows can use the default action
action_hangupto disconnect calls. This action also will add aSessionEndedevent to the conversation.
Using Responses relevant to Voice Channels
It is recommended to use channel specific responses with voice channels. This can be done with channel specific responses:domain.yml
domain.yml
Interruption Handling
Beta FeatureInterruption handling is currently in beta. This feature is available for selected Voice Stream Channels only.
How It Works
Interruptions are identified from partial transcripts sent by the Automatic Speech Recognition (ASR) engine. The assistant monitors these partial transcripts in real-time and can stop its current response when it detects the user is speaking.Supported Channels
Interruption handling is available for the following Voice Stream Channels:- Browser Audio (used by Rasa Voice Inspector)
- Twilio Media Streams
- Jambonz Stream
Configuration
By default, interruption handling is disabled. You can enable and configure it using theinterruptions key in your channel configuration in credentials.yml:
credentials.yml
Configuration Parameters
enabled(boolean, default:false): Enables or disables interruption handling for the channel.min_words(integer, default:3): The minimum number of words required in a partial transcript to trigger an interruption. This helps filter out backchannels (brief responses like “hmm”, “yeah”, “ok”) that shouldn’t interrupt the assistant.
Disabling Interruptions for Specific Responses
You may want to prevent interruptions for certain critical information that users must hear completely. You can disable interruptions for specific responses using theallow_interruptions property in your domain:
domain.yml
allow_interruptions is true for all responses.
Interruptions during streaming custom actions
When a custom action streams its response (for example, token-by-token from an LLM), barge-in follows the same ASR-based detection described above but additionally cancels the in-flight action stream:- Stream cancellation — Rasa signals the action to stop producing chunks:
- With a gRPC action server, Rasa sends an
AckStreamChunksRPC carrying the activeresponse_id. The SDK callscancel_stream()on the matchingCollectingDispatcher, and subsequentstream_chunk()calls are silently dropped. - With direct custom action execution, Rasa sets the same cancellation flag on the in-process dispatcher.
- With a gRPC action server, Rasa sends an
- Audio stops immediately — The voice channel stops TTS streaming and clears buffered audio so the user does not keep hearing the interrupted response.
- Tracker history is preserved — Chunks already delivered before the interruption are saved as
BotUtteredevents tagged withstreamed_chunk: true. They appear in conversation history but are not re-delivered to the output channel. - Dialogue state stays consistent — The action continues until its
run()method returns naturally. Events in the action’s final result (for example,SlotSet) are still applied even when the spoken response was cut short.
dispatcher.is_streaming_cancelled after stream_end() to skip side effects that no longer make sense when the user interrupted. See the SDK dispatcher reference.
Streaming custom actions require a streaming-capable executor (gRPC or direct execution). HTTP action servers do not stream in real time; see Streaming custom actions.
Best Practices
- Start with the default
min_wordsvalue: The default value of 3 words helps prevent false interruptions from backchannels while still being responsive to genuine user input. - Test thoroughly: Different ASR engines may produce partial transcripts with varying speeds and accuracy. Test your configuration with your specific ASR provider.
- Use
allow_interruptions: falsesparingly: Only disable interruptions for truly critical information. Overusing this can make the conversation feel unnatural and frustrating for users. - Consider user experience: Some users may speak more slowly or with pauses. If you
increase
min_wordstoo high, the assistant may feel less responsive.
Reference: Default Pattern Configuration
For reference, here is the complete default configuration for conversation repair:Default Patterns