One of the many types of triggers you can use in Studio are the rules which check the customers' questions for specific words. These rules let you trigger intents based on whether the query includes some, all, or none of those words. These keyword triggers are the rules Any word, All words and Not accepted words.
Note: some of these rules may not be available to you in your Select rule dialog by default. If you are missing a rule you need, contact support.chatbot@leaddesk.com.
Adding keyword rules
To add keywords while creating or editing an intent:
- Click the Add new trigger button.
- In the Select rule dialog, click to select one of the keyword rules. In this example, Any word.
- Type the word or word pair into the keywords field and press Enter.
Keyword groups
You can create a keyword group by adding further words into the same trigger. The affect of the keyword group will depend on the rule being used:
- The Any word rule will trigger if one or more of the words in the keyword group are in the customer's query.
- The All words rule will only trigger if every word in the keyword group is present in the customer's query.
- The Not accepted words will trigger only if no words in the keyword group are present in the customer's query.
To add words to the keyword group:
- Type the new keyword next to the first and press Enter again.
Adding further groups
Often, a single keyword group will be enough to trigger the intent when you need to. Sometimes, however, you want to combine rules to create specific powerful triggers. If you want to define a tigger where both rules are applied:
If you want to define a trigger which checks if either rule is met:
|
In this example, we want to add another keyword group where words from the first group and the second group must be found:
- Click the add new rule link and select the rule. In this example, we will use the Any word rule again.
The user’s question has to have at least one keyword from both of these groups. So:
Customer asks: | Triggers? | |
What is your office address? | Yes | words from both groups are present |
Where is your office? | Yes | words from both groups are present |
How do I get to your office? | No | only includes words from second group |
Where is your address on the website? | No | only includes words from first group |
Wildcards in keywords
Wildcards let you define parts of words as keywords. Type as much of the word as must be included, then type an asterisk (*). Using the keyword play*, for example, lets you match words like "play", "playing", and "player", without creating a keyword group with all of those variations.
Choose your wildcards carefully, and don't make the abbreviation too short. que* would match "question" and "query" nicely, but would also match "quest", "Quebec", and "quench". If your wildcards risk creating false positives, a keyword group might still be the better way to go.
Reusing keywords
- Do not use the same word in different keyword groups in different intents as it would result in a match from both of them.
Keywords in action
It's good practice to include synonyms for your keywords. For example, if we are creating an intent for a customer who wants to book a doctor's appointment, it needs to cover the customer writing any of the following:
One way to create the rules to handle these queries is shown here.
|