<img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=979905748791482&amp;ev=PageView&amp;noscript=1">
AI ChatbotsMarch 14, 2017Written by Dean Withey

How to Make a Chatbot That Learns

Wow, tough gig. You want a machine that can have a natural conversation with you and have it learn to get better over time?

You better hope you found a super-geek because creating a chatbot that learns is no easy task.

Right now in early 2017, we are knee deep in the 'chatbot revolution' where brands of all sizes are scrambling to turn their persona into a conversation. Figuring out how to make a chatbot that learns while most can't understand what you're asking them is a goal few chatbot developers can meet (good job you found us, here are 10 questions to ask a potential chatbot developer).

Broadly, there are two types of chatbot. Flow-based, if the user clicks this then say that, and artificial intelligence (AI) driven that tries to understand the users intent, not so reliant on direct input.

In a sense, it is possible to make both of these types of chatbot learn over time.

Flow-based chatbots can use data (and humans) to monitor and record the most common inputs and user requests to optimise delivery and functionality to serve users faster and more accurately. In a nutshell, it is learning the order to display the buttons so the user reaches the end-point quicker.

AI-driven chatbots can also use data (with fewer humans) to learn by automatically assessing how successfully they dealt with the user to self-improve over time.

Read this to learn about all the different types of chatbots.


An insight to artificial intelligence and chatbots that learn

AI has been around since the 1950's and is the overarching term when a machine exhibits human-level intelligence. But it is not solely responsible in making a chatbot learn.

layers of AI chatbots that learn

Source nvidia


Most current chatbots use a form of Narrow-AI called Natural Language Processing (NLP) in an attempt to understand the input from a user and act on their intent.

As an example, it helps the chatbot respond correctly with "Hi" when it receives inputs like:

hello, hiya, yo, what's up, hi m8, hi, alright mate, and so on.

For your developer to create a chatbot that learns, she must go beyond basic AI and understand intent and progress into Machine Learning (ML).

On a basic level, ML uses complex algorithms to read data, learn about it and then determine what to do with it. This area of research has seen the greatest success in computer vision (trying to get a computer to tell you what an image is).

After ML, the next step required for your developer is to move into Deep Learning (DL), a more advanced version of ML.

This is where neural networks (a machine replication of a human brain) is used to progressively conclude on a single probability of accuracy. As an example, the final output of a neural net might be:

"This user input is 95% likely to be a greeting."


You may have heard of "training AI"?

A neural network works in layers, where each layer assigns a weight to its input, based on how correct the input is relative to the task at hand.

Using our greeting example, the challenge of understanding intent is broken down and examined by different layers. One layer might look at the letters used, another might assess when the message was received, one might consider what message was received beforehand and a further may look at how long it's been since having received a message.

Each layer would have weighted the input it received based on what it has been asked to do and then passed its weighting to the next layer. This progresses all the way until the final layer's output and the final weighting.


There are two main problems with neural nets 

The first is that to run the computation requires supercomputer-grade hardware. Thankfully, modern day Graphics Processing Units (GPUs) have accelerated things and made the technology more accessible.

Second, they require training. Lots of training. This involves incrementally increasing the number of layers and connections and passing lots of data through it. A modern example used to explain this is from Andrew Ng, a pioneer in computer image recognition. To recognise a cat from a human or a stop sign, his neural net was trained using 10 million YouTube videos.

Deep Learning breaks down language in ways that make 'human level' chatbot conversation seem possible. We are not quite there yet, but, basic and Narrow-AI is here now, getting better and better and is not going anywhere. Driverless cars, personalised health care and making sure your digital-PA tells you to take an umbrella are all here, or on the very near horizon.

It's an exciting time for us to be developing chatbots and conversational interfaces, and we're glad you are here with us.