Chatbots — how do they work?

A very brief introduction to language technology

Petter Hohle
Jul 24, 2018 · 4 min read

At Convertelligence, we’re all about building chatbots. What is a chatbot, you ask? A chatbot is a chat robot that automatically replies to incoming messages. This technology has a wide range of applications, with customer support being our primary focus these days. If you run a company and have customers, you’re probably aware of the need for customer support staff to answer and help your customers when they have questions about your product or need a helping hand.

With chatbots, you can alleviate some of the need to have customer support agents that handle repetitive questions day and night by having automated replies to the most frequently asked questions. Our mission is by no means to replace customer support agents, as they have a deep understanding of the company and can handle complex queries where chatbots simply come up short. However, by using a chatbot, you can be available 24/7 and have the chatbot answer the repetitive, time-consuming questions, so that the folks at customer support can focus on more complex and interesting tasks.

The meaning of words

In order for the chatbot to answer questions for you, the chatbot needs to understand what your customer is saying when they send a message your way. This type of understanding is called Natural Language Understanding (NLU for short), and is concerned with the internal structure of natural language and the meaning of words.

Humans understand natural language effortlessly (their mother tongue, at least), but with machines, it’s a different story. They lack a very important piece of the puzzle: the human brain.

To achieve accurate and robust Natural Language Understanding, machine learning is widely used nowadays, where you train machine learning models on collected data, i.e., text. Machine learning is a field within artificial intelligence and has seen a major resurgence in recent years, where pretty much all companies want to use machine learning to improve their services and simplify their processes.

In essence, machine learning is about trying to make machines learn in the same way that humans do, which is a daunting task we are nowhere near solving. You might have read some scare pieces about how robots are about to take over the world, but don’t you worry, we’re nowhere close to making machines that intelligent!

How do we use machine learning?

Our in-house Natural Language Understanding (NLU) tools utilize machine learning and are able to understand the intent of incoming messages from users and reply accordingly. By feeding the chatbot with examples of how you might ask a question, it is able to understand large variations of these, including synonyms, spelling errors and various dialects.

By combining deep understanding of linguistics, computer science and machine learning, we develop algorithms that understand meaning in text and are able to find the best answer to a given question — if that question is supposed to be answered, that is.

We are not building general AI robots that should be able to answer anything and everything, but rather be centered around the relevant questions that applies to a given use case. For instance, a chatbot for banking should be able to handle questions related to a range of services including credit cards and loans, but does not have to handle questions about the local fare.

One of the techniques we use to understand word similarity and semantics is called word embeddings, which is based on the theory of distributional semantics. This theory argues that to understand the meaning of a word, you can look at the surrounding words, i.e., the context, which yield clues about the meaning of the word in question. This was perfectly summed up by John Rupert Firth in 1957 when he famously wrote:

You shall know a word by the company it keeps.

For instance, in the sentence «I drive my X to work», you can safely assume that X is some sort of vehicle whose purpose is to get you from home to work, and thus be quite similar to a car — or even be a type of car. This technique works surprisingly well and has been used in almost all applications of NLU in recent years. Instead of having to manually create large lists of synonyms for a vast range of words, we can have the machine automatically learn the semantics and similarities of words!


Software company specializing in chatbots and artificial intelligence

Petter Hohle

Written by

Data Scientist @ Convertelligence (We're hiring 🚀


Software company specializing in chatbots and artificial intelligence