Making Sure your Chatbot Can Get the Conversation Back on Track
A good dialog system is able to get the conversation back on track if the user makes an ambiguous request. In this walkthorugh we will 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 will 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 will 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 at this page.
Before our changes we would have a conversation like this:
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 more like this:
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.
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?
Bot: Ok, what coffee would you like?
To achieve this, we will enhance the Partial understanding: coffee flow by following these steps:
- Add an additional ouput 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 are finished, our flow will look like this:
Add a new output
Let’s first expand the current prompt to offer the user several possibilities.
- Open the flow Partial understanding: coffee in edit mode.
- Select the output Respond to single synonym: coffee and add a new output node.
- Select the new transition and make sure it is set to Unconditional and Continues without input.
- Give the output node the response
Did you want to order a coffee or see our selection of coffees?and rename it to
Ask user what was meant.
Complete flow structure
- 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. Note: don’t worry about the error message you see – it’s just a reminder to link the node to an actual flow. We will do this in later steps.
- With the output ‘Ask user what was meant’ still selected, add a second flow node.
- Make sure the output ‘Ask user what was meant’ is set to Not revisitable.
- Note: By setting to not revisitable it means: if the user decides not to follow up on any of the possibilities we offered, we assume that the user did not want to continue in those directions, or has rephrased their question in such a way as to go on to trigger the correct flow. Also, as this is a low ranking ‘catchall flow’ it is better to let it drop, rather than forcing the user to respond.
- Check the two new transitions and make sure they are set to Conditional and Gets input before continuing.
Complete the flow links and logic
- Select the first new transition, name it
Orderand make it getting input before continuing and conditional. Paste the condition
- Select the second new transition, call it
Selection, make it get input before continuing and add the condition
- Select the flow node following the ‘Order’ transition and name it
Go to order flow.
- Add the User wants to order a coffee flow from the Flow Link panel via the Browse button.
- Select the flow node following the ‘Selection’ transition and name it
Go to selection flow.
- Add the User asks about coffees we offer flow via the Flow Link panel via the Browse button.
- Save and test in tryout.