Intent hierarchies can be used to resolve Intent conflicts and they can also make your life easier by providing a beneficial structure for your Agent. In this article we will focus on what these benefits can be.
Intent hierarchies have multiple benefits for Intent Management, namely:
- Visual structure
- Implicit Intent training
Intent hierarchies can improve Intent management by providing a clear structure, which makes it easier to find the Intent you are looking for:
As you can see, the Intent hierarchy on the right provides visual support for finding the relevant Intent. The Intent hierarchies make it clearer that the Intent “1.09.01 Category” belongs to the product catalog, since the relationship is not only shown via the numbering, but also via the structure.
Implicit Intent Training
Using the hierarchies also brings the benefit of implicitly training the parent Intents by turning the “inherit Example Sentences from child Intents” setting on:
You can see that without the hierarchies, the “product” input did not match any Intent. However, by using the hierarchies in combination with the “Inherit Example Sentences from Child Intents” setting, we find the Product Intent even without adding any additional Example Sentences:
This can be a powerful and efficient method to guide the user through the conversation in case they ask something that is still out of scope, but still relates to a topic:
Hierarchical Intents also benefit your Agent structure in multiple ways:
- Flow separation
- Central Intent training
Hierarchical Intents allow you to have multiple information layers within a single Intent mapping within a single Flow. These information layers are represented by the Intent Level:
These Intent Levels can be used to structure your agent. They are accessible via:
Additionally, they are also incorporated into the Lookup Node:
You can then use these Intent Levels to drastically reduce the size of your orchestrator Flow and to outsource the logic to sub-Flows:
It is important that you turn off the “parse Intents” and “parse Slots” settings of the Execute Flow Nodes, since you want to keep the mapped Intent:
You can then continue the same logic in the sub-Flows as well, by checking the next Intent Level:
This makes it easy to subdivide your Agent Flows, keeps your Flows on a manageable size and provides a clear Agent structure:
Central Intent Training
Using Intent hierarchies, you can group your Intents within a single orchestrator Flow, which also makes spotting overlaps and Intent conflicts easier. All other Flows that need to access these Intents can simply attach the orchestrator Flow:
These sub-Flows should not have any Intents that could also be in the orchestrator Flow:
You only need to add its own Intents to a sub-Flow if both of the following conditions are met:
- a user stays within that Flow, based on at least one of the following:
- Question Nodes
- Wait for Input Nodes
- GoTo Nodes that targeted the Flow
It is best to GoTo back to the orchestrator Flow once the sub-Flow is finished
- there are specific Intents that should only be reachable while we are waiting for the user input
An example for this would be an “enter your address” process where you want to have a “mistake” Intent for correcting your inputs. This “mistake” Intent would not make sense in the orchestrator and therefore is fine to have in your “enter your address” Flow.
You are now aware of the benefits that Intent hierarchies can provide, feel free to streamline your Agents with them!
Search terms: Intent hierarchy, hierarchical Intents, parent Intent, child Intent, grandchild Intent, grandparent Intent