One of the most commonly asked questions on Quora for me is usually, “How do chatbots work?”
This article is the third in a four-part series called Chatbot 18. Other articles that were published in this series can be found here:
So, how do Chatbots work?
Imagine for a minute what the process of communication with another human being is like.
Your mother asks you to go buy some Tropicana 100% Orange Juice.
Your first question is how much of it does she want? 1 litre? 500ml? 200? She tells you she wants a 1 litre Tropicana 100% Orange Juice. Now you know that regular Tropicana is easily available, but 100% is hard to come by, so you call up a few stores beforehand to see where it’s available. You find one store that’s pretty close by, so you go back to your mother and tell her you found what she wanted. It’s $2, maybe $3, and after asking her for the money, you go on your way.
What does Tropicana Orange have to do with anything? Well, this is the answer to the question that all your bosses and clients will eventually ask, “How do Chatbots work?”
A chatbot follows the same process, with two fundamental differences, the channel of communication and what you’re talking to. I’ll give you a step by step breakdown based on the most fundamental principles of AI/Chatbots.
In the Mind of the Machine.
- You find a product on Facebook’s Messenger and for the sake of consistency, let’s say it’s the same bottle of Tropicana. You only ever see the presentation layer and send the bot a message that is picked up by the backend saying you want some Tropicana.
- Using Natural Language Processing (what happens when computers read a language. NLP processes turn text into structured data), the machine converts this plain text request into codified commands for itself.
- Now the chatbot throws this data into a decision engine since in the bots mind it has certain criteria to meet to exit the conversational loop, notably, the quantity of Tropicana you want.
- Using Natural Language Generation (what happens when computers write a language. NLG processes turn structured data into text), much like you did with your mother the bot asks you how much of said Tropicana you wanted.
- This array of responses goes back into the messaging backend and is presented to you in the form of a question. You tell the bot you want 1 litre and we go back through NLP into the decision engine.
- The bot now analyzes pre-fed data about the product, stores, their locations and their proximity to your location. It identifies the closest store that has this product in stock and tells you what it costs.
- It then directs you to a payment portal and after it receives confirmation from the gateway, it places your order for you, and voila in one to two business days, you have 1 litre of Tropicana 100% Orange Juice.
Are they exactly like humans?
The biggest difference between chatbots and humans at this point of time though, is what the industry calls empathy understanding. Chatbots simply aren’t as adept as humans at understanding conversational undertones.
For example, there’s a very large difference between the statements,
- “We need to talk baby!” and
- “we need to talk babe….”
While this is immediately apparent to a human being, it’s difficult for a machine to comprehend. Progress is being made in this field though and soon machines will not only be able to understand what you’re saying, but also how you’re saying it and what you’re feeling while you’re saying it.