How to develop a self-learning chatbot with IBM Watson – the best conversational engine
Chatbots are the future of interacting with your customers, employees, and all other people out there you want to communicate with. The essence is that this communication is a dialogue. Our Actionbot is one of the best conversational chatbots, mostly because of its AI engine – IBM Watson. Learn how we built our self-learning chatbot using this engine in the article below.
Chatbots vs virtual assistants
Intelligent Virtual Assistant is a term that describes more advanced conversational chatbots, equipped with Natural Language Understanding (NLU), Natural Language Generation (NLG), and Machine Learning, that enables them to understand and retain context and have more advanced conversations.
People are sometimes using the terms “chatbot” and “Intelligent Virtual Assistant” (IVA) interchangeably, but there are few significant differences between them. Chatbots can simulate a conversation to a certain extent. Still, they must work off a limited script – that means they are lacking the ability to learn over time and adapting this knowledge into context. IVAs, on the other hand, can truly imitate human interactions while carrying out a wide variety of tasks to fulfil the user’s requirements.
Self-learning chatbots are simply the ones that rely on Machine Learning and other AI services to make conversations. The conversational solutions that understand and retain context, nuances in language, and effectively deal with vagueness are Intelligent Virtual Assistants, rather than simple chatbots. With these capabilities and more, IVAs can put customer’s needs at the forefront – significantly improving customer experience and ultimately driving the ROI.
How to build a self-learning chatbot with IBM Watson?
IBM Watson is an AI conversational engine for building applications that can understand and respond by using natural language. It uses Artificial Intelligence and cognitive computing technology to create a self-learning chatbot. Thanks to natural language processing and machine learning, it can answer complex questions within seconds. IBM Watson engine allows chatbots to form a human-like interaction by analyzing lots of data to simulate the human brain’s functions. Chatbots, fuelled with IBM Watson engine, can learn from structured and unstructured data, understand the context of this data, and give precise answers by using machine learning and deep learning algorithms.
Here are a few steps that help with creating a self-learning chatbot based on IBM Watson engine.
How to start
When creating a self-learning chatbot, you first need to think of its purpose and capabilities of the platform it will be integrated with. It is also important to evaluate the technical and business requirements of the company. Understanding the users’ needs is also necessary, so you need to provide all features that make the experience more user-friendly. Think about the main purposes in which customers are using the current communication channels (chats, helpline, etc.). Finally, it would help if you imagined possible scenarios of conversation and possible answers for your chatbot.
To build a simple chatbot, you need to use Watson Conversation’s key functions. It is easy to build a bot that understands text messages and integrate them into the messaging app. It also includes natural language processing algorithms, with which you can create a structured conversation. Watson Conversation provides an API that you can use to integrate a bot with any website or app.
Intents are purposes that are expressed in a customer’s input, such as answering a question or processing a bill payment. In other words, just as in a regular conversation, a human brain has to identify what does the user really want, a chatbot has to be able to identify an intent from a flow of words. By recognizing the intent, Watson Assistant can choose the matching dialogue flow as a response.
To start a conversation, you need to create intents. Try to think about your customers’ needs. Do the research and find the most common problems related to customer care. Summarize all your products and services that could serve your customers and improve their overall experience. The more customers’ needs you identify, the more Watson can be of service.
Intents help Watson with understanding what the possible user intentions are and allow him to respond accordingly. It is important to mention that you don’t need to code to create a dialogue – the whole process is really user-friendly.
As an example, when you want your bot to answer a question about a money transfer, you need to create an intent like #I-want-to-buy-insurance. Then, to specify the request, you should add examples, like: “I want to buy a car insurance”, “Help me find the right insurance offer”, etc. These sentences help Watson understand the potential future request.
Entities contain information that is relevant to understand users’ intentions. Intents are like verbs, and entities are the nouns that specify each noun.
Creating entities allows Watson to get parameters and a specific context of users’ requests. By learning the meaning behind the intent, it can answer a question, even if it is asked differently.
For example, when a user wants to ask about an insurance offer, entities should indicate which offer it is about. So, you should add words that describe the specific parameters of an offer, like its name, amount, or what can be insured with it.
Building a dialogue
After adding intents and entities, you can start making conversations using the dialogue builder. The most important thing is to create the bot’s responses. Because Watson was trained to understand specific intents, it can recognize a question and give a proper response.
You can easily create a bot that can answer simple questions via a script. It needs a lot of dialogues for communicating with the users, which makes it difficult to scale. Also, when a user poses a question which is not mentioned in the dialogue builder, Watson is not able to answer that question because it does not know what kind of response to give. That’s why teaching your self-learning chatbot how to make a conversation is so important.
As an example, when a user asks, “I want to buy a car insurance”, Watson understands it and gives a previously prepared response, such as “What kind of car insurance do you want to buy?”. Then, after a few follow up questions, it can use the gathered data to show personalized insurance offers.
Training your self-learning chatbot
There is a three-step process of training a self-learning chatbot:
- Collecting the data that helps it understand the questions, and put it in the right context,
- Reviewing the data by repeating gained skills in each next conversation,
- Retraining itself based on the inputs from conversations.
You can train your bot while building a dialogue, but also after its implementation. Each question is being added to the adequate intent. That’s when you can see if your bot understands the context correctly. Watson enables a quick improvement of your bot capabilities and adjustment to users’ needs. When each new data is added, it can enhance the process of finding the correct answer. This improves the learning process of self-learning chatbot fueled by the Watson engine.
A final touch
You can teach your chatbot to analyze tones, emotions and writing style in written text. To make your chatbot more human-like, Watson makes it possible to respond differently depending on a specific emotion. For example, when someone is waiting for a long time for a response and becomes angry, the self-learning chatbot can adjust its tone to calm down the customer. In more complex dialogues, a bot can transfer the conversation to a human customer service employee. With this final touch, you can teach your self-learning bot different responses on different types of emotions, tones or writing styles.
Actionbot as an example of self-learning chatbots
Using IBM Watson engine as the basis, Actionbot is one of the most advanced self-learning chatbots on the market. It not only stimulates the human-like conversation, puts it in the appropriate context, but also, with the help of its automation skills, it can make the user’s intent real.
See the magic of Actionbot. Try out our operations automation demo