Conversational Chatbots Maintaining Context Awareness - Complete Guide

Post by
Indrek Vainu
    Published: 
September 7, 2021
Conversational Chatbots Maintaining Context Awareness - Complete Guide

1. What Are Conversational Chatbots?

Conversational chatbots are intelligent robots (i.e. computer software) capable of understanding what users type to them (i.e. they understand user intent) and providing them with an accurate answer. 

Understanding natural language is key. Many times users are looking to articulate their specific concern to the machine in a similar manner they would do to a human. User has a question and asks that specific question from the conversational chatbot e.g. “When will I receive my payment from?”. The main drive behind this is that users are looking for a quickest way to get an answer to their specific question. 

In our example, the user is looking to understand in hours or minutes how long it takes for the payment to arrive from Bank ABC. And the conversational chatbot has to provide this answer in the form of “It takes 6 hours during weekdays to receive a payment from Bank ABC”. 

In such a situation only the most relevant answer matters and for the users it does not matter if the answer comes from a machine or a human. As long as it is accurate and  relevant. 


Virtual Customer Assistant capable of understanding Natural Language built by alphachat.ai


2. What Is A Context Aware Chatbot?

A context aware chatbot is capable of understanding users’ follow-up questions, relate those to previously served information and provide users with relevant and valuable answers.

As an example, a user might ask a financial services chatbot “i want to open an account”. The bot provides information on how to open an account but the user will ask next “can i open it remotely?”. 

Here the bot needs to understand that “it” refers to the account and have information available on how to open accounts remotely.

Being able to understand this dynamic and serving relevant information is called context awareness.


3. How To Build Context Awareness Into The Chatbot?

You can build your own AI based context aware chatbot on the AlphaChat platform. There are various providers and the prices vary. In the next steps we will first go through how to build a conversational chatbot and then we focus on how to add context awareness to the conversational chatbot.


3.1. Step-by-Step Guide On How To Build A Conversational Chatbot

Before building context awareness into your bot you need to create a topic for the bot. Here are the steps for doing so. 


1. Add a topic.

 

context aware conversational chatbot

 

2. Give the topic a name.

 

context aware conversational chatbot

 

3. Add an answer to the topic.

 

context aware conversational chatbot

 

 

context aware conversational chatbot

 

4. Add phrases and utterances to the topic. 10-15 phrases will do.

 

context aware conversational chatbot

 

5. Train the topic.

 

context aware conversational chatbot

 

6. Test the topic with some of the phrases that you just used for training.

 

context aware conversational chatbot

 

Congratulations! Now you have a bot that you can ask questions and the bot is capable of giving you an answer.  

Next, let’s add context awareness.

 

3.2. Step-by-step Guide On How To Add Context Awareness To Your Chatbot

Context awareness means that the chatbot is capable of putting what the user is asking into perspective based on what has been discussed earlier and give a relevant answer to the user. 

Continuing on the example of “opening an account”, there can be a case where the user asks about opening an account and then continues with a follow-up question. For example, after asking “open an account”, they might ask “does the same process apply also for new business accounts”. 

The user might ask this because the answer that the chatbot gave refers to a personal account but the user would like to know how to open a business account. 

To account for this context awareness you need to do the following.

1. Add a new subtopic underneath the main topic for which you want to have context awareness.

Any information that the chatbot gives out, you have to put there beforehand. For that reason make a new topic under the “open an account” topic. After you have created the new topic, insert an answer for the topic by clicking on the topic name on the left side column to select the topic and then adding text by clicking “text” on the right side.

  

context aware conversational chatbot

 

2. Next click on the conditions field under the “open an account” topic.

 

context aware conversational chatbot

 

3. Add conditions that will trigger the new subtopic. 

 

context aware conversational chatbot

A condition specifies when a topic is triggered. In our case we have entered the word “business” as a partial match. This means that when the user inserts text that contains the word “business” then the topic “open an account for business” is pulled up because the condition is met. Press OK to save the condition.


4. View your conditions.


context aware conversational chatbot


5. Test the condition.

Open the chat widget on the bottom right. First we type “open an account” to trigger the initial topic. We get the initial answer.


context aware conversational chatbot


Now we ask something like “can i open an account for my business”. As we have a partial condition match for the word “business” then any phrase that the user inserts that has the word “business” in it triggers the new topic.


context aware conversational chatbot


As such we get the answer for the topic which is that we can open an account for the business. 


4. How To Use Context Awareness With Conversational AI?

With this methodology you can build multiple powerful scenarios that help your users with context awareness. 

Essentially you can think of the topic “open an account” as something of an umbrella topic under which users might have various specific questions.

So you can build many subtopics underneath the “open an account” topic and use conditionals to trigger those. For example you can create topics such as “opening a premium account”, “opening an account remotely”, “accounts for non-residents”.


context aware conversational chatbot


All these topics you can build under the “open an account” topic and create conditions for phrases when they should be triggered. Such a methodology is a powerful way of making sure the follow-up questions that your customers ask trigger appropriate responses.


maintain context in a chatbot

5. Authenticated Users And Context Awareness

Another option for context awareness is to use it on authenticated users. This means that the conversational chatbot authenticates the user by guiding them to log-in. 

After authentication, the chatbot can provide specific information for the user. For example, when the user asks “can i open an account for my business”, the bot can retrieve information about the user from the backend database and see that the user is a resident of another country. 

Based on that information, the bot could come back and say for example that for foreign residents opening a business account requires documents X, Y and Z. 

This is a way of providing very detailed information on the user and giving highly specific answers. Will cover this in our future blog post on authentication and the power it can provide. 


6. Summary

Context awareness is created into the conversational chatbot through understanding what the follow-up questions from the user can be and defining specific words and phrases that will trigger the follow-up answer.

Such context understanding provides customers more assurance and information about their query and eases their mind as they get an helpful answer.

You can get started with your own AlphaChat account already today and build your own context aware chatbot (you get a 10-day free trial with no payment information needed up front). If you have additional questions, reach out to support@alphachat.ai or contact us through the contact form and our technical team will gladly help you out.