Building a Multi-purpose Chatbot integrated with Watson
In this use case we would like to present you to Bender, our inhouse chatbot. Chatbots have rapidly evolved over the past few years.
What first comes to mind when we talk about chatbots are a helpdesk chatbot which will provide you with the best suitable answer to your question or Siri which can tell you the weather of today. However, chatbots are increasingly useful in other business areas. When you integrate them with your architecture you can let them do all sorts of great stuff that saves time or provide insights. In this use case we integrated IBM Watson’s powerful question and answering-system as the basis for our chatbot.
Chatbots are software programs that are able to conduct a conversation with a user using text or audio. Although the user is communicating with a computer, chatbots give the impression you´re having a real conversation. They are an example of AI: they can understand natural language very well, detect multiple entities from the real world and are sensitive to context and dialog flow. Finally, they allow integration with text-to-speech and speech-to-text.
An AI-enabled event chatbot can act as an assistants to answer attendees’ questions on-demand, collect feedback, drive interaction, deliver personalized notifications, and help businesses offer personalized experiences to customers and unlock insights that make each interaction better than the last.
Over the last 2-3 years, chatbot adoption has been massive: many websites have a chatbot on their homepage, as do smart IoT devices. This use case is a good example of how chatbots can improve the use experience, showing how users can interact with their devices using voice commands instead of using mouse clicks, forms or a GUI.
Developers have many frameworks, chatbot services, and additional linguistic services at their disposal for creating chatbots. It’s easy to see why chatbots have become popular in a short time, as they offer large opportunities for businesses to grow, and consumer interactions through messenger apps to continue to grow. Experts say that the rise of messaging apps will converge with the adoption of AI and chatbots by businesses that utilize social media channels. Because of their advanced user interface, chatbots offer a good means of communication for many different applications.
How Chatbots Really Work
Chatbots are comparable to other software applications that collect, analyze and parse user input. Every chatbot has one or more purposes, whether it’s ordering food online or book a train ticket. A chatbot collects text or speech input from the user with the intent to realize this purpose. When the chatbot has collected and analyzed all required user input, action can be taken by the application: make a purchase or searching, post processing and displaying information requested by the user.
The following key concepts apply to each and every chatbot: intent refers to the purpose of the app. Before a chatbot is designed, its intent or goal needs to be clear. Utterances refer to user input, which can be text or natural language. Slots are the input data required to fulfill the intent, or the variables to be obtained from the user. Finally, fulfillment refers to the fulfillment mechanism for the user’s intent. This could be a summary of the user’s order or wishes, or a simple “thank you” message. These are business service calls that can be connected with one’s own services for requesting data.
Building Bender with Watson Integration
To gain more insights into chatbot technology, we did some market research into popular chatbot frameworks and service offerings, before building our own chatbot assistant named Bender. Amazon Lex, the motor behind Amazon’s Alexa Virtual Assistant, was examined, as well as Microsoft´s LUIS, Google Home and lesser-known alternatives such as Motion AI and MyCroft that runs on Python.
Finally, we chose IBM Watson’s powerful question and answering-system as the basis for our chatbot. IBM Watson is an IBM supercomputer that combines artificial intelligence (AI) and sophisticated analytical software for optimal performance as a “question answering” machine. Watson Assistant is a robust platform that allows users to collaborate in building conversational AI solutions.
IBM Watson only offers a “skeleton” that needs to be filled by developers: an empty brain or learning system that needs to be filled with intelligence. IBM Watson offers assistants for different services, such as customer care, automotive and hospitality. Also available are linguistic services such as sentiment analysis, translating audio to text and vice versa.
Bender consists of one dialogue with multiple branches that detect the user’s intent. The objective was to build a chatbot that generates and accepts both speech and text in English as well as Spanish. The application can be accessed through a web application, that connects to Watson Assistant service, which is a robust collaboration platform for building conversational AI solutions. It offers a graphical UI, powerful NLP and familiar developer features. This chatbot service was tested with their own services: the user could request a price list that was consulted by the chatbot. The pricing information was post processed by the chatbot and returned to the user.
The homepage of the web application shows two avatars that resemble the user and the chatbot. The user can choose out of eight different modes (or use cases): apart from creating a chatbot assistant, Bi4 Group created connections with its in-house technology stack and external APIs. The information received through the API is post processed by the chatbot and presented in an orderly fashion to the user. These integrations make that this particular chatbot is much more than just a simple single-purpose question-answering machine.
IBM Watson Assistant offers workspaces where the logic of the chatbot is designed. A developer needs to define multiple intents for which the chatbot can be used. For each intent, multiple phrases can serve as “user examples” that will be recognized by the system. This happens through “fuzzy matching”, a process where separate words from the user are matched by predefined user examples.
A similar process happens in the “entities” tab, where input values from users are used to match until all required slots are filled. For each slots, a set of synonyms are given, so that there’s a higher chance of finding a match. Because the application cannot continue until all slots are filled, a loop construction is implemented, requiring a developer to map out a tree or node structure that covers all possible scenarios before moving on. This happens in the “dialog” tab. If all slots are filled by the chatbot, the user receives a final message that summarizes all the information given by the user after which the conversation ends.