Handle ambiguous inputs

A good dialog system is able to get the conversation back on track if the user makes an ambiguous request. In this how to we'll look at the flow we built in create a custom order group and expand it to help users find the correct answer to their question. We'll do this using flow links, which allow us to send the user to a flow meant to answer the question. In the Partial understanding: coffee flow we'll first present users with likely options of what the question might have been, and allow users to give a clarifying response. You can read up on flow links here.

Before our changes we would have a conversation like this:

User: coffees
Bot: I'm not sure what you wanted to ask about coffee. Could you please help clarify?

User: your selection
Bot: I'm sorry but I didn't get that.

After our modifications, it will look like this:

User: coffees
Bot: I understand you would like to talk about coffee. Can you be more specific? Did you want to order a coffee or see our selection of coffees?

User: your selection
Bot: We offer a variety of handcrafted coffee drinks - from espressos to macchiatos to flat whites and more.

User: espresso
Bot: You're talking about coffee. Would you please tell me what you wanted exactly? Did you want to order a coffee or see our selection coffees?

User: order
Bot: Ok, what coffee would you like?

To achieve this, we'll enhance the Partial understanding: coffee flow by following these steps:

  • Add an additional output to ask if the user wants to order a coffee or see the selection.
  • Add links to two flows:
    • User wants to order a coffee
    • User asks about coffees we order
  • Make sure we send the user to the correct flow depending on the user's response (order or selection)

When we're finished, our flow will look like this: Handle ambiguous inputs

Add a new output

Let's first expand the current prompt to offer the user several possibilities.

  1. Open the flow Partial understanding: Coffee in edit mode.
  2. Select the output Respond to single synonym: Coffee and add a new output node.
  3. Select the new output, name it Ask user what was meant and the output as response Did you want to order a coffee or see our selection of coffees?.
  4. Select the new transition and make sure it is set to Continues without input and Unconditional located under the 'Trigger' section of the Trigger configuration panel..

Now it's time to add a flow link if the user wants to order a coffee.

  1. With the output 'Ask user what was meant' selected, add a flow node by clicking the Flow button in the Add Node section of the Ribbon.
  2. Name the new flow node User wants to order a coffee.
  3. Add the User asks about coffees we offer flow via the Flow Link panel via the Browse button.
  4. Open the transition configuration panel by selecting the transition with TODO mark and name it Order.
  5. Add Order as an example and generate a match requirement.

Now that we've covered the order flow link. It's time to add one more if the user wants to see the coffee selection.

  1. With the output 'Ask user what was meant' selected, add a flow node by the clicking the Flow button in the Add Node section of the Ribbon.
  2. Name the new flow node User wants to see the selection.
  3. Add the User asks about coffees we offer flow via the Flow Link panel via the Browse button.
  4. Open the transition configuration panel by selecting the transition with TODO mark and name it Selection.
  5. Add Selection as an example and generate a match requirement.
  6. Hit the 'Save' button.

Test in try out

User: coffees
Bot: I understand you would like to talk about coffee. Can you be more specific? Did you want to order a coffee or see our selection of coffees?

User: your selection
Bot: We offer a variety of handcrafted coffee drinks - from espressos to macchiatos to flat whites and more.

User: espresso
Bot: You're talking about coffee. Would you please tell me what you wanted exactly? Did you want to order a coffee or see our selection coffees?

User: order
Bot: Ok, what coffee would you like?

Was this page helpful?