In this article, I will explain what is usually considered an AI chatbot.
To do that, we must first start with what ISN'T considered an AI chatbot.
The rules-based bot on my website
Recently, I ran a month long experiment where I installed a website chatbot using the collect.chat service to collect questions from website visitors.
Since the experiment is over, I have removed the chatbot from my website, but you can watch the video below to understand what the bot did.
This is NOT an AI chatbot.
It is a rules based bot. Sometimes people also refer to these as conditional logic bots, and other times they refer to it as scripted bots.
Because the bot doesn't actually try and understand the words the user says. At best, you give them a few buttons to click, and the button click triggers the next step in the conversation.
In other words, you "script" the conversation using rules and conditional jumps.
For example, the video below shows how a bot like the one above would be built using Collect.chat's bot builder.
Click here to read my review of the Collect.chat service.
Chatfuel and ManyChat
Just like the bot you saw above, you can also build chatbots for Facebook Messenger using tools like ManyChat and Chatfuel. Similar to Collect.chat, they also allow you to use rules to script the conversation flow.
These are also rules based bots because they cannot really understand the words the user says. (Note: They also have some rudimentary keyword matching, but it doesn't qualify as an NLU/AI bot and I will explain why later in the article).
What is an AI chatbot?
So what is an AI chatbot?
If your bot uses Natural Language Understanding (NLU) to try and make sense of what the user said or typed, it would be considered an AI chatbot.
Let us consider the simplest example.
Dialogflow includes a prebuilt agent that you can import into your project called the Prebuilt Smalltalk Agent, and it can answer very simple questions (chitchat).
Here is an example conversation:
So what is so special about this conversation?
The bot seems to understand your question
- Depending on your question, you get a different answer each time
- Close variants of the same question will get you similar responses (this wasn't shown in the image, but you can try it out for yourself)
- There is a more natural, conversational aspect to this chatbot than the Collect.chat bot you saw in the first video
Turns out, seems is the correct word to use. Chatbots don't really understand speech the way humans do, which I will discuss later in the article.
Is an AI chatbot actually "intelligent"?
Sometimes people overestimate the ability of an NLU based chatbot.
For example, I was recently talking to a client and he was interested in figuring out the "limits" of a Dialogflow agent's capabilities.
So he asked: "Isn't it true that Dialogflow can learn and become smarter over time?"
Yes and No.
The extent of a chatbot's "intelligence" is its ability to map a user's utterance (spoken or typed) to the best match from a list of pre-defined training phrase groups. At its core, that's all it can do.
You can improve this mapping and make it look smarter by doing a few things: adding entities, introducing contexts, providing more training phrases as examples etc. (To learn about these concepts, take a look at my free Step by Step guide to Dialogflow).
But that is still very far away from building an "intelligent" chatbot because human intelligence consists of lots and lots of knowledge about the world, and bots don't have this knowledge. Ask it just one question outside the stuff you have defined in the training phrases, and it cannot answer that question.
For example, let us continue the previous conversation:
Why did it fail to provide a sensible response?
It's because a chatbot doesn't have the world knowledge that a human already possesses.
AI Bot Platforms vs Scripted Bot Platforms
Quite often, people group scripted bot platforms with NLU bot platforms and just club everything under the umbrella of chatbot. That may not be very helpful when folks hear that a "chatbot made $3 million in sales in just one hour".
It is important to understand that scripted bot platforms and AI Bot Platforms are not the same when it comes to capabilities.
I mentioned earlier that you can use services like Chatfuel and ManyChat to build scripted bots.
Someone asked me this question on Twitter:
@aravindmc Hello Aravind. I just read one of your DialogFlow Articles. Do you think it would be possible to build a full, robust bot only using DialogFlow? If I was building the same bot with ChatFuel vs. DialogFlow, could they have the same features? Can one do more?
— RankPull (@RankPull) April 20, 2018
Since Chatfuel isn't an NLU based bot framework, there are quite a few reasons why Chatfuel cannot do what a Dialogflow bot can.
Adding some rudimentary keyword matching isn't going to be enough to allow Chatfuel to match Dialogflow's capabilities.
For example, you cannot extract entities from the user's utterance if you use Chatfuel. This issue led a reader of this website to ask me how she could create a Dialogflow bot with 4000+ intents, because she needed one intent for each city on the planet!
If you understand how Dialogflow entities work, you know that that's not the right way to approach the problem.
How to create an AI chatbot?
There are many bot frameworks you can use to create AI powered chatbots.
(Note: I am using bot framework and bot platform interchangeably in this article.)
Here is a small list:
- Dialogflow (my preference)
- Amazon Lex
- IBM Watson Assistant
There are many other bot frameworks, of course.
So how do these bot frameworks work?
At a very high level, here are the steps to create a bot using NLU bot frameworks.
1 You will create a list of intents.
2 Each intent is a group of training phrases. Usually the training phrases are variations of the same "intention" and provide your bot hints about what the user wants the bot to do. For example, "Turn off the light" could be one intent, while "Play some music" would be another intent.
3 The AI bot platform will match the user's utterance to one of the intents.
4 If you are not happy with the match, you can tell the bot framework to match to a different intent the next time.
5 If a different user utters the same phrase later, your agent will be intelligent enough to match the intent based on your update. (This process is usually called "training" the bot. And this is what people usually mean when they say a chatbot can "learn and become more intelligent over time").
Limitations of AI bot platforms
So why would anyone choose a scripted bot platform when you could instead build a more "intelligent" chatbot using an NLU based bot platform?
There are quite a few reasons.
The NLU bot builder is not very intuitive
It is quite hard to create a bot "builder" tool for NLU based bots which are as easy to use as the scripted bots.
Here is the builder tool for Collect.chat. Everything is linear, and pretty much What You See Is What You Get (WYSIWYG).
Here is the visual builder for Dialogflow:
And here is how you might define a single Dialogflow intent:
My point is: to use a "builder" tool to build an NLU bot, you need to:
- Learn about many more moving parts
- Understand more basic concepts
- Have at least a basic knowledge of your bot framework's features
Sometimes, this can be daunting, especially if you don't have a programming background.
The iceberg problem
One of the most fascinating features offered by Dialogflow (and Amazon Lex) is slot filling.
Unfortunately, it is also a feature which is very hard to maintain. (In fact, I don't recommend that people use the feature).
In nearly all Dialogflow demos, you see someone typing out their complete sentence, marking a few parameters that Dialogflow can extract as "required" (slot filling), and Poof! You have a working chatbot. So you have a lot of folks coming in to Dialogflow looking at the 10% stuff which seems so "simple and easy".
And then they see the other 90% of the iceberg. 🙂
To be clear, I don't want you to think Dialogflow bots are too hard to build. In fact, I have created a system which can help you build Dialogflow prototypes very quickly.
But it is also important to understand that NLU bots are much more powerful, and there is a tradeoff between their power and their ease-of-use.
You can definitely draw some amazing art using Microsoft Paint.
But professionals usually reach for Photoshop.
And accordingly, Photoshop's menu bar is much more complex than the one in MS Paint. 🙂
Less control over your bot's behavior
Sometimes users use all the default settings in Dialogflow without understanding how they work. And then they feel like they have very little control over the bot behavior and stop using Dialogflow.
But once you start thinking about how to use the existing features to build better Dialogflow bots, you will notice that you can do a pretty good job of understanding why your bot works the way it does.
On the other hand, scripted bots are much easier to understand, and bot builders feel more in control when using them.
Combining scripted and AI bot platforms
In theory, you can integrate Dialogflow into your ManyChat or Chatfuel or Drift or Intercom bots.
Here is the high level overview of how you would do the integration:
- User types a message into the chat window
- This message is "relayed" (forwarded) to your bot platform, usually by calling an API provided by the bot platform itself
- Your NLU bot sends a response to the message
- The response is then relayed back to the user's chat window
The challenge, however, is that this process doesn't fit very well into the paradigm of either the scripted bot or the NLU bot platform. The main reason for this is that there isn't a one-to-one mapping between the conversation blocks in scripted bots and the conversation blocks of NLU bots.
I would recommend simulating the richer controls of scripted bots in Dialogflow, rather than force fitting NLU into scripted bots.
AI Bot Platforms
So you are perhaps convinced that you will go with an NLU bot framework. Which one should you use?
First, let us see the options you have.
What AI bot platforms can I use to build my bot?
While there are a lot of NLU based bot frameworks you could use, in my view your best options are the following:
Here are my top recommendations:
- Dialogflow - best low code tool
- RASA NLU - fully open source
- Amazon Lex - powers the most popular voice assistant (Alexa)
- Botpress.io - some people I trust recommend it highly
Which is the best AI bot platform?
In my clearly biased view (I am a Dialogflow consultant), Dialogflow is the best low code bot framework for technical non-programmers.
I have also written an article where I compare some of the popular bot frameworks.
Where can I use these AI powered bots?
Here are some bots that students of my courses have built.
Here is an email I got recently from a student who bought my courses.
Here is the link to the case study.
Another one I got recently:
And another one:
"Carson is a lead generation Chatbot for the Automotive Industry that assist Auto Dealerships manage their inbound lead and service requests through Facebook Messenger." - JP Martindale
In my view, many real world chatbots are somewhat "invisible". That is, they form a small part of a larger system (so the focus is on the task at hand, and not on the chatbot). A good example is the conversational interface created by Tempathic for their sensor monitoring.
While agents which can do "chitchat" are very engaging, that's not an actual bot use case. On the other hand, there are some chatbots built purely for the purpose of conversation, such as Mitsuku.
Can I see some online bot demos?
Here is a list of AI powered bots that I built for myself that you can interact with.
I created a bot which can answer questions about the statistics of cricket players based on the StatsGuru portal of the popular cricket website Cricinfo.
Chuck Norris JokeBot
On a lighter note, I developed a chatbot which will fetch a random joke from the Internet Chuck Norris Database.
This is clearly a super simple bot, because it can only answer exactly one question.
WordPress FAQ Bot
I created an FAQ bot which will suggest articles from this website based on your question (it displays some broken links as it is a little out of date).
Lesson Finder bot
I also created a bot which helps students find lessons in my video courses.
Do you have any comments or questions? Leave a comment below!
- Dialogflow Knowledge Connector : Pros and Cons
- How to integrate Telegram with Dialogflow
- Why I avoid using slot filling (required parameters) in Dialogflow
- Free Tool: Convert your WordPress website into a Dialogflow FAQ chatbot
- Dialogflow Mega Agent Tutorial
- Reader Question: Will followup events work when an intent has an input context?
- How to learn Dialogflow in a week
- Reader Question: Do I need a contextual fallback intent for every single context?
- Reader Question: Can I use a single agent for Facebook, WhatsApp and website bot?
- Five ways to integrate a Dialogflow chatbot into your website