Chatbots can be created to serve different business goals. In 2017, many businesses have added chatbots to their customer communication routine in order to increase the number of clients, offer some entertainment, provide customer support and reduce expenses on a customer service personnel. There is one specific feature that makes them distinctive from other software pieces with a user interface. It is a direct natural-language interaction with users through a conversational interface in a messenger.
In this blog post, we’ll learn more about how chatbots are created and specifically how a chatbot can be programmed with the help of development frameworks to answer the needs of customers.
Building a chatbot sets different levels of challenges, starting from programming logic to capabilities of a messaging interface. A chatbot can be a very simple service that is powered by standard rules of if/else logic and responds to a limited number of specific commands. Or it can function using natural language processing that understands a user’s language (not commands) and grows smarter when it gets trained by learning from conversations with users. Such chatbots understand messages and give answers based on a user's intent that it concludes from a message.
In terms of technology, drag-and-drop and code-based chatbots are differentiated. Drag-and-drop bots are created using bot building platforms that typically offer templates that correspond a specific business purpose (e-commerce, customer support, surveys, marketing) and permit to build a chatbot with a predefined functionality, so a user has only to add the features they need their bot to have. These are popular among non-technical users and you can find a vast number of such building platforms on the Internet (e.g., Chatfuel, Motion.ai, Chattypeople).
Unlike DIY chatbots, code-based bots are programmed from scratch with the help of software frameworks (e.g., API.ai, web-based bot development framework purchased by Google, Facebook Bot Engine with Wi.ai NLP service, Microsoft Bot Framework with luis.ai NLP service) and include a built-in artificial intelligence technology.
To get a working chatbot, you need to have a developed web app for your specific bot, messaging platform connectors to get messages from chat platforms, NLP for message intent processing in a human language, and a server to ensure communication with the API.
But developing and adjusting chatbots for multiple messengers and bot SDKs can be complicated. Bot development frameworks were created as advanced software tools that eliminate a large amount of manual work and accelerate the development process. Such bot frameworks also have an emulator, easing up the task of BOT testing for a developers’ team through the cloud.
Among bot development platforms, Microsoft Bot Builder currently provides all necessary components to launch and maintain a high-quality chatbot. It is also one of the fastest and most scalable bot frameworks and is also an open source framework.
Microsoft’s bot framework includes two independent components such as Bot connector and an NLP component known as luis.ai. It can integrate with Skype, Slack, Facebook Messenger, Telegram, Webchat and SMS/email, covering the absolute majority of messaging platforms and working on smartphones, tablets and laptops.
Let’s see how our team used Microsoft Bot Builder to create a Skype bot that works with clients of a payout program for the elderly and at the same time makes it easy for our customer (bot administrator) to manage its functions.
At Onix, our developers' team has produced a chatbot based on Microsoft Bot Framework. Our task was to apply the technology of natural language processing and create a bot that can chat with existing customers (a payout program for retired individuals) and answer their questions regarding applicable options. The main goal was to make the chatbot ask additional questions for clarification and details, thus, help customers resolve their program qualification concerns.
For example, if a user has a question, "How can I use the program and receive a payout?" the chatbot can answer it only if it receives the following information from the user: 1) confirmation that this individual is a citizen of their country; 2) information about the individual's age; 3) the total amount of funds the individual has on their retirement savings account.
To solve this problem, Onix team suggested a method that can implement this bot behavior pattern. We have developed a structure for storing data, where questions are divided into simple and complex. If it is a complex question, it should contain parameters that chatbot users must answer first to get a reply from the bot.
To enable this question pattern for the chatbot, we have implemented a framework that consists of several parts:
It is the system's core that can process the logic of questions and give answers based on information it receives from a user.
It is the layer that connects different NLP services. For our chatbot, we have chosen Microsoft's luis.ai. But when the need for more messaging platforms arises, we will easily integrate the system with other frameworks, such as api.ai, wit.ai, cloud.google.com.
For our customer, we have implemented the administrative part, where they can add new questions to NLP on their own for the bot to answer.
We have also implemented a system that improves the bot’s ability to understand questions that educate LUIS service on an ongoing basis. So, if a customer asks a question that the NLP can’t clearly understand, the bot asks another clarifying question, suggests a number of possible answers and asks to choose the most appropriate one. This data is then directed to luis.ai with the indication of what type of question the customer asked and the bot’s understanding skill improves.
Microsoft Bot Framework has helped significantly improve the chatbot because such bots are intelligent, responsive and scalable and interact with a user naturally.