The Functioning Of Chat Bots Explained

By admin
7 years ago
Share

How Does A Chat Bot Work?

 

Chatbots make it easier for people to communicate with businesses.

Think of it as a replacement for all of the apps you have downloaded. Instead of opening the Airlines app, chatbot could tell you your flight’s delayed, another chatbot from FedEx could tell you your package is on the way, and so on.

Chatbots allow you to search for the info in natural conversational language as compared to search engines where you will have to input not so natural ‘keywords’.

 

 

These bots will fill a role of being both useful and promotional for Brand’s Facebook pages where they already put lot of efforts on customer engagement. Bots will take it to the whole another level.

 

  • Hey, what’s up?
  • How’re you doing?
  • How do you do?
  • Hello!

 

Anything familiar in these sentences?

They all are some or the other variation of a greeting message.

How do you respond when someone asks you one of the above questions?

You respond, typically like – I am good, how about you?

Some other day you might respond as – I am fine, thanks for asking.

This is exactly how Chat Bots work. A typical Chat Bot maps a sentence into a so called intent which in this case is the greeting intent. With every intent are associated a set of responses. The bot picks up one of these responses and sends it back to the user. This is done so as to give a more natural feel to the bot by avoiding sending the exact same response again and again.

Platforms like Facebook has given developers access to Chat SDKs that allow them to build interactive experiences and bots for interaction, shopping, booking travel etc.

 

Following are few capabilities of these platforms :


1. Send/Receive API. This includes the ability to send and receive text, images, and other rich content with CTAs.

2. Generic Message Templates. People definitely prefer to tap buttons and see beautiful images, rather than learning new difficult ways to interact with your bot. That’s there are structured messages with call to actions, horizontal scroll, urls, etc.

3. Welcome screen + Null state CTAs. Developers can think of the message thread as their own app. There are tools available to customize the experience. This starts with the welcome screen. People discover featured bots and enter the conversation. Then, they see your brand, your Messenger greeting, and a call to action to “Get Started”.

4. Natural Language Assistance : The Wit – landing Bot Engine of Facebook enables ongoing training of bots using sample conversations. This enables you to create conversational bots that can automatically chat with users. This helps you to build bots much easily. You just have to tell what your user said, the engine will tell you what your bot should do next.

5. Bot continuously gets smarter as it learns from conversations it has with people.

 

 

 

What is the AI involved?

The element of Artificial Intelligence comes in during the intent recognition. The bot is supposed to take a look at the words and possibly their arrangement in order to figure out what the intent is. This can be done in multiple ways like:

  • Simple word mapping: words like hi, hello, what’s, etc can be mapped to the greeting intent. However, this is quite inaccurate because ‘hello, who the hell are you?’ doesn’t quite sound like a greeting 😛
  • Machine Learning: if you are familiar with Machine Learning, you would be able to easily identify that the above problem is a supervised learning based classification problem. In simpler words, the problem at our hand is as follows – you are given a bunch of sentences and the corresponding intent against them. Now, you are given a new sentence and you need to classify it as belonging to one of the intents. This problem can be solved using a number of ways. The simplest way would be to use a Naive Bayes based implementation. In this implementation, we convert the sentence into a vector of numbers. The corresponding intents are also given ‘codes’ to identify them numerically. This input is fed to a training algorithm which learns how to classify these sentences. Later on, the trained model can be used to classify new sentences (if it has been trained well). Over time, it can be retrained with fresh data so as to make it learn better.

A more complex Machine Learning approach will involve training a multi-layer artificial neural network which is almost sure to give far better accuracy.

Once the intent has been identified, the bot can pick up one of the answers corresponding to the intent.

In simpler terms

  • Your knowledge base or CMS is the database of information that is used to seed your chatbot with the information needed to respond to your users’ questions
  • The data store captures data on your users’ activities and whether or not your chatbot was able to match their questions or prompts with an adequate response
  • Natural Language Processing translates users’ free form questions into information that can be mapped in real-time to find or formulate appropriate responses
  • Finally, the chat apps shown in the schema above — e.g., Facebook Messenger, Slack, Whatsapp, etc. — are the interface through which users access and interact with your bot

 

Once up and running, a chatbot requires a training period, during which the system “learns” how to best match users’ questions to appropriate responses. The more interactions, the more data,  the faster the chat bot learns and the more quickly you’re able to provide a high-quality experience for your users.