A chatbot is defined as a program that interacts with humans through an interface and has been
designed in a way to mimic response like humans.
It is also known as a Conversational Agent or Dialogue System.
Voice-Based Assistants
Voice-Based Assistants
I have used Google Now, Siri and Cortana. Are they also chatbots?
Yes, they are also chatbots, specifically voice-based personal assistants.
Origin of a Chatbot
It would be good to understand some history of Chatbots. How did all this start in the first place?
In 1966, Joseph Weizenbaum devised a simple program named ELIZA, which was driven by a
script and could engage with humans in a conversation. The conversations of ELIZA matched that
of a real psychologist. This program applied the idea of a pattern matching to question, in order
to figure out responses.
Evolution of a Bot
Science and Engineering should be taught with a little bit of history.
Ok, so how did Chatbots evolve over the years into something that we are using today?
Web Interfaces paved the way for Mobile Interfaces. As more and more users started using
mobile apps, service providers started creating native mobile apps.
Mobile apps became saturated over a period of time as users got tired of installing and
uninstalling them. Only a few prevailed.
Apps that survived were mostly messaging apps.
Messaging apps had captured the mindshare of users. This meant that users are available and
responsive via messaging.
This lead to opening-up of multiple products and services through the chat platform. A slew of
companies started launching their respective chat platforms.
With the advent of progress made in Natural Language Processing, it became easier to build
conversational interfaces.
Stages of Bot Adoption
Ok. So like mobile and web revolutions in the past, bots have gone through multiple stages of
adoption. What could be the stages of adoption for bots?
Yes for bots, the stages of adoption are similar to web and mobile.
First Stage:
What are bots? Why do we actually need them? Awareness is very low at this stage.
Second Stage:
We too need a bot interface! Multiple vendors start building and hosting bots.
Business Bot
Gotcha. So are all bots just consumer-facing?
You just asked the right question at the right time. Not exactly. There are several bots for
Business Process Functions.
Say you have questions related to HR Policies or Regulation standards. These bots will guide you
through the nuances of the policies in the way you can comprehend them clearly.
Parts of a Chatbot
That was a well-animated image of a Chatbot. Could you throw more light on the anatomy of a
Bot?
Yes sure. Bot consists of the following parts.
Human
User Interface
Chat Application
Natural Language Parser
Component to Trigger Actions
Responder
Why should you consider a human as a part of the chatbot?
Good Question. It is the human who triggers the conversations, and the response is also directed
towards a human. So that is why the user is a vital component of a chatbot.
User Interface
Why do you need a user interface here?
Another important component is the User Interface (UI).
UI acts as a medium of communication between the human and the rest of the components.
Enough thoughts should go in building a UI that is conducive for generating a rich experience
during conversations.
Chat Application
Yes. I understood the importance of the UI. Can you enlighten me on the other part of the
chatbot?
Next comes the Chat Application on which the bot is hosted. Multiple vendors provide a
platform to host bot.
Facebook, Slack, KiK, etc. are some popular platforms.
Natural Language Parser
A while back, you were mentioning about the advent of NLP so where does all that happen?
Hold on buddy I am just about to explain that part now. There is a component named parser that
is used to extract the intent and the entity of the input.
Concepts from NLP are leveraged in this component.
Intent and Entity
Now, I get the NLP part but what is the significance of Intent and Entity?
The intent and entity are used to get the context of the conversation and to trigger the correct
action relevant to the question
Action
I got reasonable clarity on the intent and entity part. So what's next?
After extracting the intent and entity, its time for some action. Based on the context the right
action should be triggered. In some cases, it is an API call, in other scenarios, it is a DB query.
Responder
You mentioned about the responder, what does that do?
A Responder will respond to the human, based on the response of the action.
This closes the loop.
Closing thoughts
That was cool. Is there anything more that I need to know about the anatomy?
That is it for now. More in the upcoming topics.
Can you give me some information on the various Platforms available for building and hosting
bots?
Yes. Before that, you should understand the various AI as a service providers and channels.
Service providers provide a platform for you to build and sometimes host your bots.
Once you host a bot, you create a channel for interaction between humans and bots.
Slack - Business Bot Platform
Slack - Business Bot Platform
Can you please share some details about Bot Platforms?
Absolutely. There are multiple platforms available today to build and host bots. Here, you will
be learning only a few of the popular ones. Let's get started with Slack.
Slack is a Business Bot Platform available in mobile and desktop.
You can do a variety of actions with Slack API.
Post Messages
Expose Slash Commands
Expose Clickable Controls
Event API Subscription
Administrative Actions
Consumer Bot Platform
Consumer Bot Platform
Nice. Can we now move on to the next platform?
Sure. Let's move to Facebook Messenger Platform. Facebook is a leading Consumer Bot
Platform with more than a billion active users. Facebook API provides some really nice
features.
Content Posting
Check Delivered Callback
Receiving Messages
Predefined Button Actions
Canned Responses
Sharing Geolocation Information
voice Bot Pltform
Good. Can you explain about the Voice Bot Platforms?
Alexa is a popular bot from Amazon. Alexa is enabled through a device named Echo.
Customization and third-party integration are supported through the Alexa Skills Kit.
Some of the features include:
Registering the secondary voice commands for specific actions
Receiving inputs from clients
Converse with voice back to user
Connected Home, integration with IoT devices
Legacy Platforms
Is that all or should I know about any other new platform?
Well there are many new platforms available but don't forget the legacy platforms for
communication like
Email
SMS
They are old but still used ubiquitously.
Choosing the Right Platform
Now I am spoilt for choices. How do I choose the right platform?
Good Question. Selecting the right platform is a critical step in building a bot. It is a tricky
process because it is not just a Technology, Business, or Design driven decision. It is a
combination of all of them. Some points to consider before narrowing down on the platform
are:
Audience: Who are the end users of the bot?
Use Case: B2B or B2C Scenario
Features Required: Voice Enabled or just Conversation
Device Preference
This is not an exhaustive list of points to consider but will help you in choosing the right
platform.
Evaluating the Platform
How could one evaluate the platform?
Build a Proof of Concept (PoC) and get users to converse through the platform. This is a good
way to evaluate your platform.
Just to draw a parallel correlation,
Without habitat, there is no wildlife. It’s that simple. — Wildlife Habitat Canada
Use Case: Conversational Commerce
Use Case: Conversational Commerce
That was enlightening information on platforms. I now get the hang of things about bots. I
want to understand more about the Use Cases. Can you help with that?
Let's start with a popular use case, Conversational Commerce.
Consumers can use a bot to add items to their shopping basket.
Bots can be used for booking tickets and guide you on your travel itinerary.
You can also book a cab with the help of your Uber or Lyft bot.
Use Case: Business Functions
Please go on. Enlighten me more on these use cases.
Now You will learn about some Business Functions.
After the advent of the DevOps way of working, collaboration and communication are inclining
towards ChatOps, i.e., Managing DevOps via Chat.
Legal Bots are reviewing Non-Disclosure Agreements and sharing inputs with the Legal Team.
Bots are getting leveraged for Corporate Workflow Management.
Productivity and Coaching Applications
Are Business Bots similar to Productivity improvement and Coaching?
Not exactly. For Productivity Improvement actions like:
Reminders
Creating to-do lists
specific bots are getting developed.
Coaching is a big area where bots are being leveraged.
For example: Personal bots are being used as trainers for weight loss.
Alerts and Nudges
A while back, you spoke about E-Mail and SMS. Those are age-old means of communication.
Can bots perform similar functions?
Absolutely. Bots cannot completely replace some traditional modes of communication instead
could aid in nudging and alters functions like
you can get a notification from a bot after you have successfully completed a financial
transaction.
You can get reminders from bots on some specific goals that you have set and not progressed.
They act as nudging agents in these scenarios.
Intermediaries
Alright. You have given me some bots related use cases. I am tired of listening to similar
examples. Are there any exciting use cases where bots are getting leveraged?
Yes. As the human in the loop, bots are now acting as intermediaries between humans.
A ride-sharing bot will connect one human to another.
Travel bots help connect a group of people who are working towards a similar goal like
Mountain Climbing or Deep Sea Diving.
Voice Bots
I am tired of listening about just Chat Bots. Are there any other interesting bots?
Yes. Voice Bots. All your voice-based personal assistants come under this category.
Google Assistant, Amazon Alexa, Microsoft Cortana, and Apple's Siri are a few examples. They
take voice commands to execute a specific task.
Artificial Intelligence
So, I have had a perception that Bots are a manifestation of AI. Am I right?
Not exactly. AI is just a significant component of a Bot and not the essence of a Bot. You are not
alone my friend, many have had the same misconception. I am here to declutter all that.
Artificial Intelligence
So what exactly is Artificial Intelligence(AI)?
According to Wikipedia, "Artificial intelligence (AI) is intelligence exhibited by machines. In
computer science, an ideal 'intelligent' machine is a flexible rational agent that perceives its
environment and takes actions that maximize its chance of success at some goal
NLU is a series of steps that take the input text and extract the intent and entities of the input.
Using AI
In what scenarios should I use AI?
Scenarios that demand
High use of Natural Language Understanding
Frequent Context Switching
Predictive Analytics
Sentiment Analysis
Image Recognition
require the use of AI.
Using AI
Got it. So from what I understand, situations where there are many unstructured components,
AI can be used. Am I right?
Yes. Where there is a lot of complexity in the input, AI can help reduce the complexity.
Not to use AI
What are the scenarios where I need not use AI?
Scenarios where bots
Send Financial Reports
Perform News Aggregation
Send reminders and alerts
do not require any use of AI
Conversation Types
That was a lot of information on Bot. Now I want to understand more about conversations. What
are the types of conversations that one can have with a bot?
Ah! So now you want to get into the weeds. Conversations can be broadly classified into
Task Led
Topic Led
Modeling Flow
Gotcha. So what exactly happens during each flow?
I think you need some coffee first to be more attentive. Ok, let me not wait until then.
During each conversation
the Entities are extracted
based on the entity, the intent is mapped to each of them.
Sometimes what happens is the conversations go out of context. It is very important to bring
them back to the right context.
PROCAFFEINATING - The tendency to not start anything until you have had a cup of coffee.
So does a chatbot become a chatterbot in topic led conversations?
In a way yes. Topic led conversations can go in multiple directions. They do not have a well-
defined end state. They are more designed to keep the customer engaged on specific topics.
Interacting with Bots
So, is text the only mode of interaction with Bots?
Not exactly, the text is one of the modes of interaction. Some of the ways of interacting are
Files
Audio
Video
Emojis
Buttons
The list goes on...
HITL
I am getting confused now. Can you help me understand this concept?
Sure. The steps to handle Natural Language Understanding are Understand -> Act -> Respond.
Let us take an example: You ask a bot
“What’s the status of SE 123?”
Decomposing the above question
Understand: User wants to understand the flight status of Flight SE 123.
Act: Query Database or Hit API to find the flight status.
Respond: Reply based on the output received from the previous step.
Having a human intervention in any of the above steps is called Human-In-The-Loop.
Human Intervention
When should Humans Intervene in this process?
Humans should intervene when
Algorithms find it difficult to understand new scenarios
Algorithms have no clue how to perform a certain action
Unsuccessful actions
Input is out of scope
Best Practices
Are there any best practices for this scenarios?
Well, nothing is written in stone, but a few good practices can make things better if
implemented correctly.
Data Collection should be done properly
Gauging possible outlier scenarios and include them during training
Handling exception scenarios should be thought out well.