Designing a chatbot with IBM Watson Assistant
By: Ernese Norelus
Tags: Design Thinking, Design, Artificial Intelligence, Chatbots, Bots

Chatbot, also known as “conversational agent”, is a trending technology. Chatbots are changing the business landscape. Its emergence in the enterprise has several implications that require some thought. Building a bot is not a hard task; with the rise of many platforms, it’s now easier than ever to develop and deploy one. The challenge with chatbots lies in delivering a good user experience, and they only present opportunities if done right. But, designing a conversation that meets consumer needs and returns real business value requires a nuanced strategy and in-depth considerations. The experience you are creating for your clients is paramount. Before moving quickly to development, figure out the problem areas that you, your users, and your employees are struggling with, and if a chatbot is the best fit to meet everyone’s needs. *

Deploying chatbots in the enterprise raises a host of potential issues that inevitably affect the deployment of enterprise software, including performance, scalability, and especially security. Enterprise chatbots may require access to user credentials, profile information, and enterprise data to perform useful functions. Any chatbot initiative must comply with enterprise cybersecurity standards. *

In this post, we’ll be taking a look at addressing some of these concerns and show how to design a chatbot using IBM Watson Assistant.

Figure 1: IBM Watson Assistant meet IBM Enterprise Design Thinking

What is exactly a chatbot?

In general terms, a chatbot is an artificial intelligence (AI) conversational agent, which conducts conversations via text or voice commands in a natural language conversation. It communicates and performs basic tasks such as answering questions or placing product orders. Chatbots’ primary purpose is to streamline interactions between people and services through messaging applications, websites, mobile apps, or through the telephone and interactive voice response (IVR). Other options include:

Used for service or as a marketing tool for engagement

Provide content, facilitate a purchase, or connect with consumers

Combine the ability to scale and personalization

Provide support

Suggest product recommendations

Leveraged for conversational marketing campaigns

The goal is to have chatbots written in a way to mimic spoken human speech to simulate a conversation with a real person performing any task. Chatbots can learn. Should you feed it a large number of conversation logs, the bot could be trained in a way to understand what type of question needed and what kind of answers to answer. Eventually the bot can be trained enough where you could not tell it is a bot.

“A computer would deserve to be called intelligent if it could deceive a human into believing that it was a human” — Alan Turing

These conversational bots are getting smarter. They are less prone to errors based on how they are trained. Hence, they can provide better customer experience and can help establish a better brand. There are tons of services to help you build chatbots, each with varying degrees of control, and these services have also become increasingly sophisticated. Unlike as seen in countless movies with “science fiction” depicted as awkward speech with robotic cadence, chatbots have come a long way! It’s safe to say that chatbots are still growing. Bots are available 24 hours a day, 7 days a week, 365 days a year and are capable of answering customers’ questions much quicker than human agents can.

Is chatbot the right solution?

Don’t build a conversation for building’s sake. Stall the idea of a conversation agent as a solution before clearly identifying what is it that you’re trying to achieve. First, ask yourself a few of these questions:

What is the focus area of the business that needs improvement now?

Who are all the users and stakeholders involved in this area, and how are they interacting with each other?

What’s not working for them? Why are they struggling?

What is the desired business outcome if we can change that?

If you already have a chatbot/conversation agent operating today, ask yourself:

Are they performing up to expectations? Are they meeting your KPIs?

Are users getting helpful answers?

Is the conversation designed well to serve the users needs?

Also think about potential pitfalls of chatbot:

Can bots put people at risk?

How are the bots trained and do they contain biased information?

Align together towards the vision

Once you have a clear business fit for a chatbot, then invite the stakeholders and sponsor users to a design thinking workshop. In this workshop, have the participants go through convergent and divergent activities to understand, explore, and define how chatbot fits into improving user experience. Use activities like Empathy Map and As-Is Scenario to understand the pain points experienced today. Identify areas where a conversational agent can help to improve the experience; look for areas where the user is asking the most questions and are the most confused and frustrated. These areas will be good candidates for where a chatbot can help. Then, prioritize with the team on which of the identified pain points will be the most important and feasible. Using the prioritized pain points as a guide, discuss and identify content, information, questions, and answers that could alleviate the pain points. Identify top priority areas that are the most import to your personas.

Dialogue design

In this blog, we will use IBM Watson Assistant to design a conversation. The archetypal chatbot consists of 3 specific concepts: intents, entities, dialog, as described in detail below. Let’s design a chatbot for your business and understand what it takes to create a purpose-built one that also delivers a superior conversational experience.

Figure 2: A typical approach used when deploying Watson Assistant

Intents

An intent is a purpose or goal expressed in a customer’s input, such as answering a question or a pressing a bill payment. By recognizing the intent expressed in a customer’s input, the Assistance service chooses the correct dialog flow for responding to it.

An intent is a category that defines a user’s goal or purpose

or These categories are trained using representative examples

Recognizing the intents does not require knowing the specifics of the user request — it is a way to guide the dialog flow in the appropriate direction

Entities

An entity represents a class of object or a data type that is relevant to a user’s purpose. By recognizing the entities that are mentioned in the user’s input, the Assistance service can choose the specific actions to take to fulfill an intent. It’s also Watson’s way of handling significant parts of an input that should be used to alter the way it responds to the intent.

Entities are the subjects of intents

Entities are specific values that clarify user intent and trigger fine-tuned actions and responses

and trigger fine-tuned actions and responses For each value, you can include a list of synonyms to capture the possible varieties in user expression

to capture the possible varieties in user expression Entities represent information in the user input that is relevant to the user’s purpose.

System entities

System entities are common entities created by IBM that could be used across any use case. They are ready to be used as soon as you add them, such as:

@sys-date

@sys-time

@sys-number

Dialog

The dialog component of the Assistance service uses the intents and entities that are identified in the user’s input, plus context from the application, to interact with the user and ultimately provide a useful response. The dialog is represented graphically as a tree, so create a branch to process each intent that you define.

The dialog node is made of a trigger and a response, where the trigger is the condition

Dialog matches intents (what users say) to responses (what the bot says back)

Each dialog node contains, at a minimum, a condition and a response

The dialog response defines how to reply to the user

Figure 3: Depiction of a simple dialog

Slots

Add slots to a dialog node to gather multiple pieces of information from a user within that node. Slots collect data at the user’s pace. Details the user provides upfront are saved, and the service asks only for the details they do not. Slots…

Reduce development time

Get the information you need before you can respond accurately to the user

Answer follow-up questions without having to reestablish the user’s goal

Identify the type of information you want to extract from the user’s response

Our experience designing a chatbot

For a delightful user experience, you can’t run away from asking these core questions at the heart of your design, and each question needs to be carefully and meticulously considered with the different facets:

Is my product well-suited to be a bot?

How to design a meaningful conversation?

Will the chatbot understand the messages it receives?

How to create a simple design for an immediate and direct solution to a person’s problem?

Will the design solve the problem reliably?

What are the logical conversation path(s) for users to follow?

What are the integration points?

Can the bot handle more complex queries and tasks?

What user pain point does it solve?

What type of friction will it remove from the current process?

How to prevent the chatbot from asking the wrong questions and collecting unnecessary information?

When to override the bot (and allow for a graceful failover)?

Figure 4: Steve Jobs’ quote

Chatbot conversational flow

A chatbot conversational flow works like a decision tree, which gives you a comprehensive list of decisions, events, and outcomes as depicted below:

Figure 5: Basic transactions for a banking use case.

Prerequisites

To follow along, you are required to have these accounts and tools in place:

Start with an account on IBM Cloud. It’s free of cost to start with.

Setup Watson Assistance

If you want to follow along, the full solution can be found at the link: Create a banking chatbot with FAQ discovery, anger detection, and natural language understanding.

Figure 6: Watson banking chatbot

Steps to creating successful chatbots

Identify the problem to be solved and use case

Choose the channel for your bot (e.g. Facebook Messenger, Skype, Slack)

Choose the right use case for your bot

Choose the services you will use to build your chatbot (in this case we are planning to use IBM Watson)

Emulate conversations to train and retrain bot.

Test

Launch and learn

Included components:

IBM Watson Assistant: Build, test, and deploy a bot or virtual agent across mobile devices, messaging platforms, or even on a physical robot

IBM Watson Discovery: A cognitive search and content analytics engine for applications to identify patterns, trends, and actionable insights

IBM Watson Natural Language Understanding: Analyze text to extract meta-data from content such as concepts, entities, keywords, categories, sentiment, emotion, relations, and semantic roles, using natural language understanding

IBM Watson Tone Analyzer: Uses linguistic analysis to detect communication tones in written text

Node.js: An asynchronous event driven JavaScript runtime, designed to build scalable applications

Conclusion

In recent years, AI and machine learning have changed the way we go about our day-to-day business. Chatbots have conquered the market. No longer a nascent technology, chatbots are now mainstream. Its business impacts include breakthrough across different industries, such as financial services, retail, oilfield services, hospitals, and insurance companies. The chatbots market was worth USD 1274.428 million in 2018 and is projected to reach USD 7591.82 million by 2024, registering a CAGR of 34.75% over the period (2019–2024). According to IBM in 2017, 265 billion customer requests are recorded per year and businesses spend nearly $1.3 trillion to service these requests. Using chatbots can help them save up to 30% of this.

On a closing note, if you asked me the question, “Are chatbots a must-have?”, you can extrapolate and figure out on which side of the track that I’m seating! Chatbots are here to stay!

Food for thought: Intelligence of Chatbot

Can bots communicate intelligent insights?

Is Human Intelligence underrated? Is Artificial Intelligence overrated, an actual breakthrough, or still in its infancy?

Will bots eventually be equipped to deal with complex issues such as geoeconomic and geopolitical problems?

Attribution

Special thank you to the IBM Garage Singapore team: Oliver Senti, Practice Manager; Eunice Shin, Sr UX Designer; Ma Li, Architect / Data Scientist; Iris Tan, UX Designer and Thanh Son Le from the Cognitive Solutions Engineer, IBM Watson and Cloud Platform Expert & Delivery Services.

References

For more details on designing and building chatbots, please refer to the links below where you can find many read up on AI-powered chatbots: