HomeGuidesAPI ReferenceChangelogsDiscussions
GuidesChangelogsAPI ReferencePublic RoadmapService StatusLog In

Disambiguation

Why you shoud consider disambiguation?

Sometimes the user question can be ambiguous.

Imagine that the user is asking

credit card

does this mean :

  • I lost my credit card?
  • I need a credit card?
  • or Whats the price of a credit card?

This is hard to tell, even for a human.
As humans, what we usually do in this kind of situations is that we ask a deambiguisation question in order to clarify the initial message.

Well, that's exactly what we want our bot to do as well with a new feature that we call disambiguation.

How does disambiguation work ?

From the user perspective, here is an example of what you can get before and after setting up the disambiguation algorithm.

and another example

Technically speaking, the deambiguisation, once activated on your bots get the N best intents and suggest them as options to the user. This way we can get the extra information needed to go ahead.
Below is a simplified diagram showing how it works behind the scenes.
Another use case where disambiguation is activated is when the confidence distance between the best 2 intents is smaller than the delta confidence (more on this below).

How can I activate disambiguation in my bots?

First, open your bot settings and make sure to have set the SNP 1.05 or SNP 1.06 pipeline.
Then, click on "Disambiguation: Intents suggestions system" to activate the disambiguation

From there you will find a few of options allowing you to customize the disambiguation.

A/ Intents suggestions system
This is a setting allowing you to turn on/off the disambiguation.

B/ Number of suggestions
You can decide the maximum number of suggestions the bot can shows to the user. This number can be set within the [2,10] range.

C/ Suggestions message
Before offering the intents suggestions, there is a text message indicating that the user clarification / confirmation is needed

D/ Wrong suggestions message
This message is simply one last button that can be added at the suggestions list, allowing the user to indicate that none of suggested intentions is matching his need. You will then have to handle this button with a dedicated behavior as the message defined in this field will be sent to your bot as a normal message.

E/ Desambiguation threshold
This settings (in %) defines the minimal tolerated distance between two intents before triggering the disambiguation process. Specifically, we are looking here at the distance between the best intent, and the second.

Then, in your intents, pick the ones you want to see during the disambiguation and set a Suggestion label for each of them.
You can do it manually via the following modules:

  • Builder
  • Datasets > Intents
  • Datasets > QnA
2062

from the Builder

2062

from Datasets > Intents

2062

from Datasets > QnA

This also works by exporting and importing your intents or QnA.

Some special cases to consider

  • If an ambiguity is found in a microbot, the suggestions from this microbot will be sent to the user, we are working on a future version where those suggestions will be pulled from all the microbots + the masterbot
  • The disambiguation feature should be activated in the bot settings of the masterbot and the desired microbots. If you do not want the disambiquisation to suggest intents from one of the microbots, the best solution is to not activate the disambiguisation for this microbots.
  • The disambiguation needs algorithm to have intents with suggestion labels to work
    An advantage of this behavior is that you can decide wich intents can be shown or not by simply filling the suggestion label or not.
  • If a message has been define in your node.js code, the disambiguation will give the priority to your custom code.
  • The disambiguation will not work if the bot hasn't find any relevant suggestions for the user request. This usually happens on out of scope questions.