Introduction:
In this exercise, you'll teach your chatbot to answer the question 'What movies are on?'
Create an intent:
- In the Dialog editor, go to User start and add a user turn. Hint: you can do this by clicking the green + symbol.
- In the Turn editor, set the node type to 'User'.
- Enter the intent 'show.movie.list'.
- In Primary utterance, enter an utterance for this intent. For instance 'What movies are on?' Remember that an utterance is wat the user actually says, so use your own words.
- In Additional utterances, add more utterances. Make sure that you enter at least 5. Ideally, enter around 10.
Remember: the more utterances you add, the better your bot will become at recognising user questions and finding the right answer.
- We'll skip Entities for now.
- Save your work. In the Dialog editor, your user turn now displays the intent and your primary utterance.
Add a bot reply:
Did you note the red warning icon in your intent? That's because you haven't created a bot reply yet. Let's do that right now.
-
Enter a bot reply: Tonight, we have The Joker, Little Women and 1917'. Which one would you like?
-
And let's add some variants too!• We've got some great movies on tonight! What about The Joker? Or if you are in a romantic mood, I can recommend Little Women. And we've got 1917, an Oscar winning war movie.• We've got Little Women, Oscar winning 1917 and The Joker.
Conversation design tip💡
Not sure how long your tuns should be? Take the one-breath test! If you can say your bot turn out loud without taking a breath, you're good to go! If not, try to shorten your bot turn, or add one or two extra text bubbles to split up the bot turn.
Train your chatbot:
Whenever you create an intent, you need to train your bot: it must learn the new intents and the utterances that are associated with it. When your bot needs training, it will show a symbol:
Training your bot can take a while. So why not take a moment to relax!
Test your bot:
After your bot finishes training, it's time to test your bot once more! This way you can make sure that your chatbot behaves as intended.
Open the chat window, and ask 'What movies are on'.
Greatness!
You have learned:
-
the basic concepts of chatbots: intents, utterances and response!
-
how to create an intent
-
how to add utterances that help your bot to recognise an intent.
-
how to add answer variations
-
how to train your bot
Click on the links below to get more out of OBI Bots:
- Chatbot basics: intents, utterances and responses
- Tutorial: Creating conversations