Getting Started
Configuring channels
Authoring conversations
Building conversationsConversation flowsDisambiguating user inputAdvanced features
Conversational interactions
Natural language understanding
Server installation

Disambiguating user input

When your virtual assistant receives a user utterance, it calculates, for each intent in your domain, the confidence that the utterance is an instance of that intent. Sooner or later, your virtual assistant will be faced with utterances where none of the calculated confidences are particularly high.

It’s very often best to treat these cases separately, since it may mean that your virtual assistant does not understand, or is unsure. Within the Rasa framework, this is done using policies.

Example usage

- name: rasa_addons.core.policies.BotfrontDisambiguationPolicy
fallback_trigger: 0.30
disambiguation_trigger: '$0 < 2 * $1'
deny_suggestions: 'deny_suggestions'
n_suggestions: 3
- ^chitchat\..*
en: "Sorry, I'm not sure I understood. Did you mean..."
fr: "J'ai mal compris. Voulez-vous dire..."
en: "Lost password"
fr: "Mot de passe perdu"
en: "Login failed"
fr: "Problème de connexion"
en: "Something else"
fr: "Autre chose"


ParameterWhat it doestype
fallback_triggerif confidence of top-ranking intent is below this threshold, fallback is triggered. Fallback is an action that utters the template utter_fallback and returns to the previous conversation state.string
disambiguation_triggere.g.: '$0 < 2 * $1'): if this expression holds, disambiguation is triggered. (If it has already been triggered on the previous turn, fallback is triggered instead.) Here this expression resolves to “the score of the top-ranking intent is below twice the score of the second-ranking intent”. Disambiguation is an action that lets the user to choose from the top-ranking intents using a button prompt.

In addition, an ‘Other’ option is shown with payload defined in deny_suggestions param is shown. It is up to the conversation designer to implement a story to handle the continuation of this interaction.
deny_suggestionsThe intent associated in the payload for the ‘Other’ option.string
excluded_intentsAny intent (exactly) matching one of these regular expressions will not be shown as a suggestion.string
disambiguation_titleLocalized disambiguation message title.object
intent_mappingslocalized representative button title for intents. If no title is defined for a given intent, the intent name is rendered instead. These titles support entity substitution: any entity name enclosed in curly brackets ({entity}) will be filled with entity information from the user utterance.object


The title for the ‘Other’ option is also defined here.

🖊️ Edit this page on Github