This is documentation for Rasa & Rasa Pro Documentation v2.x, which is no longer actively maintained.
For up-to-date documentation, see the latest version (3.x).
Default actions are actions that are built into the dialogue manager by default. Most of these are automatically predicted based on certain conversation situations. You may want to customize these to personalize your assistant.
Each of these actions have a default behavior, described in the sections below.
In order to overwrite this default behavior, write a custom action
name() method returns the same name as the default action:
Add this action to the actions section of your domain file so your assistant knows to use the custom definition instead of the default one:
After adding this action to your domain file, re-train your model with
rasa train --force. Otherwise Rasa won't know you've changed anything
and may skip re-training your dialogue model.
This action is predicted to signal that the assistant should do nothing and wait for the next user input.
This action resets the whole conversation history, including any slots that were set during it.
It can be triggered by the user in a conversation by sending a
"/restart" message, if the RulePolicy is included in the model configuration.
If you define an
utter_restart response in your domain, this will be sent to the user as well.
This action starts a new conversation session, and is executed in the following situations:
- at the beginning of each new conversation
- after a user was inactive for a period defined by the
session_expiration_timeparameter in the domain's session configuration
- when a user sends a "/session_start" message during a conversation
The action will reset the conversation tracker, but by default will not clear any slots that were set.
The default behavior of the session start action is to take all existing slots and to
carry them over into the next session. Let's say you do not want to carry over all
slots, but only a user's name and their phone number. To do that, you'd override the
action_session_start with a custom action that might look like this:
If you want to access the metadata which was sent with the user message which triggered
the session start, you can access the special slot
New in 2.3
session_started_metadata was added.
This action undoes the last user-bot interaction and sends the
utter_default response if it is defined.
It is triggered by low action prediction confidence, if you have this fallback mechanism enabled.
This action deactivates the active loop and resets the requested slot. This is used when handling unhappy paths in forms.
If you wish to reset all slots, we recommend using a custom action
that returns the
AllSlotsReset event after form deactivation.
action_revert_fallback_events action is deprecated since the 2.0 release.
now handles all two-stage fallback behavior
This is a fallback loop that can be used to handle low NLU confidence. Read more about handling low NLU confidence.
This action is used by the
action_two_stage_fallback loop. It asks the user to confirm
the intent of their message. This action can be customized to be more personalized
to your specific use case.
This action is used by the
action_two_stage_fallback loop if the user denies the
action_default_ask_affirmation displays. It asks the user to rephrase
This action undoes the last user-bot interaction. It can be triggered by the user by sending a "/back" message to the assistant if the RulePolicy is configured. |
By default Rasa Open Source uses
FormAction for processing any
form logic. You can override this default action with a custom action by
adding a custom action with the form's name to the domain.
Overriding the default action for forms should only be used during the process of
migrating from Rasa Open Source 1 to 2. In this case you can override the default
action to instruct Rasa Open Source to use the deprecated
FormAction which is part of
the Rasa SDK.
New in 2.8
action_unlikely_intent was added together with
Rasa Open Source triggers
You can control how often this action is predicted by tuning the
You can customize your assistant's behaviour to configure what should happen once
is triggered. For example, as a follow up you can trigger a hand-off to a human agent with a rule:
Alternatively, you can also override it's behaviour as a
custom action by
action_unlikely_intent to the list of actions in the domain and implementing the custom behaviour:
action_unlikely_intent can be triggered at any conversation step during inference,
all policies which are trained on only story data, for example -
MemoizationPolicy ignore its presence in the tracker when making a prediction. However,
takes its presence into account so that conversation behaviour is customizable.
action_unlikely_intent cannot be included in the training stories. It can only be added to rules.