Lab1-Build Chatbot Using Watson Assistant Tool PDF
Lab1-Build Chatbot Using Watson Assistant Tool PDF
Step -16 : Give a name to the node and Type #Greetings in the condition field of this
node. Then select the #Greetings option
Lab –1: Building chatbot in Watson Assistant tool
Step -17 : Add sample responses and Click to close the edit view.
Lab –1: Building chatbot in Watson Assistant tool
Step – 18 : Test the dialog. Click the icon to open the "Try it out" pane. The
welcome message in the welcome node is displayed.
Lab –1: Building chatbot in Watson Assistant tool
We are done building a basic Chatbot. Now in next lab(Lab 1.1) we will proceed building a
chatbot for a restaurant
Planning your intents and entities
To plan the intents for your application, you need to consider what your customers might want to do, and what you
want your application to be able to handle. Choosing the correct intent for a user's input is the first step in providing a
useful response. The intents you identify for your application will determine the dialog flows you need to create; they
also might determine which back-end systems your application needs to integrate with in order to complete customer
requests (such as customer databases or payment-processing systems).
Gather as many actual customer questions, commands, or other inputs as possible. Using input from real users
gives a better picture of the expected input than having experts create lists of possible utterances. Remember that
customers might phrase the same kind of request in many different ways.
Example
#Enquiry
• What is the price of x item
• Can I get the menu
Lab –1.1: Building a chatbot for a Restaurant
After gathering all possible questions asked by a customer we can proceed building a
chatbot
Step – 1 : Let’s create an intent for Enquiry. So, go to Intents and click on “Add
Intent”.
Lab –1.1: Building a chatbot for a Restaurant
Step – 2 : Give the intent name as Enquiry and click on create intent
Lab –1.1: Building a chatbot for a Restaurant
Step – 7: Give the name for your entity and click on Create entity
Lab –1.1: Building a chatbot for a Restaurant
Step – 8: Give the value name as offers and click on Add value. Do the same
thing for menu
Lab –1.1: Building a chatbot for a Restaurant
Step – 12 : Give the name of the node as “Enquiry” and give the condition as
#Enquiry
Lab –1.1: Building a chatbot for a Restaurant
Step – 15 :In the internal condition Enter @Enquiry and select the option
Lab –1.1: Building a chatbot for a Restaurant
Step – 17 :Select “offers” from the dropdown. So the first internal condition
executes when the user question is about offers.
Lab –1.1: Building a chatbot for a Restaurant
Step – 19: Click on Add response to add response for “menu” condition
Lab –1.1: Building a chatbot for a Restaurant
Step -26 : Test the dialog. Click the icon to open the "Try it out" pane.
Lab –1.1: Building a chatbot for a Restaurant
Step – 27: Give the input as “What are the offers available”
Lab –1.1: Building a chatbot for a Restaurant
Step – 29: Give the input as “Can I get the menu” and observe the output
Lab –1.1: Building a chatbot for a Restaurant
Step – 37 :Give the name to the entity as “items” and click on Create entity
Lab –1.1: Building a chatbot for a Restaurant
Step – 39 :You can also add synonyms for entities as shown below
Lab –1.1: Building a chatbot for a Restaurant
Step – 42 : Go to Dialog
Lab –1.1: Building a chatbot for a Restaurant
Step – 44 : Give the name of the node as “Order” and give the condition as “#Order”
Lab –1.1: Building a chatbot for a Restaurant
Now Let’s explore user defined Context Variables. In start of conversation lets ask for customer name
and save in context variable and once the customer is done with the conversation, let’s delete the
context variable
Step – 73:Open edit window of Welcome Node
Lab –1.1: Building a chatbot for a Restaurant
Step – 74: In the response ask for the Customer name as shown below
Lab –1.1: Building a chatbot for a Restaurant
Step – 75 : Go to Entities, go to System Entities and enable “@sys-person” entity
Lab –1.1: Building a chatbot for a Restaurant
Step – 76 : Go to dialog and click on
Lab –1.1: Building a chatbot for a Restaurant
Step – 77 : Click on add child node to add a child node
Lab –1.1: Building a chatbot for a Restaurant
Step – 78: Give the name of the node as “Customer Name” and give the condition as “@sys-person”
Lab –1.1: Building a chatbot for a Restaurant
Step – 79: Click on and click on Open context editor to save the person name in the context
variable
Lab –1.1: Building a chatbot for a Restaurant
Step – 80 : Give the variable name as “name” and value as “@sys-person” as shown below.
Lab –1.1: Building a chatbot for a Restaurant
Step – 81 : Give the response in the welcome node as shown below
Lab –1.1: Building a chatbot for a Restaurant
Step -82 : Test the dialog. Click the icon to open the "Try it out" pane .
Lab –1.1: Building a chatbot for a Restaurant
Step – 83 :Click on clear, the bot asks for the customer name
Lab –1.1: Building a chatbot for a Restaurant
Step – 84 :Enter your name and observe the output as shown below and open manage context to
see the saved name in context varibles