Chatbot

Chatbots…Automatic 24/7 Customer Service

IME introduces machine learning and artificial intelligence solutions, handling big data efficiently. Nowadays, automated customer services become highly required by different companies and service providers. Interacting with the machine through natural language is one of the requirements for so-called dialogue systems or chatbots in artificial intelligence. The machine can provides us with an informative answer, distinguish the context of the dialogue, and select the suitable response as the human. In this article, we will explain the chatbot functions and benefits from using it, exploring different use cases. Description of chatbot types and its components is also included, illustrating the main steps of building a chatbot, powered by a simple example.

A chatbot is a computer system that operates as an interface between human users and a software application, using spoken or written natural language as the primary means of communication [1]. Bots or “Conversation as a platform”, are quickly becoming the present, and a high demand in the future of modern user interfaces [2].

Conversational interfaces has been grown through stages: people to people, people to personal digital assistant, people to pots, and may be personal digital assistants calling on bots on your behalf in future. With aid of AI systems, we can develop comprehension, questioning and answering mechanisms, visual interaction systems and search tools, topic modeling and entity extraction, multi-turn dialogs, transaction processing, multi-modal conversations, and natural language generation.

Components of Conversational UI

Building a bot requires a variety of components and technologies such as natural language processing capabilities, a messaging platform, a conversation designer and an analytics engine to enable the bot to learn from the interactions.

Chatbots Benefits for Industries

chatbot
chatbot

Figure 1 Top industries using chatbots[5]

Several industries impacted by chatbots as shown in Figure 1. It is clear that E-Commerce, insurance and healthcare are the most domains that benefit from chatbots. These industries rely heavily upon the customer response in an efficient way to saves time and effort. According to a new survey, approximately 80% of businesses intend to integrate chatbots in business model by 2020. Some advantages of using chatbots are their accessibility at any time, handling capacity and answering many contacting people immediately, flexibility, and low cost. Chatbots can be an alternative sales channel leading to higher gains and achieving customer satisfaction. Moreover, they automate work and can be considered as excellent personal assistant.

Types of Chatbots

Rule-based: the simplest ones, also called  “scripted” [3]. Using “if-then” logic, basic conservation between bot and visitor can be built. Most social media chatbots are rule-based. Businesses like Sephora, Pizza Hut, and Whole Foods are among the companies that use Facebook Messenger to automate customer service, marketing, and online sales.

AI-based: Powered by Artificial intelligence, and more complex than rule-based bots. They are dynamic and do not depend on call-to-action buttons to map out visitor selections. AI-based can be further classified into Natural language chatbots and Machine learning chatbots. NLP bots assist machines to understand human language. Thus, creating a more personalized, human-like experience. Machine learning bots are similar to NLP ones, but they are optimized for learning about the visitor, retaining information and predicting a conversation’s next steps.

Application bots: hybrid of both scripted and AI-based chatbots. Both scripted and intelligent chatbots can have graphical user interfaces. Thus, application bots type is not a separate category of bots. The bots can be interacted with using a graphical user interface [4].

Components of a Chatbot & Terminology

  • Intent

When a user interacts with a chatbot, the intent means his intention from using the chatbot, and what is he asking for. For example, when a user says “Book a movie ticket,” to a chatbot, we can understand that the user wants to book a movie ticket, it could be named “book_movie” intent [5].

  • Entities

Intents have metadata about the intent called “Entities.” In the previous example, “Book a movie ticket,” booking a ticket could be an intent and the entity is “movie,” which could be something else as well, like flight, concert, etc. Entities could represent as a quantity, count, or volume. Intents can have multiple entities as well. For example: “Order me a shoe of size 8”, there could be two entities: category (shoe), and size (8).

  • Utterances

Utterances are different forms of the same question/intent your user may show. It is suggested to have an optimum 10 utterances per intent and a minimum of 5.

  • Training the Bot

Training process is essential for building a model that will learn from the existing set of defined intents/entities and utterances on how to categorize the new utterances and provide a confidence score along with it.

  • Confidence Score

Every time you can find what intent that an utterance may belong to, your model will come up with a confidence score. This score indicates how confident your chat model is about recognizing the intent of the user.

  • Building Chatbots

There are three steps should be followed before building chatbots [5]:

  1. Think about all the scenarios or tasks you want your chatbot to be able to do, and prepare all related questions in different forms that can be asked to do those tasks. Every task that you want your chatbot to do will define an intent.
  1. Each question that you list or intent can be represented in multiple ways. According to how the user expresses it. For example:
  • Alexa, Switch off the light.
  • Alexa, Would you please switch off the light?
  • Can you please switch off the light?

A user may use any of these sentences to instruct the bot to switch off the light. All of sentences have the same intent/task to switch off the light, but they are being asked in different utterances/variances.

Write all your logic to keep the user tied to the flow that you have chosen after you recognize the user’s intent. For example, suppose you are building a bot to book a doctor’s appointment, then ask the user to give a phone number, name, and specialist, and then you show the slots and then book it. In this case, you can expect the user to know such details and not try to accommodate all the things in the bot itself, like a specialist for an ear problem is called an ENT. The scope of your bot should be specified according to the time and resources you have to build the application.

Using Decision Trees

In the context of chatbots, a decision tree simply assists in finding the exact answer to a user’s question. A decision tree is a decision support tool that uses a tree-like graph or model of decisions and their possible consequences. Decision tree is used in constructing chatbots as in the following example.

chatbot
chatbot

Figure 2 [5]

 

In Figure 2, a simple flowchart  showed for a chatbot for buying clothes online. Remember to not be too stringent while creating a diagram; instead, keep it as simple as possible and then add the extended functionalities later. In the example, after creating the basic functionality, you can add color choices, price range, ratings, and discount options as well.

Data Integration

With the suitable integration development, a chatbot is able to answer complex enquiries by integrating with existing business systems easily [6]. Chatbots can handle transactions, and provide technical support. Moreover, they can authorize refunds or do come checks and validations, by connecting the chatbot with the entire business ecosystem-CRM, ERP, CMS, and other business applications.

Chatbot Use Cases

Chatbots have wide range applications. Used as personal assistants, customer support, marketing and commerce, etc.
Some examples of chatbot applications in different domains are as following [4]:

  • Restaurants: allowing customers to order from a chatbot, either in the store or at home.
  • A retail store: offering promotions for customers in the shopping and select goods through the chatbot.
  • A marketing campaign: by asking customers questions and expose to promotions using a chatbot.
  • An e-commerce purchases site: a chatbot can help customers make their orders and follow-up the delivery process.
  • Answering customer service questions and help to solve any problem or advice regarding the correct action.
  • Monitoring employees or customer’s satisfaction and their feedback.
  • Booking flights and receive relevant information in airports with the aid of a chatbot that helps customers.

References:

  1.  Galitsky, Boris. Developing Enterprise Chatbots. Springer International Publishing, 2019.‏ doi: https://doi.org/10.1007/978-3-030-04299-8
  2. Masood, A., & Hashmi, A. Cognitive Computing Recipes.‏ Apress, Berkeley, CA, 2019, doi: https://doi.org/10.1007/978-1-4842-4106-6
  3. https://learn.g2.com/chatbot
  4. https://botpress.io/learn/what-and-why#use-cases
  5. Raj, Sumit. Building chatbots with Python: using natural language processing and machine learning. Apress, 2019.‏
  6. http://www.thebotforge.io/wp-content/uploads/2018/05/Chatbots-for-business-Guide.pdf

Written by:

      Safaa Magdy