Our first two part series! This week we cover all things chatbots and next week we build one from scratch. Oh, how fun
What started out as a weekend project to build a chatbot…
Ended up in a two, yes, TWO part, Cloudy series. How in the world did that happen?
My original intent was to research the cutting edge of chatbots and try to build one solely based off a neural network. As I dived into the chatbot scene I quickly realized that many of the chatbot solutions out there either don’t have any AI/ML associated with them or rely on very basic AI/ML, which they are trying to pass off as highly technical AI/ML. Then I decided, ok, let’s write about the entire chatbot landscape and see where we get…
What is a chatbot?
They have been called the future of marketing. There are over 100,000 of them on Facebook. But in reality, a chatbot is an automated program that serves text based on user questions. In machine learning parlance, all we are doing is mapping an input (user question) to an output (chatbot response). Chatbots have been under development for a while and the chatbots of old relied on logic trees such as “If this person says this, then return this statement.” Then machine learning got much better and suddenly there was an explosion of chatbots.
That’s what I thought the story was
Are chatbots really AI?
While I can’t find a chart or hard figures about how many chatbots rely on AI/ML vs hard coded rules, I get suspicious feeling that many of the “AI” chatbots out there aren’t quite “AI.” The reason for this is many “Chatbot” comparisons break out companies relying on AI/ML vs those who are not. For the companies that are not relying on AI, there are certainly some that throw the term “AI” around a little too much…
If your chatbot does in fact use AI/ML, what I have come to realize is that much of the AI/ML being utilized in these bots is nothing new. Many of the chatbots are doing simple classification tasks or relying on natural language processing (NLP) tools that data scientists use every day. The rise in AI sophistication has something to do with bot explosion, but in reality it’s probably closer tied to users willingness to engage with AI.
Anyways, how does an AI/ML powered chatbot work?
Chatbots that rely on AI/ML are typically trying to do three things: figure out what the user is asking about, find details about the ask, and sometimes try to predict what the user is going to ask next. The company Wit.ai, a chatbot platform that was acquired by Facebook, has a good example of how it applies AI/ML to setting an alarm. The AI/ML recognizes the user wants to set an alarm, thus calls the “set_alarm” API (of course, the user has to program the machine that it wants to call weather API for the weather request). Then, it recognizes what time it is, and then sets the parameters of the API call.
This strategy seems to be widely used in the industry and on Microsoft’s luis.ai page, they have a very similar example
The last issue is keeping the context of the conversation. Let’s say you had an interaction like this:
Human: What is the weather in Miami?
BOT: The weather is 85F and sunny.
Human: What about Paris?
Yea, what about Paris? In this situation the bot has to keep the context of the conversation. If you just asked the bot, “What about Paris?” it doesn’t have any clues as to what is going on in Paris. Some bots are starting to rely on neural networks to help the machine keep context, but these are very limited cases.
Just to review, a chatbot that relies on AI/ML does the following
Machine learning as a rules based method
Another approach to applying AI/ML to chatbots is using AI/ML to just “overfit” the data. Since the number of possible situations a chatbot will face are quite limited, some companies encourage building a machine learning model with a small amount of data. Wit.ai used to have an interesting approach
When you create your bot, you just start with a few stories that describe the most probable conversations paths. At this stage, Bot Engine will build a machine learning model that deliberately overfits the stories dataset. Practically, it means that stories will behave almost like rules. It enables you to start beta testing your bot and collect conversations.
This makes a lot of sense. Instead of building a bunch of if/then rules, you can have an algorithm do that for you. It’s certainly not the most sophisticated AI ever built, but it’s a neat ML hack.
Finally, what makes a good chatbot?
If you are in the market for a chatbot that actually uses AI/ML, what should you be looking for? The chatbot should have mentions about natural language processing (NLP) and should use some elements including part of speech tagging, intent modeling and dependency paring. You don’t have to use all of the tools of the NLP trade, but need some combination of these elements to make a good bot. Of course, if your chatbot gets the job done using hard coded rules, that’s fine, but it shouldn’t be passed of as “AI.”
What’s in part II?
You’ll just have to wait until next week
Happened to be forwarded this email? Sign up below!
Copyright © 2018 Ogilvy, All rights reserved.