Creating and Testing Intents
At the core of several Intelligence Engine features are "Intents". You configure these intents to recognize when a phrase or topic appears in an interaction that is of interest to your business. The following guide explains how to configure and test intents.
Procedure
Follow these steps to configure and test an intent:
- Create Intents
- Refine Intent Definition
1. Create Intents
Intents detect specific customer or agent phrases/topics, and can be used to trigger a suggestion.
- Navigate to Intent Studio in the Intelligence Engine application, and click Create.
- The intent properties are configured from the Intent Studio:
- Enter a descriptive Name for your intent, to identify it throughout the interface.
- Intent Type: Choose between Grammar or AI intents. For Real Time Suggestions, Grammar intents are strongly recommended as they are faster and more reliable for immediate processing.
- Grammar intents are used to match keywords or phrases. They are fast to process and provide predictable matching, but require careful construction using the Grammar Intent Syntax. For example, to match phrases like "I can't login", "I cannot seem to sign in", or "I can't access my account right now", you could use the following:
CUSTOMER: "<i can't | i cannot> * <login | sign in | access my account>"
- AI intents consider each interaction in the context of a prompt written as a yes/no question. If the AI determines that the answer to the question is "yes", the intent is triggered. While potentially more flexible for nuanced situations, AI intents have higher latency as they require the conversational turns to be sent to an AI model for evaluation.
- Grammar intents are used to match keywords or phrases. They are fast to process and provide predictable matching, but require careful construction using the Grammar Intent Syntax. For example, to match phrases like "I can't login", "I cannot seem to sign in", or "I can't access my account right now", you could use the following:
- Definition:
- For Grammar intents, this is where you input the keywords, phrases, or patterns that will trigger the intent. See the Grammar Intent Syntax for more details.
- For AI intents, this is where you phrase the yes/no question that the AI will use to analyze the conversation. For example, "Is the customer expressing frustration about the recent policy change?"
- Click the + button to define the intent's matching logic (grammar or AI question) for additional languages. This allows the same intent to trigger based on conversations in different languages, each with its own specific definition.
- For Grammar intents, this is where you input the keywords, phrases, or patterns that will trigger the intent. See the Grammar Intent Syntax for more details.
- Add Precondition Intent: Select an existing intent that must be detected before this current intent is triggered. This helps create more specific and context-aware suggestions. For example, you might have a general "Refund Request" intent as a precondition, and then a more specific intent like "Refund for Damaged Item" that only triggers if the "Refund Request" precondition has already been met during the interaction.
2. Refine Intent Definition
Before deploying an intent, test whether it's triggered by the desired phrases. After saving the intent, click Test Definition to open the definition testing workspace. This example shows how to test and refine a Grammar intent, but testing an AI intent is similar.
- Click Create Test Dataset to define a sample of interactions to test your intent definition, or select an existing dataset.
- Name your dataset for future use, set the criteria for sampling interactions, and click Create.
- Once the dataset is selected, click Run Test, then select one of the interactions with "yes" in the Intent Hit column.
- The interaction transcript opens in the right pane, highlighting parts that match the intent. Use the User Answer response buttons to indicate if the intent was correctly triggered. Your answer will appear in the User Answer column.
- Use the Compare with AI option to find interactions that your grammar may have missed. Enter a question to identify interactions that conceptually match your intent, and click Ask AI.
For example, we have a grammar intentCUSTOMER: "internet" & "slow"
, designed to identify when the customer reports internet problems, so we ask the questionDoes the customer appear to be having problems with their internet speed?
- The table of AI-tested interactions may show an example where the AI identified a match, but the intent was not triggered.
- In this case, the AI identified that the customer's statement
All the websites I visit have been taking forever to load, what is the problem?
seems to indicate an internet speed issue, but our grammar intent did not trigger, since it only looks for the wordsinternet
andslow
. We might update our intent to something likeCUSTOMER: "<internet | site* | website* >" & "<slow | forever>"
to match a broader set of statements.
Your intents can now be used to support autoscoring, real-time suggestions, and more.