Best practice recommendations for building bots in Architect
When you define intents, keep the following guidelines in mind:
- Actionability: How effectively does the system use features that help to fulfill customer requests?
- Forwarding functionality: Can you configure agent availability to receive a voice, message, or chat interaction, if necessary?
- Built-in features:
- Confirm unclear statements by making a hypothesis and asking to confirm or deny the proposed intent.
- Fill slots and, optionally, slot confirmations for an intent and the required details before acting.
- Optionally filter greetings.
- Review event handling behavior for clarity. For example, error events, recognition failures, and agent escalation.
Define action items for potential intents
- Make a list of action items.
- Review existing data and determine how your list compares with real world cases.
- Make sure that your definitions have clear boundaries and do not overlap.
- Evaluate your most immediate use cases, including how to define them and the intents that you want to include.
Use logic when naming intents
- Configure intent names to work within a prompt sentence; for example, “I think you are interested in [intent name].”
- Use brief, but natural wording that fits prompt grammar.
- Choose between default and custom prompts for each intent, based on use case.
- Make sure that your custom and default prompts are brief.
Provide intent examples
When you create intents, consider these best practice guidelines:
- Provide at least 20–30 typical examples per intent.
- Make sure to provide intent variations, such as:
- Include variety in the form of questions or statements that people can make.
- Add keywords that represent the intent.
- Add synonyms for the intent; for example, book a hotel, reserve a room, and make a reservation.
- If an intent has slots to fill, make sure that you:
- Define the slot and slot types.
- Include plural values and synonyms.
- Mark up entities in intent phrases.
- Select default or custom prompts for each slot.
- Provide direction for built-in slots, such as date and currency.
Test the model
During the testing process, make sure that your intents are representative of voice and potentially noisy environments. The following guidelines help you determine whether automatic speech recognition impacts performance:
- Use variations for each intent. For example, “I need a room for tomorrow.” or “I want to book a room for tomorrow.”
- Test cases where an intent is unclear. For example, boundary issues, vocabulary overlap between intents, an intent asked at a different level of detail.
- Test the model using single-keyword utterances.
- Test the model using intents with and without slots.
- Check to see if general words create a strong bias. For example, do the words “why” or “help me” automatically select one intent over another? In this case, the recommended corrective action is to balance out the model by adding those words to other intents, where applicable.
- Determine if shared keywords create strong bias. For example, “account” in banking intents. In this case, the recommended corrective action is to decide on a default and then strengthen subcases.
After you train and test your bot, review areas for improvement. For example:
- Evaluate the relevance of your intents and adjust them accordingly.
- Focus your attention on key phrases and not on stray content. If you use real data, consider whether to make relevant changes, such as minimizing sentence wording.
- Consider whether to include more examples; for example, syntactic variation and synonyms.
- Balance your intents so that they eliminate existing bias in common phrases and shared keywords. If an example includes a strong bias that interferes with intent resolution, remove it.
Make sure to create prompts that:
- Are brief and clear.
- Fit well with the grammar of potential default intent or slot name insertions.
Consider the variations and adjustments needed for a voice bot.
- Intents: It is not necessary to vary number formats. However, make sure that you know which number format that your speech-to-text component returns, and make sure that you represent that format in your intents.
- Prompts: Make sure that you construct voice prompts with brief and minimal word choice. Unlike text messages, you cannot review them again. Best practice recommends simple and short voice prompts, with few or less than three words, and no repetition.