Professional Documents
Culture Documents
Conversational Prelude
All of us enjoy conversations
What if learning was also conversational?
Gear up to hop on to the world of Bots and Conversational Agents. Hope you
have a good conversation ahead!
What is a Chatbot?
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?
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.
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
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
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
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
Human in the Loop
User Interface
Why do you need a user interface here?
Another important component is the User Interface (UI).
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.
Now, I get the NLP part but what is the significance of Intent and Entity?
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
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
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
This is not an exhaustive list of points to consider but will help you in choosing the
right platform.
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?
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.
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.
FAQ
That's interesting. I have always felt that the Frequently Asked Questions
(FAQs) could be enhanced with the help of bots. Am I right?
Yes, you are getting there my friend. FAQs are getting replaced by bots for
a better customer experience. Here, bots are acting as the first line of support for
all customer queries.
Closing Thoughts
Thanks a ton. That was very informative.
You are welcome. You would have understood some good use cases by now. Let's
get deeper into the world of bots.
PRIMER QUIZ
Intelligence
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".
Bots and AI
Gotcha. Can you give more insights on this AI part?
AI is not the one-stop shop for building bots; instead, AI is a set of tools and
techniques that can be leveraged to build a conversational system.
Natural Language
Now that I got some clarity on the AI part, let's get into the Natural Language
aspects.
Sure. All conversations happen through Natural Language.
NLU
NLU is a series of steps that take the input text and extract
the intent and entities of the input.
Training
Natural Language is unstructured, how do I make my bot efficient at
extracting intent and entities?
Some Examples
Can you give me some examples of input text?
Say you are conversing with a Travel Bot. You could say,
All the three sentences have the same intent, just that they are worded differently.
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.
Conversation Management
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
Takeaway
So what is the takeaway from this AI conversation?
Well, you must say that if you ask me then
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.
Segundo quiz
Conversation where ordering a sandwich a bot and the bot completing the activity
You can build a bot without Artificial Intellgence
What is the series of steps performed to understand the intent and entity of input?
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
Files
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.
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.
Audio
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
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
So should I use buttons only for canned responses?
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.
I still feel there is an overlap between Context and Intent. Can you please
help me clarify?
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 humans going to replace
bots?
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!
QUIZ FINAL:
What was the methodology used by ELIZA the program devised by Joseph..
What type of Bot is Mitsuku (Bot builf for conversational purpose on KIK manager
Plataform
You can create polls and get responses to polls using emoji
Alexa, a popular bot from Amazon provides feature to integrate with IoT devices
What is the order of steps in Natural Language Understanding?
Which of the following features can be accomplished with the help of Facebook
Messenger Plataforms?