Professional Documents
Culture Documents
What Is A Chatbot?
What Is A Chatbot?
What is a Chatbot?
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.
Voice-Based Assistants
I have used Google Now, Siri and Cortana. Are they also chatbots?
Origin of a Chatbot
It would be good to understand some history of Chatbots. How did all this start in
the first place?
Chatbot Intuition
"Humans have the desire to communicate with
computers in much the same way as they do with
other human." - Joseph Weizenbaum
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.
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.
Third Stage:
Bot First Delivery Model - Bot UI becomes ubiquitous.
Final Stage:
We are bot only. Bots become the new norm or de facto standard.
Personal Bot
So now that we got a peek into the history of bots, what are the various types of bots available?
Several types of bots are getting developed today. First, you must know about Personal Bots.
Consumer Bot
Ok. Are there any bots that are chatty and help us stay in touch with our favorite
items?
Yes. Some bots fit that bill. They are called Consumer Bots.
Consumer bots are
For example: Mitsuku is a bot built for a Conversational purpose on the Kik Messenger
Platform.
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.
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.
Super Bots
You can ask any question to them on any topic. They respond well if they can find the
answer, if not they admit that it is beyond their understanding.
Closing Thoughts
I learned a lot about bots so far.
Are there any other types that I should know?
Several bots are getting developed as you read this response.
You could create a new bot of your choice in the future. What you should understand is
Bots are the new UI.
They can be implemented for any business or consumer-facing scenario.
Anatomy of a Bot
Bots are awesome!
Are you now intrigued to learn more about them? What exactly are bots made of?
Bots have several parts. Look up to understand what happens behind the scene.
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
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.
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
Bot Platforms
Bot Platforms
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.
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.
Content Posting
Check Delivered Callback
Receiving Messages
Predefined Button Actions
Canned Responses
Sharing Geolocation Information
Email
SMS
This is not an exhaustive list of points to consider but will help you in choosing the right
platform.
Reminders
Creating to-do lists
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.
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.
So what exactly is Artificial Intelligence(AI)?
NLU
NLU is a series of steps that take the input text and extract the intent and entities of the
input.
Training
Grammar
So, do I have to train my bot on Grammar as well?
To a certain extent yes. NLP has a technique called Part of Speech Tagging which
helps understand the construct of the input better.
This, in turn, helps in extracting the entities and intents to perform the desired action.
Conversation Management
Ok. I have a fair idea on AI and NLU now. What next?
After understanding the Intent and Entities, it is now time to take action and
respond to the input.
Dialogue agents have two-way communication, so you have to map a correct
response to the input.
Machine Learning is used extensively to train bots at identifying the various aspects of
Natural Language. Most of the NLP tools come with pre-trained models.
Conversation Management
AI component understands the context and renders the correct response based
on the input.
When there is a lot of context switching, humans handle it better, but machines
find it cumbersome.
Context Switching
Ok. So what are the hardships in switching context?
One word might have different meanings in different contexts.
For example,
Semantics
So this is all about getting the semantics right, is that correct?
Absolutely. Conversation Management as a field is still at a very nascent stage. A lot of
progress is required to be made in this field.
Closing Thoughts
Thanks that was insightful. You have changed my perception about bots.
You are very welcome. Miles to go, my friend.
Decision Dilemma
From our previous conversations, I get the confidence that I can develop a Bot
even without AI. Am I right?
Absolutely.
AI is not the de facto component in all bots. You should use it as the situation demands.
Using AI
In what scenarios should I use AI?
Scenarios that demand
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
Not to use AI
What are the scenarios where I need not use AI?
Scenarios where bots
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
Task Led
Can you throw some light on Task Led Conversations?
As the name suggests, these conversations mostly happen with an objective of
accomplishing a specific task. Completing a stipulated task will be the expected
outcome of the conversation.
Example
An example would give more clarity. Can you share one?
Say you are using a bot to order coffee. The successful outcome of conversation would
be taking the order of a coffee.
Coffee Example
Cool. So if I just converse with a bot saying give me coffee, is the task
accomplished?
It is not as easy as you think my friend. People across the globe have a variety of
preferences to order a cup of coffee. So each preference has to be modeled as a flow-
through its entirety.
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
Example
Again, I am used to learning by examples. Can you share one?
Sure. Say you are conversing with a bot on a movie you recently watched or on some
company you have invested in the stock market. You can converse on different
dimensions on the same topic.
Takeaway
So what I understand is that Topic led conversations are mostly used for user
engagement, and task led conversations are used for business scenarios. Am I
right?
Awesome. High Five. You are getting there.
Files
Audio
Video
Emojis
Buttons
Files
Now it makes perfect sense. When should I leverage this feature while designing
a bot?
Good Question. Files are used in scenarios where a lot of information has to be
processed, and your chat window is small to accept all that information in one go. You
can also use them when you have tables.
Say you are interacting with a Tax Filing Bot. Instead of entering all the fields in your tax
filing document, you can just upload the file. Since the data is structured, it can be easily
parsed for further processing.
Audio
Can you throw some light on Audio Interactions?
Sure. For personal assistants like Google Assistant, Siri, Amazon Alexa, etc. the mode
of interaction is Voice. This type of interface is called Vocal User Interface. You
trigger commands like Ok Google "How is the weather in New York?" and you get a
response back with the required details.
That was useful. But how do we address the accent issue with voice interface?
Good question. Voice might not be a useful interface in every scenario. Voice is
recommended only for private interactions. A lot of training is required to get the bot to
understand various accents.
Video
Now I understand how Audio interactions happen. I am really intrigued about
videos. Can you help?
Sure. Video interactions happen in the following scenario. Say you are interacting with a
bot to troubleshoot a specific problem and you need an approach. Your bot can respond
with a video that will help you troubleshoot the problem. This is one of many scenarios
where videos can be used as a means of interaction.
Emojis
Somewhere above, you did mention emojis as means of interaction? Is that the
way forward in terms of communication?
Not exactly. Emojis are more of reactions to conversations. These reactions can also be
used to take actions, acknowledge, and respond.
Emojis
Can you give me some example of how Emojis are used for conversations?
Sure. Look at the image above. The same conversation can be reacted with emojis and
expressed with the help of emojis.
More on Emojis
Yes. Look at the image above. You can create polls and get a response from emojis.
You can also aggregate the response and perform analytics using those numbers
Buttons
That was insightful. Can you now talk about Buttons?
Yes. Buttons are a wonderful way to navigate a conversation. You can confine the user
to a pre-defined set of responses and guide the user in the desired direction.
Buttons
Not just for Canned Responses. It can also be used for other scenarios. Look at the
image above. You want to collect orders based on some predefined inputs. You can
leverage buttons in those scenarios.
Takeaway
Thanks a bunch. It was an eye-opener for me knowing so many more ways of
interacting.
You are very welcome my friend.
Context
I have been intrigued by this thought on how a bot understands the context. Can
you throw some light on that?
Roger that. Say you are in a conversation with a Travel bot. You are chatting about the
Eiffel Tower. The conversation goes as shown in the image above.
This can be achieved with sufficient training on varied topics to understand the context
Context
Got it. Although there was never a mention of the Eiffel Tower in the following
questions, the word it specifies the context. Am I right?
You are getting there my friend. Let us take another example. Look at the image on the
top. You will get more clarity on the intent and context.
Look at the Image above. Hope you got the answer to your question.
Pronouns
o Words like "it", "this", "hers", and "his" are pointers for getting the context.
Rich Controls
Memory
I got the hang of what context and intent are for a Bot. How different is a
memory?
Memory is generic when compared to context. Here, a bot should be able to pull intents
at various time steps and take actions.
Amnesia
Do bots suffer from Amnesia?
If you do not train them well, then they can suffer from Amnesia.
Closing Thoughts
That was very informative. Now I have some clarity on Context and Memory.
Very Good. Getting a bot to understand the context and memory is one of the most
challenging parts in designing a bot. It is also a good area of growth from a technical
standpoint.
Humans or Bots
Ok. So, are humans going to work with bots or bots going to replace humans?
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
Human Intervention
When should Humans Intervene in this process?
Humans should intervene when
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.
Hope you enjoyed learning! May the force be with you when you build a bot!