What's an intent?
Intents are meant for when you need a more flexible approach to matching than using patterns. With patterns, there must be an exact match between the consumer's utterance and a defined expression. This means that alternative expressions (synonyms, phrasings, and formats) are missed.
Intents use a Natural Language Understanding (NLU) engine to match the user's utterance against a set of training phrases or Knowledge Base articles. The results are scored based on the level of confidence in the match: VERY GOOD, GOOD, FAIR PLUS, FAIR or POOR.
As an example, you might configure a "billing" intent that has a defined set of training phrases like, "I have a question about my bill," "Can you help me with my bill?" and similar, alternative expressions. The consumer's utterance is evaluated against these phrases, and a score is determined. If there's a match of GOOD or better, the intent is understood to be present, it is sent to the bot, and the bot triggers the associated dialog starter.
For some practice with intents, complete the Intents tutorial.
What is the intent score/threshold?
To return the best response to consumers, the NLU has a threshold of GOOD. This means that an intent that scores below the threshold is not sent to the consumer.
The scoring breakdown, which indicates the NLU’s level of confidence in the match, is as follows:
- VERY GOOD: 75-100% match
- GOOD: 60-75% match
- FAIR PLUS: 45-60% match
- FAIR: 30-45% match
- POOR: 0-30% match
LivePerson (Legacy) engine or 3rd-party engine
- VERY GOOD: 85-100% match
- GOOD: 70-85% match
- FAIR PLUS: 65-70% match
- FAIR: 50-65% match
- POOR: 0-50% match
You can't change the threshold when using intents (although you can do this with knowledge bases).
Add an intent
To add an intent
- In the dashboard that lists your domains, select the domain.
- Click Add Intent in the upper-right corner.
Specify the following:
- Intent name: Enter the intent name. A domain can have dozens of intents, so using a standard naming convention is important for being able to easily sort and find intents.
- Intent display name: Enter the display name.
- Description: Enter a short phrase describing the intent. While this field is optional, it's often useful. Many intent names can be technical. A description adds clarity and is particularly helpful to a person not familiar with the domain.
- Intent type: Select either "Intent" or "Meta Intent." For an introduction to meta intents, see here.
Training: Enter as many training phrases as possible. The NLU engine uses training phrases in order to match a user's utterance with an intent. The more training phrases you include, the more likely it is that the NLU engine will accurately match the user's intent. Generally speaking, the phrases should be complete sentences (not long paragraphs, and not keywords). As an example, assume you have a "Check bill" intent. You might add the following training phrases, among others:
- I want to check the status of my bill
- Tell me what my bill is
- I need to look into what's going with my bill
For more, see Best practices farther below.
- Click Save.
- Train the domain so that the addition is reflected in a new model version.
Delete an intent
Deleting an intent is a non-recoverable action, so be certain about doing so before taking this action.
Ensure the intent isn't being used by any bots or knowledge bases before you delete it.
To delete an intent
Open the domain.
By default, the Intents page is displayed.
- In the left panel, select the intent.
- Click (3-dot icon), and select Delete.
- In the confirmation dialog, click Yes.
- Train the domain so that the deletion is reflected in a new model version.
To increase the quality of your intent matches, follow the best practices below.
For more best practices when training and tuning NLU, see here.
Technically, there isn’t a limit on the number of intents that a domain can have, but the following are best practices:
The actual number of intents needed in a domain depends on the use case. However, a good guideline for a limit is a maximum of 50 (recommended) to 100 (if necessary).
- If you need to exceed 50 intents, ensure there’s a strong business justification for doing so, and consider the following questions:
- Are that many intents necessary?
- Can you conceptually categorize the intents and cluster them, i.e., can they be grouped into different intent domains?
- What are the use cases, bot structures, etc., that are impacting the decision?
If you proceed and exceed the guideline, start with a smaller number of intents, and iteratively test as you add more. For example, add 20 intents with training phrases, test them, add 5 more, test again, and repeat the process. This helps to ensure that the intent training yields the results you expect. You might find that at some point (often somewhere between 50 and 100 intents), you will start to see issues with the NLU performance when intent matching.
- Keep in mind the following:
- Exceeding the aforementioned guideline impacts the training of domains. The larger the intent model, the longer that training takes. Large, complex models can sometimes time out during training.
- Exceeding the aforementioned guideline also impacts tuning. Every intent requires a set of training phrases that you must manually add and adjust so that the intent model performs as you expect. The more intents you have, the larger this effort is. Moreover, exceeding the guideline might introduce problems, e.g., mistakes and/or overlap among training phrases. This can yield results that are hard to manage.
If you're using the LivePerson (Legacy) engine for NLU, the following are best practices when creating training phrases; these help to ensure your intents are well-trained and return the results you expect.
One sentence, not multiple
If the domain is using the LivePerson (Legacy) engine, use a simple, concise sentence. For example, "How do I activate my card?" is much better than, “How do I activate my card? I am having trouble at the ATM. Can you help me?” Multiple sentences increase your risk of false positives.
10-25 training phrases
The number of training phrases that you need really depends upon your use case and type of intents. Generally, for intents, it is recommended that you have between 10 - 25 good training phrases. When you have more than that, it's likely that you have overtrained the intent, which might lead to false positives.