Both triggers with conditional match requirements and those with class match requirements can be built automatically from testing examples. The difference between the two is that with conditions, we have the ability to hand-tailor intent trigger using Teneo's condition syntax to either cover a broad use case or a very specific set of words and sentences.
We will now build a new flow for people that are interested in joining the Longberry Baristas' loyalty program, which will have a trigger with a Conditional Match Requirement and allow dialogs like the following:
User: How much does it cost to join the loyalty program?
Bot: You can join the loyalty program for free! Just ask your local barista for a club card and you're in!
The final result will look like this:
Let's start by creating a new flow to cover this intent.
User wants to know if loyalty program is free.
The next step is to populate the trigger to cover the testing examples:
Is the loyalty program free?.
At this point we can either force Teneo to generate a match requirement or manually select one we are interested in. Let us start off by manually adding a Condition Match Requirement and automatically drafting a condition.
Selecting 'Draft Condition' will replace any condition written inside the condition panel from the first place.
Here, we can see that Teneo used the example inputs to find matching language objects and combine them in a language condition. This is human-readable and, if we understand the syntax, it can be fine-tuned to suit our needs. For now, we will just use the condition as is; later, we will see how to further optimize this language condition in order to shorten and increase the coverage of a condition.
To finish the flow, we need to add an answer text to the output.
You can join the loyalty program for free!.
You can join the loyalty program for free! Just ask your local barista for a club card and you're in!into the 'Answers' field on the right.
That's it! We now have a flow that includes a trigger with a conditional match requirement.
Go ahead and test yourself by adding one more example,
Can I join the loyalty program without paying? and draft the condition again following the steps from this page.
Was this page helpful?