Lastly, you create a dialog that you imagine your users will have with the chatbot. Remember 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 that conversation go?

The dialog uses the 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 understand your user’s context or situation clearly, you can accurately define dialog nodes that enable your chatbot to interact with that user more naturally and ultimately to provide useful responses. Some of your dialog nodes will need to be questions to help the chatbot clarify the intents of your user.

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

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

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.

To dive deeper into dialog and see how you use it in IBM Watson Conversation:
Watch this video “Working with dialog”: