How do chatbots work?

The Technical Guide How do chatbots work?

It is no secret that chatbots can have a huge positive impact on your business.

In fact, they can automatically qualify your leads, boost your sales or reduce your costs.

They are extremely useful and important, and in this guide I will show you how chatbots work.

Let’s get started.

The simple answer

First, I will give you a non-technical answer to the question of how chatbots work. A chatbot works relatively simple. Here is an example:

  1. A user starts a conversation with a chatbot of a car company. He asks “Which red cars do you have?”
  2. The chatbot interprets the message and recognizes the words “red” and “cars”.
  3. Based on the recognized words, the chatbot will look into a database for “cars” that are “red”.
  4. Finally, the chatbot will send a message back to the user with all the red cars that he found in the database.

In general, most chatbots work this way. It is really straightforward how it works, but what happens under the hood of a chatbot?

Different components of a chatbot

A chatbot has different components. In total, a chatbot has four:

  1. User Interface
  2. Responder
  3. Classifier
  4. Graphmaster

In the image below, I provided the structure of a chatbot. Let’s talk about each component.


The User Interface

The User Interface is the component of the chatbot where the user communicates with the chatbot. Via the user interface, the user can type in message, click on buttons or sometimes can even speak (depends on how advanced your chatbot is).

A User Interface can have various lay-outs. It also depends on which platform you are communicating with the chatbot. For example, this could be through the website of a company or through Facebook Messenger.

Here some examples of chatbot user interfaces:

The Responder

This is the part where it becomes technical.

The Responder is the interface between the user interface and the Classifier.

It handles the input and output between the user interface and the chatbot.

So in my example above, when the user asks “Which red cars do you have?”, the Responder is responsible for sending that message to the Classifier.

Also, when the chatbot replies with the red cars that he found in the database, the Responder makes sure that all the red cars that are in the database are delivered to the user.


The Classifier

The Classifier is located between the Responder and the Graphmaster. 

It normalizes and filters the input, and splits the user input into logical components. These logical components are then transferred to the Graphmaster.

It also goes the other way around, when the Graphmaster sends some output to the Classifier, the Classifier transfers it to the Responder.

With my example above, the Classifier filters the phrase “Which red cars do you have?” to logical components. The Classifier need to determine which part of the phrase are most important. In this case, he determines that the most important words are “red” and “cars”. These two words are then transferred to the GraphMaster.

The Graphmaster

The Graphmaster organizes the content of the chatbot and is responsible for the pattern matching process.

This component determines how smart the chatbot is. A pattern matching process is used to detect similar string of characters. When it detects these similar strings, he knows how he should answer to these kind of strings. For example, when he detects the string “opening times”, he will connect that to the opening times of the company.

In my example, the Graphmaster will match the words “red” and “cars” with the cars that are red. He can do this, by searching through a database of cars. Afterwards, he will send this information back to the Classifier. 

An overview of the example

So when a user asks “Which red cars do you have?” to a chatbot, this is what happens under the hood:

  1. The user will input this phrase through the User Interface, which transfers it to the Responder
  2. The Responder transfers the input to the Classifier
  3. The Classifier filters the input and determines that “red” and “cars” are the most important words. These words are transferred to the Graphmaster.
  4. The Graphmaster matches the words “red” and “cars” with cars that are red, which he found in a database. He will send the red cars back to the Classifier.
  5. The Classifier will transform this input from the Graphmaster to a logical sentence and sends it to the Responder.
  6. The Responder will transfer it to the user interface.
  7. The User Interface will show the red cars to the user. This could be through text, images, carousels or any other chatbot element.

Want to build your own chatbot?

Are you intested in building your own chatbot? Then I would advice you to check out this guide for choosing the best chatbot software.

Leave a Reply