Become a Chatbot Builder

back
Lesson /23
Dialog

Lastly, you create a dialog that you imagine your users will have with the chatbot. Try to recall what you did in your empathy map and imagine a conversation between two people. One person is feeling sad or stressed, and the other person (the chatbot) is there to help. How would the conversation go?

A dialog uses nodes, intents, and entities that enable you to map a conversation. A node contains one or more conditions and responses. You set conditions to look for specific intents or entities and set responses to reply to the user depending on the condition. For example, if a node has a condition to look for a user asking about ice cream, you could set the response to be something like, “Ice cream has a lot of calories, avoid it except on hot days!”

If you clearly understand your user’s context or situation, you can then accurately define dialog nodes that enable the chatbot to interact with the user naturally, giving useful responses. Some of your dialog nodes will need to be questions to help the chatbot clarify the intents of the user.

Taking the example of eating an ice cream (@unhealthy_food) as a meal choice, the Food Coach asks “how do you feel” as a clarifying question, followed by a suggestion to learn more about making better food choices.

 

ice-cream-food-coach

 

Let’s take a closer look at how to program dialog nodes in Watson Assistant (formerly Conversation).

dialogue-node1-empty

You can also add rules in your dialog nodes, but we’re keeping it simple for now and just focusing on how you might define a node. The Food Coach chatbot starts by asking whether you ate your meal of the day. Depending on your answer, the application takes a particular conversation path.

  • If you answer yes, the chatbot asks if you ate anything unhealthy. Finally, the chatbot asks you how you feel about the meal.
  • If you did not eat, the chatbot asks you about how you feel about not eating. The chatbot then infers the tone of your message to create a compassionate response and a pointer to healthy eating.

The screen capture below shows the dialog nodes for the Food Coach.

Conversation5

To dive deeper into dialog and see how you use it in IBM Watson Assistant (formerly Conversation):
Watch the following video, “Working with dialog”:

 

Share with: