Create a custom order group
Users sometimes communicate using incomplete inputs making it harder to interpret what they want. In our system we might expect ambiguous inputs mentioning one of our relevant products, such as coffee or flat white. We would have the same trouble understanding if someone spoke to us this way. Do they want to order? Do they want the calorie count? Something else? On this page, we will create a flow with a syntax trigger to deal with these kinds of inputs. We will also create a custom order group to hold the flow's trigger and others like it. We will order the group just before the class intents because we don't want this specialized situation to be second-guessed by machine learning when we already know that it's ambiguous.
This is the first part of solving the problem of recognizing ambiguity without overtriggering. After working through this how-to, we suggest to have a look at how to Handle Ambiguous Inputs to give a satisfying resolution to the problem.
Before our implementation, we have a conversation which looks something like this:
User: coffee
Bot: I'm sorry but I didn't get that.User: espresso
Bot: I'm not sure I know what you mean?
These kinds of responses do not result in a satisfying user experience. But after we're finished, we'll have responses that add more direction to the conversation:
User: coffee
Bot: I understand you would like to talk about coffee. Can you be more specific?User: what are the coffees you have
Bot: We offer a variety of handcrafted coffee drinks - from espressos to macchiatos to flat whites and more.
In the first part of the exercise, we will create an order group called Project - Less Exact for syntax triggers responding to ambiguous inputs. In the second part, we will create a flow to respond to ambiguous mentions of the word coffee or any of its synonyms.
Create a custom order group
Since you've based this solution on the template solution with the Teneo Dialogue Resources, you'll notice that you already have a set of order groups in your solution. After we're finished defining our custom order group, the ordering will look like this.
Create the order group
First we'll create the order group:
- Open your solution.
- Click Intent Triggers in the Ordering section to open trigger ordering window.
- In the Intent Trigger Ordering window, navigate to the Groups tab.
- In the Groups tab click Add to add a new group (it appears at the bottom of the list of groups).
Adjust the group ordering
Our group was added at the bottom of the ordering, but we want it to be up higher. In these steps, we will move our group to a more optimal location in the ordering.
- Select the new order group (it will have a default name like Order Group 1) and while selected, copy this name
Project - Low
into the name field. - With the order group still selected, click the Up arrow in the Ribbon to move the group to just above the group of TDR - Low.
- Save and close the Intent Trigger Ordering window.
Create a flow for partial understanding
In this section we'll create a flow for partial understanding. It will use a syntax trigger ordered into the Project - Low group which we just created. When finished, our flow should look like this:
Create a new flow and add a Match Requirement for a Language Object
- Create a new flow and call it
Partial understanding: Coffee
. - Name the trigger
User mentioned Coffee
and add the following positive intent examples:
example-inputs
1cappuccino
2coffee
3espresso
4
- Add a 'Language Object' Match with the following condition:
COFFEE.NN.SYN
. - In the Triggering section, select the Order Group we created in the steps above: Project - Low. This will change its ordering.
Populate the Output node and Save
- Select the output node and give it a name like
Respond to single synonym: Coffee
. - Paste the response
I understand you would like to talk about coffee. Can you be more specific?
. - Add a few more output variations to make your bot look smarter:
I'm not sure what you wanted to ask about coffee. Could you please help clarify?
You're talking about coffee. Would you please tell me what you wanted exactly?
- Hit the 'Save' button.
Try it out!
That's it! Now go ahead and give it a try in Tryout!
User: coffee
Bot: I understand you would like to talk about coffee. Can you be more specific?