Chatbots and the Open Source Tools You Can Use to Develop Them

0
18150

A chatbot is a computer program or embedded artificial intelligence that can conduct a conversation using auditory or textual methods. Chatbots are also known as smartbots, interactive agents or artificial conversation entities. Let’s explore a few of the top open source tools for chatbot development.

The word ‘chatbot’ is derived from ‘chat robot’ which allows for highly engaging, conversational experiences, through voice and text. A chatbot can be customised and used on Web browsers, smartphones and other popular messenger-based platforms like Facebook Messenger or Slack. It attempts to simulate the conversation or chatter of a human being through text or voice interactions. A user can ask the chatbot a question or give it a command, and it responds by performing the requested action. Being a computer program, a chatbot is regarded as an example of artificial intelligence. It is typically designed and used in dialogue systems for customer care applications or information-acquisition-cum-knowledge-discovery. Chatbots also make use of natural language processing (NLP) and respond with the most matching keywords or similar patterns of action from a database.

The concept of the chatbot was proposed by Michael Mauldin in 1994 to define conversational programs. Today, chatbots are popularly accessed through virtual assistants like Google Assistant, Apple Siri, Microsoft Cortana, Amazon Alexa, Samsung Bixby and even Facebook Messenger. The history of the chatbot is quite fascinating–various chatbots have been designed in the past, starting with ELIZA back in 1966, PARRY in 1992, A.L.I.C.E, Jabberwacky and D.U.D.E, etc. Of these, ELIZA and PARRY, which were used for typed conversations, were most popular.

As per the 2017 Global Human Capital Trends Report, 41 per cent of the chief executives of companies claim to have implemented chatbots already or to have prepared cognitive AI technologies to be implemented in the near future. Another 34 per cent of the companies have already launched the pilot prototypes. According to Gartner, chatbots will be involved in 85 per cent of all types of business-customer interactions by 2020. A report from Radiant Insights states that the chatbot market will grow at a CAGR of 24.43 per cent in the period 2018-2022 due to the increasing popularity of various messaging services. Another report by Transparency Market Research mentions that the global chatbot market in 2015 was valued at US$ 113 million and the CAGR from 2016 to 2024 will be 27.8 per cent. It has also been predicted that the global chatbot market could reach US$ 994.5 million by 2024.

The ultimate purpose of a chatbot is to conduct a conversation that allows people to access the desired information with a high level of accuracy using a lightweight messaging application. Chatbots can be classified into the following two categories.

  • Rule based chatbots: These work like interactive FAQs. They are programmed to recognise certain terms and patterns, from which they can respond to the end user using pre-set answers.
  • AI chatbots: These chatbots act as artificial brains and use sophisticated cognitive and natural language processing capabilities. AI chatbots can understand requests along with context, intent and emotion, making use of machine learning and deep learning techniques to become smarter, and conduct more elaborate, real-time conversations.

The process of creating a chatbot

Similar to the process of designing any software or website, developing chatbot based software involves following a series of steps. Figure 1 highlights the stages of chatbot development.

Figure 1: Chatbot development

Stage 1 – Plan: It is very important to have an in-depth understanding of the goals, processes and user requirements of the chatbot before starting development. It is also important to review all the design guidelines for stability and to check if they meet the requirements of the chatbot. The bot should be designed with speech and natural language processing capabilities, in order to offer Q/A solutions to end users.

Stage 2 – Build: Chatbots bring in a conversational interface for the platform and end users to interact, and to send or receive messages. The following functionalities should be added to the chatbot to make it a complete build.

  • Natural language processing makes the bot understand language, detect spelling mistakes and identify the users’ requirements.
  • Answer-processing: The chatbot needs a strong knowledge base to handle the real-time queries of the user in a natural way.
  • Manage multiple models: The chatbot should be able to decide which bot ought to interact with end users using intelligent algorithms if an organisation has multiple bot based applications.
  • GUI interface: A simple and interactive GUI is required for a rich user experience.

Stage 3 – Test: Like any other software, the bot application requires in-depth testing so that all errors or bugs can be identified and removed, making it operate intelligently in real-time applications. To test the bots, developers can make use of any of the following methodologies.

  • Using an emulator: An emulator is a testing technique to test bots locally. The bot framework emulator is a standalone app that not only provides a chat interface, but also debugging and interrogation tools to test the bot’s functionalities. Many bots can be tested simultaneously, using the emulator, during the development stages.
  • Web based testing: Developers can make use of the Web to test the bot’s functionalities. The Web based chat is the best interface to interact with and understand the functionalities of the bot, test the live code, detect any unusual activity and then debug it.

Stage 4 – Publish: After testing, when the chatbot is ready for launch, it can be published using an online website or a data centre. Traffic can then get directed to the chatbot when an end user opens the website.

Stage 5 – Connect: It is quite important to connect the chatbot to various online apps like Skype, Facebook, WeChat, etc, to send and receive messages from all the different platforms.

Stage 6 – Evaluate: With the data collected over a certain time period after implementation, the developers can detect any errors, and use feedback to improve both performance and capabilities. With analytics, developers can get conversational-level reporting, message and channel data for further development.

Chatbots: Working, training and workflow methodologies

Chatbots work faster than normal human beings. An end user can ask a question to a chatbot that is nourished with a huge knowledge base and conversational logs, from which it can immediately understand the requirement of the user and answer the queries.

A chatbot acts like a typical software application. It has an app layer, a database (knowledge base) and APIs to call other external administrators. Most of the bots are trained using past information so organisations have discussion logs to upgrade the chatbot’s capability. Developers use these logs to analyse what clients are trying to ask. With a blend of machine learning tools and models, developers coordinate client inquiries and reply with the most appropriate answer. Figure 2 highlights how a chatbot works.

Architecture and workflow models of chatbots

Listed below are the three ways in which chatbots work.

Pattern matching: This is used to perform text grouping and to produce the desired response to the clients. In this model, Artificial Intelligence Markup Language (AIML) is used to model the patterns. As an example, an end user may ask the chatbot, “What is the capital of India?” And the bot will answer, “According to Google/Wikipedia, New Delhi is the capital of India.”

For every sort of question, a pattern must be accessible in the database to give a reasonable response. With a number of pattern combinations, the bot makes a hierarchical structure. Various pattern matching algorithms are used to classify and produce the most efficient structure.

Natural language understanding (NLU): In this method, the following help the chatbot’s functionality.

Entities: The type of chatbot and how it works in real-time, e.g, a chatbot that handles technical support for laptop customers.

Context: When a natural language understanding algorithm examines a sentence, it doesn’t have the historical backdrop of the user’s text conversation. This implies that, if it gets a response to a question it has been recently asked, it won’t recall the inquiry. So, the conversations in this method are stored under separate categories, such as “Ordering Pizza.”

Expectations: A chatbot should answer all the queries of the end users, for instance, during an online shopping interaction.

Natural Language Processing (NLP): This converts the user’s speech or text into efficient structured data, and then the analysis of the data is used to provide the relevant answers. This includes the following steps.

Tokenisation: The NLP separates a series of words into tokens or pieces that are linguistically representable, with a different value in the application.

Sentiment analysis: It will study and learn the user’s experiences, and transfer the inquiry to a human when necessary.

Normalisation: This program model processes the text to find out the typographical errors and common spelling mistakes that might alter the intended meaning of the user’s request.

Named entity recognition: The program model of a chatbot looks for different categories of words, similar to the name of the particular product, the user’s address or name, or whatever information is required.

Dependency parsing: The chatbot searches for the subjects, verbs, objects, common phrases and nouns in the user’s text to discover the related phrases that the users want to convey.

The advantages of chatbots

The following benefits can be derived from chatbots in real-world applications.

  • Availability: Chatbots, being AI driven software, are operational and ready to engage with end users 24×7, 365 days a year, with instant replies, and can handle a high volume of tasks.
  • Increased efficiency: With chatbots, faster service can be delivered by eliminating all sorts of manual processes. Besides, with automation, overall costs have decreased. Personnel can now work on strategic business functions, which helps to control overall labour costs.
  • Better customer support: With chatbots, businesses get better clarity about their customers’ requirements, as the bots provide better answers to users. With the passage of time, using machine learning and deep learning techniques, chatbots become intelligent by gaining an in-depth knowledge about customers.
  • Platform flexibility: Chatbots can be designed on varied platforms, and easily adapt and integrate with dynamic business operations to meet customer requirements in whatever platforms they are native to.
  • Endless support and strong programmability: Bots are as yet incapable of handling customers who sometimes lose their patience. But since they are on digital platforms, where people now spend a majority of their waking hours working, they can be best used to automate common tasks such as arranging meetings, providing advanced search functionality, and so on.

Real-time chatbot applications

Table 1 highlights the major use cases of real-time chatbot applications.Open source chatbot platforms

A chatbot platform or chatbot software is a computer program designed to simulate an intelligent conversation with one or more humans using auditory or textual methods. It is programmed with artificial intelligence (AI) that enables it to conduct a conversation in the same way as a human would. Chatbots are designed to handle enquiries by responding in the same way as a person would. The most effective and convincing systems have complex natural language processors (NLP), which may even display a human face and be able to understand almost any form of input, and respond appropriately.

A chatbot development platform is a tool using which one can create a chatbot. The number of chatbot-related technologies is already overwhelming and growing each day. With chatbot applications, chatbot builders, social messaging platforms, chatbot analytics, and natural language processing (NLP) and machine learning (ML) tools, there is a lot one needs to wrap one’s head around prior to deciding on the best chatbot platform. Lots of commercial and open source options are available. In this article, we list the top open source chatbot development platforms that developers can choose from, based on their requirements and area of expertise, to develop efficient chatbots for enterprises and other clients.

Botkit

Botkit is regarded as a leading open source development tool for building chatbots, apps and custom integrations for major messaging platforms; it was built by Howdy in Austin, Texas in the US. It provides a strong base for developers to make bots for Facebook Messenger, Slack, Twilio and many more platforms. Botkit provides a strong platform to create intelligent conversational applications that map the way real humans speak.

It includes a variety of useful tools like Botkit Studio, boilerplate app starter kits, a core library, and plugins to extend the bot’s capabilities. Botkit is built on Node.js, making it developer friendly. The Botkit platform supports natural language understanding through the use of middleware, and supports IBM Watson conversation service, Microsoft LUIS, API.AI, Recast.AI and wit.AI.

Core features

  • Eases the process of designing and running bots that reside inside Slack, as it provides a semantic interface to send and receive messages so that developers can focus on creating novel applications and experience
  • Built-in stats and metrics
  • Powerful open source libraries
  • Fully-featured SDK with support for all major platforms
  • Consists of content management, design tools along with plugins and middleware

Latest version: 0.6.19

Official website: https://botkit.ai/

Botpress

Botpress is an open source bot development platform written in Typescript. It consists of various open source modules built by the community. It is lightweight, blazing fast and has zero system dependencies except Node.js. Botpress includes modules for both Messenger and Slack, so the developer has to just swap one module for another, while the rest of the implementation stays the same.

The backend of Botpress runs on Node.js and SQLite and, in the near future, PostgreSQL will be available. The frontend of Botpress runs on React/Redux/Bootstrap, and consists of all sorts of cool libs like Socket.IO, Lodash, Axios, JWT, Knex and Bluebird.

Components of Botpress

  • Flow Editor – Flexible conversational flow management system
  • NLU – Understands the definition and intent behind every message
  • Analytics – Makes bots intelligent from time to time
  • Multi-channel – Compatible with popular messaging apps
  • Authoring UI – GUI interface
  • SDKs and APIs – Extensible and customisable

Core features

  • Available under AGPL and Botpress proprietary licence
  • Easy to learn and developer friendly
  • Code-first bot building framework
  • Modular design via specialised open source modules and free to most users
  • Highly productive and extensible

Latest version: 10.50.0

Official website: https://botpress.io/

Figure 2: How a chatbot works

BotMan

BotMan is a PHP chatbot framework designed for task simplification in order to develop innovative chatbots for multiple messaging platforms like Slack, Telegram, Microsoft Bot Framework, Nexmo, HipChat, Facebook Messenger, WeChat, and many more. It supports advanced features like middleware systems, NLP, and user information storage and retrieval.

BotMan provides built-in support for the api.ai NLP service. BotMan Studio—a packaged BotMan and Laravel application—provides testing tools, an out-of-the-box Web driver implementation, and additional tools like easier driver installation and configuration support. BotMan Studio can speed up development by providing a Web driver implementation, which allows you to develop your chatbot locally and interact with it through a simple Vue.js chat widget. This lets you communicate with your bot without deploying it.

Core features

  • Support for Facebook, Telegram, Slack and other messaging apps to send file and audio attachments
  • Support for Kik and Facebook Referral driver
  • Support for developers to create customised middleware

Latest version: 2.0

Official website: https://botman.io/

VISEO Bot Maker

VISEO Bot Maker is primarily a visual interface that allows users to design drag-and-drop conversations. It also connects to multiple messaging channels, including Facebook Messenger, Slack, Kik, Skype, Telegram, WeChat, Google Home/Assistant, Amazon Alexa, and Microsoft Cortana. It combines artificial intelligence, natural language processing, automatic translation, language detection, and computer vision, and also connects to enterprise core information systems, such as those for customer relationship management (CRM) and enterprise resource planning (ERP).

VISEO Bot Maker provides a wrapper of the MS Bot Framework, which handles up to 12 different channels including Facebook, Skype and Slack. It provides an open API to connect custom channels.

The bot wrapper can build a message from input data and then handle the response from the message nodes.

The dialogue flow (aka API.ai server) node is an implementation of the bot wrapper dedicated to the dialogue flow (and so Google Home).

The WeChat node is an implementation of the bot wrapper dedicated to WeChat.

This open source platform provides lots of nodes to manipulate and design conversations.

  • Speech recognition tools like Bing Speech and Google Speech use AI to convert audio buffer to raw text.
  • Natural language processors (NLP/NLU) like DialogFlow and LUIS use AI to convert raw text into intents and entities.
  • Computer vision systems like MS Cognitive Services and Google Vision use AI to convert images into meaning.
  • Analytics like Face Book Analytics and Azure App Insight forward bot behaviour to the dashboard to manage key performance indicators.

Core features

  • Easy to use and developers can write, modify and build chatbots with a rich user experience
  • Open source and a fully secure platform to design secure bots
  • Seamless delivery of chatbots on varied messenger and voice assisted channels

Latest version: 0.0.3

Official website: http://bot.viseo.io/

Rasa Stack

Rasa is an open source chatbot development framework. It has two major components — Rasa NLU and Rasa Core, both of which allow for more human-like dialogue, and can be trained using interactive and supervised machine learning.

Rasa Core is a framework for building a conversational chatbot. It picks up patterns from real conversations; it also uses history and takes the external context of conversations into account.

Rasa NLU is an open source tool for intent classification and entity extraction, and offers NLU for bots and assistants. It turns natural language into structured data. It is modelled as a set of high-level APIs for building one’s own language parser using existing NLP and ML libraries.

The major advantage of using Rasa Stack is that it can be deployed on your own server and hence enable you to keep all the components inhouse. It is possible to use Rasa Core or Rasa NLU separately. Rasa is production-ready and used in large companies everywhere.

Rasa Core supports Facebook Messenger, Rocket Chat, Slack, Telegram and Twilio.

Rasa is available under two licences. Rasa NLU and Rasa Core are open source and written using the Python language.

Core features

  • Rasa’s framework context and dialogue management learns real conversations and improves performance without any code modifications
  • Trains custom language models for high performance
  • Saves time by reducing the need for training because of the use of built-in and pre-trained entities
  • Machine learning models are fine tuned by its own custom model and domain for peak performance
  • Open source, on-premise and highly extensible framework compared to commercial chatbot frameworks

Latest version: 0.11.12

Official website: https://rasa.com/

Microsoft Bot Framework

This is an open source bot builder SDK that enables developers to build simple to high-end intelligent dialogues. Microsoft offers the Azure Bot Service which provides a scalable, integrated, connectivity and development service environment to create intelligent chatbots that can engage users across multiple platforms. It allows developers to speed up the development process. The Azure Bot Service has two components:

  • Microsoft Bot Framework connectors
  • BotBuilder SDK

Microsoft Bot Framework is a platform for building, connecting, testing and deploying powerful and intelligent bots on websites, apps, Skype, Slack, Facebook and many more platforms.

The BotBuilder SDK supports C#, JavaScript, Python and Java. The conversation can use simple text or more complex rich cards that contain text, images, and action buttons. The SDK also includes an emulator for debugging your bots, as well as a large set of sample bots that you can use as building blocks.

Microsoft Bot Framework connectors and BotBuilder SDK are the ideal solutions to consider when you are developing an omni-channel chatbot. It’s very easy for the developers to connect the BotBuilder SDK with any natural language understanding (NLU) service. The BotBuilder SDK GitHub account has many code samples and templates which help developers to get started quickly.

Core features

  • Conversational intelligence with language understanding services
  • Converts speech to text and back to speech to understand user intent
  • Uses the Bing Web Search API to search from billions of Web documents
  • Easily evaluates sentiment using the Text Analytics API
  • Powerful cognitive service

Latest version: SDK4

Official website: https://dev.botframework.com/

LEAVE A REPLY

Please enter your comment!
Please enter your name here