Define and Design Intents for Your Bot
Every time you speak or type to a bot you are issuing an 'intent'. Everything from your initial greeting to questions about whether you'll need an umbrella on Saturday qualifies as an intent. Learn more about the different kinds of intents and how to design them for your bot.
July 31, 2018
When you’re building a new chatbot, or bot, how do you plan? How do you identify the questions your users might ask and how they’ll ask them? More importantly, how do you build that information into your bot, equipping it to understand everything your users say?
The answer is intents, which are, as they sound, user intentions. Intents are how users tell you what they want as they greet your bot and ask it questions.
In many ways, your whole bot is built on intents. They’re the stepping stones to other pieces of your bot’s conversational design, including entities and utterances, which help you structure your bot’s dialog.
What is an intent?
Your users issue an intent every time they speak to your bot. Everything they communicate qualifies as an intent—from their initial greeting to their question about whether they’ll need an umbrella on Saturday. But not all intents require the same types of responses from your bot.
We can generally divide intents into two categories:
- Conversational intents
- Interrogative intents
Conversational intents are all the casual tidbits your users add to the conversation, including greetings and yes or no answers.
Examples of conversational intents:
Conversational intents aren’t always one word. It’s important to consider conversational intent phrases, like, “No, but thanks for your help,” or, “Ooo, I like that one.” Conversational intent phrases are generally affirmative or negative, which can help your bot figure out how to respond. If your bot asks the user a question, it can expect a yes or no type of answer.
Interrogative intents are all the questions your customer might ask your bot.
Examples of interrogative intents:
- What breed of dog does well with kids?
- What’s the high-temperature today?
- Who was the 32nd president of the United States?
- Can you show me the other one?
- I need a dog to go hiking with.
- What kind of dog has the fewest health problems?
- I want a dog that’s good for an apartment.
Any question your user might ask requires information from your bot. And your bot needs to respond accurately, with an answer that is useful to your user.
The way that your bot responds to interrogative intents is critical for user satisfaction and experience. If your bot can’t answer a question accurately or in the way that your user wants or expects, they won’t keep using it.
How to design your bot’s intents
It used to be that, if you didn’t think of and plan for every single intent your user might express, your bot wouldn’t understand it. Luckily, natural language processing (NLP) services have made the design process much easier.
You have several options for NLP services, and these are the most common ones:
Designing intents with NLP services
NLP services let you designate different intents and give you the chance to provide examples of what those intents might look like. You don’t have to think up every possible combination of words your user might type—the NLP can take your examples and learn on its own how to identify preset intents.
For example, let’s say you provide the NLP system with just these examples of a #dog_breed_suggestion intent:
Notice that intents always begin with the # sign. The NLP can take those examples and learn that a user who says, “I want a dog that doesn’t need a big yard,” is expressing a #dog_breed_suggestion intent.
You can designate as many intents as you like in your NLP system, along with user examples to train the system to identify user intents on its own.
Adding user examples to designated intents
The NLP system needs to learn how to recognize unique user input as belonging to a specific designated intent, and user examples help it do that. The more user examples you can give your NLP, the better.
You can write user examples yourself, especially the more obvious phrases. For example, you can tell your NLP that greeting intents will be things like, “Hey,” “Hi,” and “Hello.”
For more complicated user input, like interrogative intents, you can write some phrases yourself. However, whenever possible, it’s best to find real user or customer examples.
You can find real examples anywhere that your potential users spend time, whether that’s in online forums or the comments section on topical newspaper articles. Even friends and family can tell you how they would phrase comments or questions to your specific bot.
As you add user examples to your NLP system, don’t worry about making perfectly phrased complete sentences. Your users won’t always talk that way, so neither should you.
What comes next
After you’ve designed your intents, you can train your NLP system to recognize and reply appropriately to other parts of your users’ messages, such as entities.
Read our related article, “Define and Design Entities for Your Bot.”