How to make an intelligent Chatbot?

Table of Contents

When we watch a Hollywood movie and science fiction novels they depict some form of Artificial Intelligence as human-like robots that take over the world. But with the current innovation in Artificial intelligence technology, it has become more advanced and is capable of providing more benefits to the different industries as well.

AI was a term came into existence in 1956. It was in 1960s when the US department of defence took interest in this type of work and began training computers to mimic basic human reasoning. This was long before Siri, Alexa or Cortana came to be known the defence advanced research project agency completed street mapping project in 1970s.

The first chatbot developed was by MIT professor Joseph Weizenbaum in the 1960s. It was known as ELIZA.  

Other Chatbots came into existence in the second half of the 20th century later on.  

In today’s technology world Chatbot has created a new buzz in the business world. It’s increased potential has got itself with some great opportunities in the hands of marketers and executives. Chatbots are needed to understand and solve the human problems with it’s artificial intelligence.

It can process all forms of data whether it is text, audio or visuals. It can be used by business to streamline internal communication, provide good customer support, customize buying recommendations etc.

What makes artificial intelligence important ?

  • Adds intelligence.
  • Automates repetitive learning and discovery through data.
  • Adapts through progressive learning algorithms.
  • Analyzes more and deeper data.
  • Archives incredible accuracy.
  • Gets the most out of the data

What makes a chatbot intelligent ?

“I think chatbots are the furture of engagement between a fan and a brand or celebrity.” – Christian Milian

Bots aren’t smart by default. They are made capable of showing artificial intelligence by leveraging on technologies like machine learning, big data, natural language processing etc.

Building an intelligent chatbot is different thought and building a chatbot on a intelligent platform is altogether a different one. There are various successful chatbots built. So, as per this the platform becomes the intelligent agent and the chatbot becomes like a sensor for this intelligent agent.  

The intelligent agent works to gather all the user information, and process store and convert that information into a goal. The challenge at this point is not about infusing intelligence into chatbot but about creating an intelligent platform. The focus should be on the factors sense-think-act capabilities into the platform.

As of now, the chatbot motive is to meet user-centric task. And for this the chatbot should be intelligent. It is a challenge to build a intelligent chatbot when the elements surrounding the building process arise.

Let’s analyze how can artificial intelligence be infused in chatbots and make those conversations human-like.  

  • Contextual Understanding:

This is like the first challenge faced when trying to build a chatbot. To have a good understanding of context a bot needs to analyze inputs like time, day, date, conversation history, sentence structure etc. for a sensible responses both the physical context as well as linguistic context should be integrated. For incorporating the linguistic context, conversations have to be embedded into a vector which is a difficult task.

  • Coherent Responses:

To have a human like conversation a bot needs a tone and dialect for communication just like humans. We can’t expect bot to talk in different tones or accent but it needs to be consistent with its language and style. To accomplish this it is important to think of a character for the bot and stick to it while managing all the conversations. To achieve this coherence can be complicated, especially if the bots are in audio along with the text.

  • Generative Responses:

Most of the conversation on chatbot are based on predefined flow, which are directed to take the users from the stage of introduction to the conversation. The ability to produce relevant responses depends on how the chatbot is trained. The generative system fails if the chatbot is incapable of providing the diversity required to handle specific inputs.

  • Learning Abilities:

Chatbot might ask multiple question just to know about the user preference. But if it asks the same question every time it will become irritating. Also users tend to continue the conversation from the point they last left off. Therefore the machine learning abilities are needed for a chatbot to be looked upon as artificially intelligent.   

Where the chatbot is built on a open domain model, it gets difficult to judge whether a chatbot is performing its task. There isn’t a specific goal that is attached with the chatbot to perform. The main question is whether the chatbot performs the task it has been built for.         

Researchers found that the metrics used in this case cannot be compared to human judgment.  

As we look into the future, intelligent chatbots will be built to rule the world of connections.

How to know if a chatbot is intelligent ?

The AI chatbot has a goal to fix and works autonomously to achieve those goals. Choosing a goal for a situation is itself a complicated problem. The chatbot follows three step process for realizing the goal, Sense-Think-Act. The AI chatbot goes along the cycle to have progress towards pre-defined goals.

  • Ability to sense

The first step is sensing the environment to get the information it needs to execute a task. Chatbot gets it easy to listen what a user is conveying rather than typing into it. Like in case of a robot, the sensing part becomes a scientific challenge to infuse sensing power into it.  

  • Think

The chatbot has to convert the information received from the user into a understandable format and then store it in knowledge base. The chatbot makes a decision depending on the pre-existing knowledge. Make the chatbot think and take actions depending on the request placed by the user by using the neural network in machine learning.

The decision of chatbot are based on the information stored on knowledge base. Information gathered and learned helps the chatbot to decide on their actions ahead. Predictive analytics using machine learning makes the AI chatbot to plan in advance any queries that might come from the users. This adds to the chatbot intelligence.

Due to popularity of deep learning and neural network people know more about the learning that is possible. Learning helps intelligent agent to see patterns in the information received and responds to them accordingly. Though there are several agents that are quiet powerful and intelligent without learning component.

What does an intelligent agent do beside learning? The first thing it does is convert the useful information. Natural language processing and understanding is the area of AI that deals with issue in case of chatbots. Even though progress has been made in this area it is a problem that can’t be solved.

After the natural language and before the learning components lies the crucial part of making an intelligent chatbot. It’s the knowledge base, which means how to store the information gained. This is a important part since it determines the quality of learning and the level of intelligence that an intelligent agent is capable of showing.   

  • Act

The last step is to take the decision, based on all the gathered information and learnt. Now the chatbot has to act. The chatbot has to respond to the question raised by the user. The response for the audio and video query becomes difficult for the chatbot in the way it has to sound like a human.

A intelligent bot can plan a few steps ahead. The chatbot can make a decision on a series of questions to ask and modify this decision according to the information gathered.

What do you want the chatbot to do ?

It all depends on the purpose for which the chatbot has been created. Some of the common uses are:

  • Virtual Assistants

Different business have different purpose for the use of chatbot, such as customer service. AI services are required to answer simple questions, help with booking services, buy products etc. chatbot helps with these task and allows human agent to focus on more relevant problems. Chatbot also let’s company have 24/7 services to serve their customers.    

  • Idea Generation

Data is a very important factor in the digital economy. It is important to have the resources to transform them into something which has value. The companies generally have the solutions in place that can automatically learn from the data they collect. The artificial intelligence is considered powerful because of the fact that it can learn. This helps them to adapt when there is a change in the market behaviour as well improve the performance as more data gets collected.       

  • Automation of manual processes

Artificial intelligence automates routine and mechanical cognitive processes. The intelligent algorithms now can collect data from various reports and conduct an analysis to check the profitability of a particular business path.

  • Analysis  of unstructured data

There is about 80% of data that is not structured. Tracking and organizing these data leads to a better understanding of the users.

There are two types of chatbot i.e Rule based bots and AI bots.

As explained by the Co-Chief AI Scientist Kumar Shridhar at BotSupply how both them work.

Rule Based Approach:

Under this approach the bot answers the question based on the rules it has been trained on.

The rules can be simple or complex. Even though the creation of these bots are straightforward they are not efficient enough to answer questions, whose pattern does not match with the rules the bots has been trained on.

Artificial intelligence:

For a chatbot needs to have artificial intelligence to do more than just simply answer questions. AI allows the bots to learn from the interactions it gets from the end users. Behind all this learning there are analytics platforms, integration with APIs etc. These add to the AI and provide resources so that the chatbot is able to respond to users with a correct answers.    

While infusing the chatbot with the AI it can either help the users or collect information from the users. A chatbot that helps is considered more smarter than the chatbot as a collector.

A intelligent chatbot can help users buy products, seek informations etc. A helper chatbot is recognized by its natural language processing and understanding power.

Collector chatbot leads the conversations with the users. They work on predefined questions and are not smart enough to respond to user in case of a query. The purpose of increasing the intelligent quotient in the collector chatbot depends on the intelligent platform where they are built to reside.

The question here is How can we build intelligence into a collector chatbot ?

A collector chatbot becomes intelligent when it collects information from the users and presents it in the most appropriate way to the user’s purpose.      

So are all chatbots intelligent ?

If you are talking through a messenger to a machine/ algorithm and it is giving you some kind of responses, that means you are talking to a chatbot. But are all of these intelligent chatbot?  

Most of the chatbots assumes to be intelligent but they are far along the way. But it doesn’t have to be this way, there is some amazing technology which can help change that.

These technologies are:

  • Semantic parsing  –

It converts the user expressions into a form that is understandable to the computer.

Let’s take an example,  

Using semantic parsing for pancakes

“I’d like a pancake with chocolate sauce”. It is clear here that i want pancakes with chocolate sauce. But if “I want pancakes with waffles”. It would surprising to see pancakes with waffles toppings.

This is called prepositional phrase attachment. It defines whether the phrase “with waffles” attach to “pancake” or  “want”?

A traditional parser will only tell you the sentence structure. It will help you understand the sentence as a whole. Here semantic parser will translate the sentence into a form which is understandable by the computer.

With chatbot this is a structure that would be referred to as intent. Which might look like this:


        “Intent”:   “order-items”,

        “Items”:  [{

        “item -name”:   “pancakes”,

        “Toppings”:        [“chocolate sauce”]



On the other hand the intent for “I want pancakes with waffles” would look like this:


        “Intent”:   “order-items”,

        “Items”:  [{

        “item -name”:   “pancakes”,

        “Toppings”:        [“Waffles”]



In first case it is clear chocolate sauce is needed as topping whereas in second case it has two items pancakes and waffles.

Chatbot tools such as Dialog flow, have semantic parsers that will do this type of analysis. But this is very limited. They do not give such an output as described in the intent.  

Semantic parsers do this analysis. So if there is this sort of technology to make the chatbots smarter why isn’t it being implemented?

The reasons are:

  • May be chatbot designer are not familiar with this.
  • It adds on the complexity to the tools. The intent handling in most current cases are easy and simple flat structure. If they become trees of arbitrary depth and complex, it would make everything much more difficult.
  • It also makes it harder for the chatbot designer to figure out how to handle these trees.   

Doing AI is a difficult task. Until some serious efforts are put in and the chatbot designer starts to demand more from their tools nothing can seem to go further and the chatbot will remain the same.

  • Automated planning –

It chooses a series of action to achieve a goal.

If we are able to overcome these obstacles, we may be able to have a nice complex trees for our users.

A request from a user can be viewed as a goal or desire of the user, and there is a whole lot of AI trying to complete these goals by Automated planning. Wouldn’t it be much better if the chatbot could firgure out the best way to deal with this by itself ? This is where automated planning can work.

There would still be more work to do. We would have to describe the “world” that the chatbot resides in, so that it will know the actions it has to take and know about the effects of those actions. There is a formal language called Planning Domain Definition Language, or PDDL for this purpose.

There are different PDDL for different types of problems. One of these problems is particularly Observable Markov Decision Processes or POMDPs. They have been applied with the spoken dialogue system by Steve Young at Cambridge and his colleague and allow uncertainty in the result of actions and current state of the world.  

SLU – spoken language understanding unit.

NLG – natural language generation unit.

The output of spoken language understanding unit may include uncertainty about what the user said. Similar is the case with the chatbot where there is still uncertainty and ambiguity about what the user intended.

This type of confusion is generally created because of sentence structure. For example the word “run” has around 606 meaning in the Oxford English Dictionary. This type of intepretation can easily be incorporated into a POMDP.

Instead of tracking a single state, the POMDP can keep a track of distribution over possible states. This defines it is able to act rationally even in the suitation of uncertainty.  

(Planning system – Dialogue Manager)

So instead of defining how chatbot should act in every suitation, it defines what can a chatbot do best. This will make the chatbots more intelligent.

We still need to describe what a chatbot is suppose to say. And we probably need it to form it’s own sentences that’s where natural language generation comes in.

  • Natural language generation

It helps the computer to respond to people in it’s own language.

The current system will take up a template sentence with one or two slots which can be filled and returned to the users. But what if the users are looking for a detailed information?

Imagine we could generate any form of data infomation automatically. You could ask for a brief idea on web analytics, or you could ask about retention, new users, or landing pages. All the queries would be translated into a set of database queries and the results would be summarised for you. The possibilities are endless.

Natural language processing is about finding answers by parsing language into intent, entities, agents, actions, and contexts. With NLP as the driving force, NLP platforms like WIT< API, and LUIS can be used to built an intelligent chatbot.

Are the travel bots or weather bots that provide some information on your query are artificially intelligent? Ofcourse they are, but they are not far along the conversation axis.

There are various articles about how to build a chatbot that appears intelligent. It could be the conversational interface or the natural language processing or it is able to understand sentences that you structure in a wrong way.  

For lot of people if a chatbot answers questions off topic it is smart. But their is another defination to it that is the chatbot has memory, it should be able to remember who you are and provides responses accordingly. For few this is also not good enought the chatbot should actually learn something over time and also evolve over time or else it is not intelligent.

There isn’t any one specific deifination to it. The important question here is “ is it actually useful in the chat from?” if the chatbot interface allows you to do something better than what is possible in another form, it is adding value. If you are trying to look whether a chatbot is intelligent or not, the question you should ask yourself is whether its functionality coud be replaced?

You comment on this below.

About the author

Website | + posts

Co-Founder @ BigRadar. Building conversational interfaces for small and large enterprises.

More to explorer

Leave a Reply

Your email address will not be published. Required fields are marked *

BigRadar Logo

Your customer’s like Conversational

© 2023 BigRadar Inc. All Rights Reserved.