© Charles Waghmare 2019
C. WaghmareIntroducing Azure Bot Servicehttps://doi.org/10.1007/978-1-4842-4888-1_7

7. Create Solutions Using Chatbots

Charles Waghmare1 
(1)
Mumbai, India
 

In this chapter, we focus on how we can create solutions using chatbots and look at some best use cases of chatbots. The objective of this chapter is to bring insight to how chatbots are valuable solutions in a variety of situations, such as automating the password reset process, rendering a knowledgeable response, and searching for information. Chatbots are used as solutions to business problems across industries—from call centers to medical practices, from banking to insurance, from IT to manufacturing.

Utility Service Providers

Chatbots can be deployed by utility services such as electric, gas, and water providers to meet customer requirements on time and with satisfaction. With these types of services, customers often raise questions regarding the service, and queries need to be addressed accurately and in a timely manner. In case of a gas bill, consumers often ask why the consumption for the current month is more than the previous month. With regard to the electric bill, consumers might ask why, despite being on holiday for a couple weeks, the electrical bill did not go down. For water services, customers might inquire why the water pressure has been reduced for the past few weeks. To ask these questions, consumers send e-mail, Short Message Services (SMS), write letters, or make phone calls. However, it takes some time before their query is answered.

But with the evolution of chatbots, things have changed. Consumer queries are answered instantly. During real-time conversations, chatbots are able to query the consumer database in real time and provide accurate answers (Figure 7-1).
../images/478917_1_En_7_Chapter/478917_1_En_7_Fig1_HTML.png
Figure 7-1

Utility service provider chatbots

The telecom industry is very competitive as a result of multiple service providers that often have very big targets to provide services such as the Internet with high-quality bandwidth but at a discounted rate; to retain customers with excellent service, such as 24/7, 365-day support, and no downtime; and providers even offer gifts under the guise of customer loyalty programs. In this class of service, most frequently asked queries from consumers are: Why is my Internet not working? How can I upgrade my current subscription? What is my account balance? Companies used to have call centers to manage customer service; but, today, chatbots are used to manage such tasks in an efficient way (Figure 7-2).
../images/478917_1_En_7_Chapter/478917_1_En_7_Fig2_HTML.png
Figure 7-2

Telcom industry chatbots

Insurance Companies

Insurance companies around the world are constantly adopting different techniques to get more customers onboard and to retain existing ones. To do so, AI is being used to answer queries (Figure 7-3) such as: How do I file an accident claim? Does my policy cover workplace injuries? Does my existing policy cover my wife as well?
../images/478917_1_En_7_Chapter/478917_1_En_7_Fig3_HTML.png
Figure 7-3

Insurance company chatbots

Travel Agencies

Travel agencies—and specifically the airline industry—are often misjudged by most passengers for miscommunicating departure and arrival data, and other details. Now, chatbots are the preferred method for communicating details of flights, for example, and other related information (Figure 7-4).
../images/478917_1_En_7_Chapter/478917_1_En_7_Fig4_HTML.png
Figure 7-4

Travel company chatbots

Healthcare Industry

The healthcare industry has also adopted AI technologies to serve patients in a better way. Manual processes such as scheduling appointments, reminding patients of doctor follow-up appointments, and answering general queries on health-related matters can be done using chatbots (Figure 7-5).
../images/478917_1_En_7_Chapter/478917_1_En_7_Fig5_HTML.png
Figure 7-5

Healthcare industry chatbots

Financial Services

Using chatbots, digital banks have automated level 1 support, such as reissuing credit and debit cards; resetting account passwords; issuing checks; providing autodebit and bill-paying services; determining personal, mortgage, and vehicle loan eligibility; and more (Figure 7-6). Some banks, such as Citibank, have maximized their online operations and have limited the number of banks where customers can conduct their financial business. Banks such as HDFC have been performing credit card operations in an online manner.
../images/478917_1_En_7_Chapter/478917_1_En_7_Fig6_HTML.png
Figure 7-6

Financial service provider chatbots

Protection against Fraud

A chatbot can be used to detect fraud. For example, when a customer requests a PIN, the chatbot can be configured to request the customer to answer security questions. An online transaction password is then sent to the account holder’s e-mail or through an SMS. When both of these are verified, the account holder can view the account and make transactions from it (Figure 7-7).
../images/478917_1_En_7_Chapter/478917_1_En_7_Fig7_HTML.png
Figure 7-7

Financial fraud detector chatbot

If incorrect information is entered, the chatbot can inform the user of this and assign a human banker to assist.

Designing Solutions Using Azure Chatbots

In this section, we design solutions using Azure chatbots. Let’s start with task automation. The task automation chatbot helps users perform single or multiple tasks without any assistance from human beings. This type of chatbot appears in web sites or mobile apps and communicate with users using rich user controls and text. Such chatbots are enabled with NLP understanding to build engaging conversations. Let’s look at a password reset example.

Password Reset Use Case

To understand more fully the nature of a task bot, consider the following password reset use case. Nowadays, IT service departments get multiple requests for directions on how to reset a password. The task is simple to execute, and team members spend large amounts of time handling these mundane requests. This task can be managed easily using a chatbot. In the following exchange, Adam is the chatbot and Bobby is the user:
  • Adam: Hello, Bobby! How can I can help you? Choose one option.

  • Password reset | Need help desk contact number | Need LAN cable

  • Bobby: Password reset

  • Adam: You request has been processed successfully.

  • Adam: Use Test123 as a temporary password. You will be asked to change your password after you have logged in using the temporary password.

  • Adam: Have a good day.

  • Bobby: Super!

Some might ask: If a chatbot resembles a mobile app or web site, why not just build the web site or mobile app instead of a chatbot? Building a mobile app or web site instead of a chatbot is a choice made by an organization. But, if you look at the situation from a design perspective and consider the amount of time and money required to develop the three options, chatbots are much cheaper and may not require a complex design. Furthermore, chatbots can be made available in a web site or mobile app to create a conversational experience with the user community. As mentioned previously, you can do this using the Microsoft Bot Framework direct-line API or web chat control. Thus, chatbots are a simple way to resolve complex problems, such as resolve consumer queries in utility business; manage tasks efficiently in a 24/7, 365-day support services environment, help people file insurance claims with supporting information, get real-time details of flights during travel, schedule doctor appointments, answer health-related queries, reset passwords, and protect against fraud in financial services.

Embed a Chatbot in a Web Site

In general, chatbots reside outside web sites or mobile apps, but there are several examples when chatbots are embedded in web sites or mobile apps so that users can seek information in the most efficient way. Sometimes, as a result of the complex structure of a web site, users are unable to find the information they need. Using a chatbot, however, they can engage in a useful conversation to get information. As we have seen, chatbots can resolve simple issues and hand off more complex issues to human agents. In this section, we look at the integration between chatbots and web sites, and the process of using back-channel mechanisms to facilitate communication between chatbots and web pages. Microsoft provides two ways of integrating chatbots with web sites: Skype web control and an open source web control.

Skype Web Control

The Skype web control is essentially a Skype client in a web-enabled control. Built-in Skype authentication enables the bot to authenticate and recognize users without requiring the developer to write any custom code. Skype automatically recognizes Microsoft accounts used by its web client.

Skype web control acts as a front end for Skype, and the user’s Skype client automatically accesses the full context of the conversation, facilitated by web control. Even after a browser is closed, the user may continue to interact with the chatbot using the Skype client.

Open Source Web Control

An open source web chat control is based on ReactJS and it uses a direct-line API to communicate with the Microsoft Bot Framework. The web chat control provides a blank canvas for implementing a web chat, allows full control over conversational behavior, and offers a good user experience. Through back-channel mechanisms, the web page hosting the control communicates directly with the chatbot, which is invisible to the user. This capability enables a number of useful scenarios. For example, the chatbot can send relevant data to the web page, such as the user profile, and can send commands to the web page.

Here are useful capabilities of web control:
  • The web page can send relevant data, such as a GPS location, to the chatbot.

  • The web page can advise a user to a perform an action, such as select an option from a drop-down menu.

  • The web page can send an authorization token for the logged-in user

Back-channel Mechanism

As we just saw, an open source web chat control communicates with chatbots using a direct-line API, which allows an exchange of activities between the user and the chatbot. A common type of activity is messaging, and typing indicates that a user is typing or the chatbot is working to compile a response.A back-channel mechanism can be used effectively to exchange information between client or user and chatbot without actually presenting it to the user.

Embed a Chatbot Inside a Mobile App

Integrating a chatbot with a mobile app depends on the kind of mobile app we use. Check out the following:
  • Native mobile app : A mobile app created using native code can communicate with the Microsoft Bot Framework using a direct-line API or by using the REST API or web sockets.

  • Web-based mobile app : A mobile app built using web language and frameworks can communicate with the Microsoft Bot Framework using the same components as a chatbot embedded in a web site, which is encapsulated within a native app’s shell.

IoT App

An IoT app can communicate with the Microsoft Bot Framework using a direct-line API. It can also use Microsoft Cognitive Services to enable capabilities such as image recognition and speech.

Design Knowledge Chatbots

Knowledge chatbots are chatbots that provide knowledge-based responses to user queries. What will be the weather in the city next week? Which is the nearest coffee shop to my house? Which hit film is available in the nearest movie theater? Does my credit card offer access to the lounge facility at the airport? If a chatbot is designed to answer these questions, it is a knowledge chatbot. Knowledge chatbots are smarter and more powerful compared to FAQ-based chatbots, which are designed to answer with predefined replies. Regardless of their design, chatbots pull information from various relational databases and present it to users in an understandable format.

Search Using Chatbots

The search functionality is a valuable asset for chatbots. A standard search provides accurate results based on the input string entered by a user. For example, if a user enters “India” in the search results, entries with a precise match and close match to India appear. If a user asks a knowledgeable chatbot for information on music by Impala, the chatbot responds with relevant information, as shown in Figure 7-8.
../images/478917_1_En_7_Chapter/478917_1_En_7_Fig8_HTML.jpg
Figure 7-8

Search result from a knowledge chatbot

If the chatbot is unable to provide a precise match, it can present a result with the comment: “Here is the event that best matches your search” (Figure 7-9). Based on the accuracy of the search result, the chatbot can tailor communication while presenting results to the user.
../images/478917_1_En_7_Chapter/478917_1_En_7_Fig9_HTML.jpg
Figure 7-9

Search result with a match that is not precise

If there is no accurate or precise match, but a close match for a search string such as “confidence is low”, then the chatbot may respond with the search result: Hmm . . . were you looking for any of these events? (Figure 7-10).
../images/478917_1_En_7_Chapter/478917_1_En_7_Fig10_HTML.jpg
Figure 7-10

Search result with low confidence

Using Search to Guide a Conversation

If there is a motivation to build chatbots to enable basic search engine functionality only, then there is no requirement for a chatbot. A conversational interface offers multiple benefits that users cannot get from a typical search engine using a web browser.

Knowledge chatbots are most effective when they are designed to guide the conversation with a user. Conversation consists of an exchange between a user and a chatbot. During the conversation, the chatbot has the opportunity to ask questions, present options for selection, and validate outcomes, which a standard or basic search is incapable of doing. In Figures 7-11 though 7-14, the chatbot converses with a user using facets and filters until it locates the information requested by the user.
../images/478917_1_En_7_Chapter/478917_1_En_7_Fig11_HTML.jpg
Figure 7-11

Search result to guide user

../images/478917_1_En_7_Chapter/478917_1_En_7_Fig12_HTML.jpg
Figure 7-12

Search result to guide user

../images/478917_1_En_7_Chapter/478917_1_En_7_Fig13_HTML.jpg
Figure 7-13

Search result to guide user

../images/478917_1_En_7_Chapter/478917_1_En_7_Fig14_HTML.jpg
Figure 7-14

Search result to guide user

By processing the user’s input and presenting relevant options during the conversation, the chatbot connects the user to the information being sought. After the chatbot delivers this information, it can also provide guidance on more efficient ways to find similar information in the future. Check out Figure 7-15.
../images/478917_1_En_7_Chapter/478917_1_En_7_Fig15_HTML.jpg
Figure 7-15

Search result to guide user

Azure Search

Azure chatbots can be enabled with Azure Search to create an efficient search index that a chatbot can easily search, facet, and filter. Figure 7-16 shows an example search index created using Azure Portal.
../images/478917_1_En_7_Chapter/478917_1_En_7_Fig16_HTML.jpg
Figure 7-16

Search index in Azure Portal

To access all properties of the data store, set the property as “retrievable.” You expect to find musicians by name, so set the Name property as “searchable.” Last, you want to facet and filter over musicians’ eras, so mark the Eras property as both “facetable” and “filterable.” Faceting determines the values that exist in the data store for a given property. Figure 7-17 shows there are five distinct eras in the data store. Filtering returns only specified instances of a certain property. For example, you can filter the result set to contain only items where era is equal to “Romantic.”
../images/478917_1_En_7_Chapter/478917_1_En_7_Fig17_HTML.jpg
Figure 7-17

Faceting values

Transitioning Conversations from Bot to Human

In the last section of this chapter, we look at the situation when it is necessary to transition conversations from bot to human. Regardless of how smart you develop your chatbot using AI, cognitive services, and NLP, there are times where human intervention cannot be prevented.

Triage

In this situation, the chatbot provides a response to the user queries and later collects user data such as name, e-mail address, and any pertinent information related to the queries, then stores it in a database to transition conversation control to a human agent. Using a chatbot to triage information helps human agents work on the complex task to be addressed.

Escalation

Typically, in a help desk scenario, a chatbot may be able to answer basic questions and tend to trivial issues while performing simple operations such as resetting a user’s password. However, in a situation when the user issue appears to be complex and the chatbot is unable to manage it, a human must intervene. In these situations, the chatbot must understand the set of issues it can fix and those it cannot fix and thus requires a human agent. There are multiple ways chatbots determine that they need to transfer control of the conversation to a human.

User-driven Menus

One of the simplest ways for chatbots to handle user dilemmas is to present users with a menu of options from which they can select. Tasks that the chatbot can handle independently appear in the menu, along with a link labeled “Chat with an agent.” This implementation does not require advanced machine learning or natural language for understanding. The chatbot simply transfers control of the conversation to a human agent as soon as the user selects the “Chat with an agent” option.

Scenario Driven

The bot may decide to transfer control based on whether it determines it is capable of handling the scenario. The bot collects some information about the user’s request and then queries its internal list of capabilities to determine whether it is capable of addressing that request. If the bot determines that it is capable of addressing the request, it does so; if the bot determines the request is beyond the scope of issues it can resolve, it transfers control of the conversation to a human agent.

Supervision

In some scenarios, human agents prefer to monitor the conversation between the user and the chatbot instead of taking control. In the situation of a help desk, where a chatbot is communicating with a user to diagnose a computer problem, a machine learning model helps the chatbot determine the most probable cause of the problem. However, before advising the user to take a specific course of action, the chatbot can privately confirm the identified diagnosis and solution with the human agent, and then proceed with authorization. When the human agent authorizes the solution, the chatbot presents the solution to the user. The chatbot is still performing the majority of the work, but the human agent retains control over the final decision.

Summary

With this, we come to the end of this chapter. We saw examples of chatbots being used in different industries. We also examined how chatbots can be used to automate processes such as resetting passwords, providing useful information, searching using chatbots, and searching with chatbots using information embedded in web sites or mobile apps. Last, we studied when chatbots need to transition conversations to human agents to address complex queries.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.219.236.70