How to build a chatbot with IBM Watson Assistant (2023)

In this article, we are going to learn about how to build a working chatbot using IBM Watson Assistant. Watson Assistant is a service hosted on the IBM cloud for building chatbots which allows you to build a chatbot without any explicit programming.

How to build a chatbot with IBM Watson Assistant (1)

Before we start building a chatbot, Let’s understand what is a chatbot and its use case.

A chatbot is an artificial intelligence (AI) software that can simulate human conversation. Chatbot services are programmed to respond to textual, visual, or auditory inputs from users and leverage mediums such as SMS, website chat window, and social messaging services to receive and reply to messages

A chatbot can be used in various services such as FAQ answering, 24*7 customer care support, booking a ticket, taking a pizza order, etc.

We will build a chatbot for a restaurant that can handle the following task :

  1. Make a booking — Our chatbot can book a table for the end-user.
  2. Hours of Opening — Our chatbot can provide information on the working hours of the restaurant.

You can add as many features as you want, but for the sake of simplicity and better understanding, we will focus on the above two features only.

Now we have set our intentions on what kind of tasks our chatbot can do, Let’s start building it.

You need to have an IBM Cloud account to use the IBM Watson Assistant service. Sign in to your IBM Cloud account. In case you don’t have one, you can sign up for free here.

Once you have signed in to your IBM Cloud Account, the below screen will appear on the dashboard.

How to build a chatbot with IBM Watson Assistant (2)

Type “ Watson Assistant” in the search bar and create a service of Watson Assistant.

Once you have created the service of Watson Assistant, click on it and the following screen will appear.

How to build a chatbot with IBM Watson Assistant (3)

Now click on “Launch Watson Assistant” to launch the service.

After completing the first step, you will get the following image.

How to build a chatbot with IBM Watson Assistant (4)

In this step, we will add the Dialog skill to our assistant. Dialog skills will help our assistant to perform the mentioned task.

To add a dialog skill to the assistant, click on the “ My first assistant”. You will get the following image.

How to build a chatbot with IBM Watson Assistant (5)

Here you can see, there is an actions skill linked to the assistant. In some cases, there is an action skill linked to the assistant and in others, there is a dialog skill linked to the assistant.

(Video) How to make a simple chatbot using IBM Watson Assistant

If there is a dialog skill linked to the assistant then we don’t need to change anything but in our case, there is an action skill linked to the assistant & we want to link the dialog skill. To do so, first, we remove the action skill from the assistant.

How to build a chatbot with IBM Watson Assistant (6)

To remove an existing action skill, click on the three dots in the upper right corner of My first skill and click on the remove skill. After successfully removing the action skill you will get the following image.

How to build a chatbot with IBM Watson Assistant (7)

Now to add a dialog skill, click on “Add an action or dialog skill” and Create a new dialog skill with the name “ Restaurant Skill” and click on the Create skill.

After completing this, a new dialog skill is added to our assistant. This completes step 2 of building the chatbot.

How to build a chatbot with IBM Watson Assistant (9)

In this step, we will create an Intent and add it to the skill. But before that, we need to understand what is an intent?

According to Watson Assistant

An intent is a collection of user statements that have the same meaning. By creating intents, you train your assistant to understand the variety of ways users express a goal.

An intent is simply a collection of user statements that have the same meaning. These statements can be the statement from which users want to express a goal, In our case, something like Make a booking for the table.

What are the different ways a user can say to make a booking for a table in the restaurant?

Make a booking for a table.

Reserve a table for me.

Make a reservation for a table in the restaurant.

Book a table.

I want to book a table for dinner.

All these examples show the intention of the user to book a table. By looking at these examples, we can easily say that the user wants to book a table. The same goes for the Intent in the chatbot.

Intent helps the chatbot to identify the goals that users want to accomplish. These goals can be to make a booking, getting information about operating hours, etc.

In our chatbot, We want to accomplish two main goals: making a booking and getting information about hours of operation. So we will create two intents, one for each.

First, We create an intent to understand the user’s intention to make a booking for a table.

To create an intent, first, click on the Restaurant skill. You will get the following image.

How to build a chatbot with IBM Watson Assistant (10)
(Video) Build Your Own AI Assistant (Chatbot) with IBM Watson Assistant

Now click on the Create Intent. After that, type the name of the intent “ make_booking” and then click on the create intent. You will get the following image.

How to build a chatbot with IBM Watson Assistant (11)

Now we need to train the intent by giving at least 5 different examples in which a user can say to a chatbot to make a booking for the table. The examples can be the following as we have seen earlier.

Make a booking for a table.

Reserve a table for me.

Make a reservation for a table in the restaurant.

Book a table.

I want to book a table for dinner.

To add examples, just type the statement and then click on add example. Once you successfully added all the examples, you will get the following image.

How to build a chatbot with IBM Watson Assistant (12)

Similarly, Create another intent for the hours of operation with the following examples.

What are your hours of operation?

Are you open on weekend?

Are you open on Sundays?

What are your working hours?

What is the timing of your restaurant?

How to build a chatbot with IBM Watson Assistant (13)

Till now, we have created an instance of Watson assistant service, added a dialog skill to the assistant, and created two intents. Let’s move to the next step.

In this step, we will create an Entity and add it to the skill. But before that, let’s understand what an Entity is and how it can be used to build a chatbot?

According to Watson Assistant…

Entities represent information in the user input that is relevant to the user’s purpose.

If intents represent verbs (the action a user wants to do), entities represent nouns (the object of, or the context for, that action). For example, when the intent is to get a weather forecast, the relevant location and date entities are required before the application can return an accurate forecast.

In our example, the user wants to book a table in the restaurant. But to book a table, the chatbot will need to know at what time and date the user want to book a table. Here date and time are the entities that are required to make a booking of the table.

So we will add two entities, namely, date and time to the dialog skill. Luckily, we don’t need to create these two entities. In Watson Assistant, these two entities are predefined in System Entities. We just need to enable these two entities to use.

To enable these two entities, click on the “Entities” in the “Restuarant skill”. After clicking, You will get the following image.

How to build a chatbot with IBM Watson Assistant (14)

In the Entities section, you will see two options namely My Entities and System Entities. Just click on the System Entities and enable the sys-date and sys-time entities to use it in the chatbot.

How to build a chatbot with IBM Watson Assistant (15)

Now you have enabled the sys-date and sys-time entities. Now you can use them in building our chatbot.

Now we will build the dialog to give the responses to user input. But before that, let’s understand what a Dialog is?

According to Watson Assistant…

A Dialog defines the flow of your conversation in the form of a logic tree. It matches intents (what users say) to responses (what your chatbot says back). Each node of the tree has a condition that triggers it, based on user input.

To build a dialog, click on the “dialog” in the skill menu and you will get the following image.

How to build a chatbot with IBM Watson Assistant (16)

Here you can see two dialog nodes that are created automatically.

  1. Welcome: This contains a greeting that is displayed to your users when they first engage with the assistant.
  2. Anything else: Contains phrases that are used to reply to users when their input is not recognized.

Now click on the Welcome node and replace the text with the following written text in the Assistant Responds section.

Hello! I am the virtual assistant of the restaurant. How can I help you?

How to build a chatbot with IBM Watson Assistant (17)

Whenever the user engages with the chatbot, first they will get the above-written message. Now we will need two more dialog nodes, one to give information about hours of operation and one to make a booking.

We start with hours of operation. To add a new node, click on the three-dot in the upper right corner of the Welcome node and click on the Add node below. After clicking it you will get the following image.

How to build a chatbot with IBM Watson Assistant (18)

Now fill in the following detail in the newly created node.

  1. Enter node name(optional): Operating Hours
  2. Enter condition: start typing #hours_of_operation and then click on #hours_of_operation.
  3. Enter response text: The timing of the restaurant is from 10 AM to 6 PM on weekdays and from 10 AM to 8 PM on weekends.

Now click on the cross icon next to Customize button.

How to build a chatbot with IBM Watson Assistant (19)

Now whenever a user asks about the working hours of the restaurant, the Operating Hours node will be triggered and the user gets the following response:

The timing of the restaurant is from 10 AM to 6 PM on weekdays and from 10 AM to 8 PM on weekends.

Now you can try the chatbot that we have built now. Just click on Try it in the upper right corner and type the following sentence.

What are the hours of operation?

(Video) Build a Chat Bot using IBM Watson Assistant - Part1 - Introduction and Basics

You will get the following response.

How to build a chatbot with IBM Watson Assistant (20)

Till now, we have added the dialog node to give the information about the hours of operation. Now we will add our last dialog node to make a booking for the table in the restaurant.

(Video) Build a Virtual Agent in 15 minutes with Watson Assistant Actions | Chatbot Tutorial

To add a new dialog node, just click on the three-dots in the Operating Hours node and click on the Add node above.

You will get the following image.

How to build a chatbot with IBM Watson Assistant (21)

Now fill in the following details in the newly created dialog node.

  1. Enter node name(optional): Make Booking
  2. Enter condition:start typing #make_booking and then click on #make_booking.
How to build a chatbot with IBM Watson Assistant (22)

We have entered the #make_booking intent as a condition to recognize so whenever a user asks about booking a table, the chatbot will recognize the intent #make_booking and this node will be triggered.

To book a table in the restaurant, the chatbot needs to ask the user two things.

  1. What day would you like to come in? ( date of the booking)
  2. What time do you want for the reservation? ( time of the booking)

The typical workflow of booking a table will look like this.

How to build a chatbot with IBM Watson Assistant (23)

To create this workflow, we will use the Slots. Slots provide a structured format through which you can ask for and save multiple pieces of information from a user within a single node. They are most useful when you have a specific task in mind and need key pieces of information from the user before you can perform it.

To use the slots, click on Customize button in the upper right corner of Make Booking node, set the Slots switch to On, and then click Apply.

How to build a chatbot with IBM Watson Assistant (24)

In Then check for Section, Add the following slots :

  1. check for — @sys-date, save as — $date, If not present, ask — What day would you like to come in?
  2. check for — @sys-time, save as — $time, If not present, ask — What time do you want for the reservation?

After adding slots, you will get the following image.

How to build a chatbot with IBM Watson Assistant (25)

Now, In the Assistant responds section, enter the following text.

Thank you for booking on $date. We will be waiting for you at $time.

How to build a chatbot with IBM Watson Assistant (26)

The chatbot is complete now. You can try it using the Try it option in the upper right corner.

(Video) Build a simple AI Assisted IBM Watson Chatbot || Create your own Chatbot with IBM Watson

Hope you find this article useful. If you have any doubt, feel free to ask in the comment section. You can connect with me on LinkedIn.

Thank You!

FAQs

How do you make a perfect chatbot? ›

Seven steps to designing the perfect chatbot for your company
  1. Decide on the purpose of your chatbot.
  2. Create concrete use cases for your bot.
  3. Choose the channels of interaction.
  4. Define your customers.
  5. Give your bot a personality.
  6. Create a happy flow of conversation.
  7. Test, measure, and improve.
Mar 24, 2022

Is IBM Watson Assistant a chat bot? ›

An adaptable AI chatbot that gets it right the first time

IBM Watson Assistant is built on deep learning, machine learning, and natural language processing (NLP) models to understand questions, find or search for the best answers, and complete the user's intended action through conversational AI.

What programming language does IBM Watson use? ›

The system was written in various languages, including Java, C++, and Prolog, and runs on the SUSE Linux Enterprise Server 11 operating system using the Apache Hadoop framework to provide distributed computing.

Which tool can be used to create Chatbots IBM? ›

You can get started building an engaging chatbot with Watson Assistant, no-code is needed.

How can I create a chatbot from scratch? ›

How to make a chatbot from scratch in 8 steps
  1. Step 1: Give your chatbot a purpose. ...
  2. Step 2: Decide where you want it to appear. ...
  3. Step 3: Choose the chatbot platform. ...
  4. Step 4: Design the chatbot conversation in a chatbot editor. ...
  5. Step 5: Test your chatbot. ...
  6. Step 6: Train your chatbots. ...
  7. Step 7: Collect feedback from users.
Feb 9, 2023

How hard is it to make a chatbot? ›

Because building a chatbot with code is immensely difficult for people with no development background and limited exposure to coding languages, it's good to research sample chatbot code from expert developers as a jumping-off point for those determined to learn how to build their own bot without help.

Why do most chatbots fail? ›

Setting unrealistic expectations is often the reason why chatbots fail. Most chatbots are based on a set of rules that dictate the answer to give to a specific question by drawing the necessary resources from a database.

What are the 7 steps to create a chatbot strategy? ›

Let's walk through them in order.
  1. Audience. The first key to a successful strategy is to profile your ideal customers. ...
  2. Goal. To define the purpose or goal for your chatbot strategy, begin with the end in mind. ...
  3. Performance. ...
  4. Key Intents. ...
  5. Storytelling. ...
  6. Platform Strengths: ...
  7. Feedback.

Which algorithm is best for chatbots? ›

Popular chatbot algorithms include the following ones:
  • Naïve Bayes Algorithm.
  • Support vector Machine.
  • Natural language processing (NLP)
  • Recurrent neural networks (RNN)
  • Long short-term memory (LSTM)
  • Markov models for text generation.
  • Grammar and Parsing Algorithms.
Aug 29, 2022

Can chatbots answer 80% of standard questions IBM? ›

Chatbots can also handle 80% of routine tasks and customer questions. Unlike people, chatbots are not constrained by working hours, time zones, public holidays, or illness.

Is IBM Watson worth it? ›

IBM Watson Analytics is an exceptional business intelligence (BI) app that offers a strong analytics engine along with an excellent natural language querying tool. This is one of the best BI platforms you'll find and easily takes our Editors' Choice honor.

Is IBM Watson assistant good? ›

IBM Watson Assistant is best AI Chatbot support you can ask for your Service team. IBM Watson is one of the pioneers to forey into AI Chatbots which forms a key component in Service driven industries.

Is IBM Watson API free? ›

Create an account on IBM Cloud to try Watson services for free with no time restrictions: Sign up for free.

Is IBM Watson still relevant? ›

It was a potentially useful new diagnostic tool. But it turned out to be not useful or flexible enough to be a winning product. At the end of last year, IBM discontinued Watson for Genomics, which grew out of the joint research with the University of North Carolina.

What are three applications of IBM Watson? ›

Watson helps organizations predict future outcomes, automate complex processes, and optimize employees' time.

What is the best API to create a chatbot in? ›

8 best chatbot APIs in 2023
  1. Twilio Studio. Twilio Studio lets you build a friendly, conversational chatbot that can respond to incoming messages, chat with customers, and process orders. ...
  2. 2. Facebook Messenger API. ...
  3. Slack bot API. ...
  4. Bot Libre. ...
  5. Google Chat API. ...
  6. ChatBot API. ...
  7. Crisp Chat. ...
  8. Wit.ai.
Dec 27, 2022

Which API can be used to build chatbots? ›

Chatbot API
Chatbot APIRatingBest for
Wati4.6/5 ⭐️ (150+ reviews)WhatsApp chatbot API
Ada4.6/5 ⭐️ (140+ reviews)Access permissions for user types
ManyChat4.6/5 ⭐️ (110+ reviews)Facebook Messenger chatbot API
ChatBot4.5/5 ⭐️ (15+ reviews)Variety of integrations
9 more rows
Nov 21, 2022

Which AI is used for chatbot? ›

Chatbots use two main types of AI: natural language processing and machine learning. Natural language processing enables bots to interpret customer requests, including slang, typos, and abbreviations, and machine learning allows them to improve over time.

What is the easiest chatbot builder to use? ›

1. Tidio. Tidio is arguably the best chatbot builder for small and medium-sized businesses that need a live chat with integrated chatbots. Whether it's your first chatbot or you just need some new ones, Tidio provides an easy and quick chatbot editor for your business.

How long does it take to build a chatbot? ›

Implementing a chatbot takes 4 to 12 weeks, depending on the bot's scope, the time required to build your knowledge base and its technical complexity.

What skills do I need to build a chatbot? ›

Top 5 Must-Have Skills of A Chatbot Developer
  • Knowledge of chatbot frameworks. ...
  • Knowledge of multiple programming languages. ...
  • Knowledge of the latest technologies. ...
  • Ability to integrate chatbots on various platforms. ...
  • Communication skills.
Oct 4, 2022

Do you need coding knowledge to build a chatbot? ›

You don't have to be aware of any coding skills. Immediately after big players like Facebook Messenger or Skype opened their platform for programmers many tools emerged. With this article I want to give you an introduction to mockup and overview of different tools to build your first chatbot.

Does chatbot require coding? ›

Companies can take back control to quickly and easily build chatbots for customer service, no code needed.

How is a chatbot programmed? ›

Chatbots use machine learning (which gives computer systems the ability to learn from data) and natural language processing (the branch of computer science that gives computers the ability to understand text and spoken words). They are written in on the back-end that runs on a server.

What is the difference between script bot and chatbot? ›

11 Give 2 points of difference between a script-bot and a smart-bot Ans: Script-bot Smart-bot Script bots are easy to make Smart-bots are flexible and powerful Script bots work around a script with instructions of program stored inside them Smart bots work on bigger databases and other resources directly Mostly are Fre ...

How do you prototype a chatbot? ›

  1. Step 1: Discovery. In the discovery phase, we needed to develop a solid understanding of who the bot's core users are, as well as what their goals are. ...
  2. Step 2: Conversation and Personality Design. Conversation design (text omitted) ...
  3. Step 3: Building A Functional Prototype. ...
  4. Step 4: Visual Design. ...
  5. Step 5: User Testing.

How do you deploy IBM Watson chatbot? ›

This documentation is for the classic IBM Watson Assistant experience.
...
Deploy your assistant in production
  1. Open the HTML source for a web page on your website where you want the chat window to be displayed. ...
  2. Refresh the web page. ...
  3. Click the icon to open the chat window and talk to your assistant.

How do I deploy IBM Watson chatbot to my website? ›

Step by Step Guide to Integrate IBM Watson Chatbot Into Your Website
  1. Step 1: Sign up for Kommunicate. ...
  2. Step 2: Get your IBM Watson Chatbot Credentials. ...
  3. Step 3: Finish your bot setup. ...
  4. Step 4: Add the Kommunicate chat widget and IBM Watson Chatbot to your website.
Oct 27, 2020

What can IBM Watson assistant do? ›

Watson Assistant lets you build conversational interfaces into any application, device, or channel. Add a natural language interface to your application to automate interactions with your end users. Common applications include virtual agents and chat bots that can integrate and communicate on any channel or device.

How do you implement the chat bot functionality? ›

How to Build a Chatbot for Your Website (Step-by-Step)
  1. Decide what type of chatbot is best for your business. ...
  2. Determine your chatbot KPIs. ...
  3. Understand chatbot user needs. ...
  4. Give your chatbot a personality. ...
  5. Create your chatbot conversation flow. ...
  6. Design your bot. ...
  7. Preview and test. ...
  8. Target your chatbots.

How does Watson assistant connect to database? ›

You need to add the Credentials to the Application, Open the watson-assistant-credentials. json file in the repo and add the following: Watson Assistant apikey , url and the assistant-id . Open the ibm-db2-credentials. json file and paste the Db2 Credentials and save the file.

Which API is used to send input from the application to Watson assistant? ›

The Assistant v2 API provides runtime methods your client application can use to send user input to an assistant and receive a response.

Where do I deploy chatbot? ›

When creating a chatbot, you design the logic of a chatbot. To then bring it to life so your users can interact with it, you must deploy it on one of the media, which include Web pages, Facebook Messenger, WhatsApp and Twilio phone numbers.

How do I connect to chatbot API? ›

How to Connect to Chat GPT API?
  1. Step 1: Get an API key for the OpenAI API.
  2. Step 2: Download OpenApi Library.
  3. Step 3: Create Python code to connect with Chat GPT.

How long does it take to implement chatbots? ›

Implementing a chatbot takes 4 to 12 weeks, depending on the bot's scope, the time required to build your knowledge base and its technical complexity. Read about the different project deployment phases, from launch to acceptance.

Is IBM Watson Assistant good? ›

IBM Watson Assistant is best AI Chatbot support you can ask for your Service team. IBM Watson is one of the pioneers to forey into AI Chatbots which forms a key component in Service driven industries.

What Can Watson assistant integrate with? ›

Watson Assistant integrates to your existing CRM and customer care systems, helping you improve issue routing by connecting customers to the right agents the first time. You can integrate with Salesforce, Genesys, Zendesk, and more.

Is it easy to create a chatbot? ›

Because building a chatbot with code is immensely difficult for people with no development background and limited exposure to coding languages, it's good to research sample chatbot code from expert developers as a jumping-off point for those determined to learn how to build their own bot without help.

Which language is used to create chatbots? ›

Java. You can choose Java for its high-level features that are needed to build an Artificial Intelligence chatbot. Coding is also seamless because of its refined interface. Java's portability is what makes it ideal for chatbot development.

Videos

1. Build an easy Chatbot in 10 Mins with IBM Watson and OutSystems
(OutSystems)
2. IBM Watson Assistant Chatbot with Python | #143
(Brandon Jacobson)
3. Using Watson Assistant to Build the Chatbot
(ITS UMGC)
4. How to Create Chatbot with basic Coding Knowledge -IBM Watson
(Geerthik S)
5. Build a Bot using IBM Watson Assistant - Getting started- Do it yourself - part # 1
(BharatiDWConsultancy)
6. Create A simple chat bot with Watson Assistant - Part 1
(LinearTech)
Top Articles
Latest Posts
Article information

Author: Allyn Kozey

Last Updated: 04/27/2023

Views: 5871

Rating: 4.2 / 5 (43 voted)

Reviews: 82% of readers found this page helpful

Author information

Name: Allyn Kozey

Birthday: 1993-12-21

Address: Suite 454 40343 Larson Union, Port Melia, TX 16164

Phone: +2456904400762

Job: Investor Administrator

Hobby: Sketching, Puzzles, Pet, Mountaineering, Skydiving, Dowsing, Sports

Introduction: My name is Allyn Kozey, I am a outstanding, colorful, adventurous, encouraging, zealous, tender, helpful person who loves writing and wants to share my knowledge and understanding with you.