All articles on Ultimate Guide to Cognigy NLU Training
Even after you've looked at numerous methods for enhancing Intent recognition, there may still be certain example sentences with overlaps and conflicts between the Intents. As a result, in this article, we will learn how to resolve these Intent conflicts using different methods.
Resolving Intent Conflicts
Our Intent model has been quite simple so far. After we have added a few additional Intents, we now have some overlaps and conflicts between the Intents. Adding the “Order Cancel” Intent caused a lot of trouble:
We will now go into the details of different methods to resolve these Intent conflicts in the following sections:
Moving Example Sentences to the better Intent
The first thing we can do is move the “start again” sentence from the “Order Cancel” Intent to the “Restart Intent”. This simple change already cleared up the overlap between these two Intents, but it did not fix everything:
Even after some additional training of the “Order Cancel” Intent, we still have some overlaps:
Let's see how we can solve these overlaps with another method:
Moving Intents into a hierarchy
These overlaps indicate some relation between “Order Food”, “Order Change” and “Order Cancel”, which can be properly represented by an Intent hierarchy.
Canceling an order is making an extreme change to an order, and changing an order is part of ordering the food, which results in the following:
As you can see, we now have resolved all the conflicts here. It is very important to note that Intent hierarchies only work properly when the “Inherit Example Sentences from child Intents” is turned on:
Merging multiple Intents into one
We have added two additional Intents “Order Status” and “Order Tracking”, which has caused quite a bit of mayhem in our Intent model, even the “Restart” Intent has been affected:
Since “Order Status” and “Order Tracking” are very similar and probably have the same answer as well, it makes sense to merge them into one. This also fixes the overlaps and the previous model mayhem:
Outsourcing Intents to another Flow
As our Agent progressed, we have created another Flow, the “Pizza Designer” Flow:
However, attaching it to our food Flow has caused an overlap between our “Restart” and the “Start Over” Intent:
The solution here is to merge both Intents into one “Restart” Intent and outsource it to a third “Navigation” Flow, which is then attached to both previous Flows. This also allows the “Restart” Intent from the “Navigation” Flow to be used in other Flows that neither need the Intents of the food nor the pizza designer Flow:
Using NLU Settings
You can also solve the overlap of attached Flows by using the NLU Settings and changing the mapping order:
This will circumvent the Intent conflict and ensure that the end-user behavior is as intended. However, the Intent Analyzer feedback will remain unchanged, and the setting is not directly visible to the user. Therefore, it is recommended to use other methods of Intent conflict resolution where feasible:
Now that we've established the baseline, we need to focus on reducing false positives / false recognition of Intents.