Why Your Chatbot Should Be Based On Knowledge Graphs!

By Published On: March 6th, 2023Categories: chatbots, conversational ai, knowledge graphs

When companies start developing an AI-based chatbot or voice assistant, a machine learning-based approach is usually chosen. However, this method of Non-Symbolic AI only exploits part of the potential of AI, and many of these chatbots soon encounter limitations.

Artificial intelligence encompasses both – Symbolic AI and Non-Symbolic AI. In this article, we discuss what these approaches are and why the use of Symbolic AI based on a Knowledge Graph can be more effective, especially for medium-sized enterprises.

Machine Learning

In addition, we look at why a combined use of Symbolic and Non-Symbolic AI is the most promising approach for the development of efficient chatbots.

 

Symbolic versus Non-Symbolic AI

We have already dealt in detail with the distinction between these two subfields of AI in other articles (see e.g. What is Hybrid AI & what are the benefits for businesses?).

In case you don’t remember, here’s a quick summary:

  • Non-Symbolic AI: Learning or training an algorithm/the AI on the basis of examples or training data from which rules are derived, basically like training on the job.
  • Symbolic AI: AI learns from models and rules, so no training data is required, it’s like going to school.

In the following, we will take a closer look at the development of Conversational AI based on non-symbolic AI, specifically by means of machine learning methods, as well as with symbolic AI, specifically by means of a Knowledge Graph, and show the prerequisites and limitations. 

We will focus in particular on the implementation of such Conversational AI in medium-sized companies and the challenges they face. 

 

Non-symbolic AI: development of machine learning-based chatbots

Many companies intend to develop a chatbot or voice assistant based on a machine learning approach. Unfortunately, however, due to a misunderstanding of the term and inflated expectations in practice, the results for companies are sobering.

 

“Machine Learning” is only a single method of Artificial Intelligence

The term machine learning is often used synonymously with artificial intelligence, a very common misconception. In fact, machine learning is only one of many methods of AI, specifically an approach to the subfield of non-symbolic AI. 

In general, machine learning describes a method that enables systems to recognise patterns, rules and regularities on the basis of examples and algorithms and to develop solutions from them.

 

How to develop machine learning-based chatbots

If you use machine learning to develop conversational assistants, you proceed as follows:

  • You collect A LOT of sample dialogues from the field of application of the chatbot or voice assistant e.g. customer service or IT helpdesk. 
  • The Chatbot is asked by users about certain topics or criteria. A human behind it, i.e. “the trainer”, decides whether the chatbot’s answer is correct or not. 
  • This feedback goes to the Conversational AI system. On the basis of this “right/wrong” assignment, the machine learns which answers are correct and should be used in the future.

 

So when is it a good idea to use a machine learning-based chatbot?

If relatively few examples cover a topic well, then good results can be achieved quickly with the machine learning approach. This is the reason why image recognition via machine learning works very well. With just a few distinctions, you can distinguish aircrafts from birds very well, for example.

ATTENTION!!! Machine Learning ≠ “Self-learning”

Unfortunately, we keep experiencing a widespread misconception. Even though this would be great, machine learning, unfortunately, does not mean that these systems can learn independently or are “self-learning”. 

A large amount of training data and examples must be fed into these systems. And their interpretation has to be confirmed or validated by humans. “Unsupervised learning”, although very intriguing, is unfortunately still largely fiction. Read more about it here: Supervised vs. unsupervised learning – use & myths!

The chatbot’s knowledge is successively expanded through ongoing training and examples. Accordingly, this is a rather manual, iterative process in the beginning. 

With large amounts of data, there is a high implementation potential. If you have a lot of similar training data, machine learning can be very efficient.

 

Disadvantages and limitations of a machine learning-based approach

The prerequisites for a machine learning-based approach are mostly not met, because: 

  • Companies need a huge amount of training data to be able to map the numerous use cases that exist in reality.
  • In reality, companies are confronted with a multitude of completely different variations and question combinations for similar use cases.
  • You have to iteratively train the chatbot on an ongoing basis by interpreting the results and improving its knowledge.
  • The training approach is highly specific; even slightly different requests can usually no longer be recognised and understood.

However, customer service in most medium-sized companies is characterised exactly by these criteria: complex products, heterogeneous requests & only a small number of similar requests. 

Use cases with these characteristics make the use of machine learning-based assistants almost worthless. The development would be expensive and labor-intensive. The results permanently suboptimal and frustrating. Employees would be overloaded instead of relieved, companies would have additional work instead of savings and automation.

For this very reason, we at Onlim are convinced that a Knowledge Graph-based approach is the best starting point for the development of Conversational AI. 

 

Symbolic AI: Chatbots based on a Knowledge Graph 

A Knowledge Graph is a form of knowledge representation in which data is set into relation with each other. It belongs to the sub-area of Symbolic AI (also called “good old fashioned AI” due to its origins), where logical relationships between data or entities are recorded in a machine-readable format.

To illustrate the use of a Knowledge Graph in more detail, we will give you a simplified example based on Wolfgang Amadeus Mozart.

Knowledge Graph example - Wolfgang Amadeus Mozart

If one were to model “Wolfgang Amadeus Mozart” in a Knowledge Graph, then facts would come up such as

  • WAM was a composer. 
  • WAM lived in Salzburg. 
  • Salzburg is a city in Austria. 
  • The river Salzach flows through Salzburg. 

This is how you build a model on a certain topic. Based on this model, the chatbot can then answer questions such as “What is the name of the river where WAM lived?” WITHOUT having to teach the chatbot these questions beforehand with the machine learning approach.

Knowledge Graphs can be used in a variety of ways after development

At Onlim have already developed many graph models, e.g. in tourism. If a chatbot needs to be developed and should for example answer questions about hiking tours, we can fall back on our existing model. We already know how users ask for various things. All we have to do is enter the relevant information and the Knowledge Graph is ready.

There are a number of domain models that we have already created and that we are successively expanding. Of course, new domain models can also be developed. 

We need structured information for this, for example in the form of product data. We set up the Knowledge Graph and can then either import the data into our platform or access internal or publicly accessible data sources (open data) via interfaces.

 

What are the concrete advantages of a Knowledge Graph-based chatbot?

By semantically modeling a certain topic in a Knowledge Graph, e.g. products and product specifications, the chatbot knows HOW to interpret and answer questions about this model.

In this way, the chatbot has more knowledge right from the start (without the need for lengthy training) and can then be successively developed further during operation without creating training data.

Since no training data is required, you can start relatively quickly, depending on the complexity of the model and topic. Once you have the knowledge model, you can set the chatbot live and it doesn’t matter if it receives 1 or 1,000 requests a day – it can answer them meaningfully.

Disadvantages/limitations of Knowledge Graph-based chatbots

It is hard to find real disadvantages of the Knowledge Graph-based approach for developing a chatbot or voice assistant. The results are almost always better from the start. However, there is one challenge that should not be denied:

A real disadvantage of the Knowledge Graph-based approach is that it is more difficult to explain. And, therefore, also a little bit more complicated to understand how it works and how to use it. 

All employees concerned have to get more involved in the topic and be willing to do the necessary preparatory work in order to be able to reap the rewards of this approach.

Example: Development of a tourism chatbot based on the Knowledge Graph or Machine Learning approach

A comparison of the development of a chatbot in the tourism industry using machine learning or a Knowledge Graph should provide more clarity on how the approaches differ and what the benefits are. 

A holiday trip consists of parameters such as a destination, duration, price, number of people, type of accommodation, time, places of interest, etc. These parameters can be modeled in a Knowledge Graph. If you model these parameters in a graph, the Conversational AI can answer various questions about this model.

A possible query would be, for example, “I am looking for accommodation in Florence on 1 June for 5 days for 2 people with a price that does not exceed €120 per night”. This specific query can be answered in the same way as the question “I am looking for accommodation in Florence”, because in the underlying knowledge model the corresponding parameters have all already been taken into account and set in relation to each other.

With a machine learning-based approach, you would have to tell the chatbot specifically “If this question is asked, then answer this. If this, then this…” However, if a request comes up like “I want to go to Florence…”, this may deviate from the given training data and will therefore most likely not be answered.

Some groundwork on Knowledge Graph-based Conversational AI outperforms machine learning-based Conversational AI 

The setup of a chatbot using a machine learning approach can be quite quick. It is basically like “training on the job”, using concrete queries from operational use and trying to derive patterns and rules from them. 

Accordingly, such a chatbot can be very good at covering very homogeneous types of queries but shows great weaknesses in answering general, yet unknown queries.  

If, however, you chose a Knowledge Graph-based approach, more planning and preparation are required in advance. The chatbot is “first sent to school”, it has to learn entities, their interrelations, rules and types of possible queries. 

Using structured data, for example from product catalogues or open data, entities such as people, organisations, events, places, are modeled with their relations to each other and a domain model is developed. This would be a broader, more general education that prepares for diverse use cases and heterogeneous queries. 

All these steps are done before the chatbot goes live. Generally, more than 90% of queries can be answered correctly starting with the first query. Machine learning can then be used for the ongoing optimisation of the Knowledge Graph-based chatbot.

 

Medium-sized companies benefit from this in many ways:

  • Operational support from the first request
  • Minimal optimisation effort during operation
  • A large number of heterogeneous inquiries can be answered 
  • Better customer experience through faster responses 
  • Immediate cost savings through increased efficiency in customer service

 

Onlim’s approach: Combined use of Symbolic and Non-Symbolic AI

So far, we have discussed the either-or of machine learning- and Knowledge Graph-based approaches. In fact, we argue that Knowledge Graph-based Conversational AI offers many advantages, however:

The best results can be achieved by continuously optimising a Knowledge Graph-based chatbot using machine learning. 

A Knowledge Graph-based chatbot can derive models and rules by learning the stored relations of the different entities. This enables it to effectively answer queries based on the parameters or entities recognised in the query. In the first step, we create such a Knowledge Graph for our clients, which can act very quickly and cost-efficiently from the first query.

Subsequently, we also use machine learning. After a Knowledge Graph-based chatbot has gone live, we use the dialogues for further optimisations of the chatbot.

Onlim_machine learning vs knowledge graph chatbot

Case study: Knowledge Graph-based chatbot impresses from the beginning!

Let us give you an example of how medium-sized companies benefit from implementing a Knowledge Graph-based assistant that goes beyond a Machine Learning-based approach.

This is a short case study of a customer with whom we recently developed a Knowledge Graph-based chatbot. It only took 4 weeks from the project start to going live.

A producer of a niche product had previously used a conventional chatbot and a lot of effort in training the bot because the customer inquiries were heterogeneous and varied. In fact, employees had to answer almost all queries manually because there was no “training effect”. After more than 7 months, the team was still very much involved in the training of the chatbot, the company had hardly achieved any relief and no cost benefits.

Onlim has mapped the company’s product catalogue in the form of a Knowledge Graph. We also enriched it with information such as spare parts, availability, etc. This enabled us to launch the chatbot within a month – with a far greater scope and the ability to meaningfully answer questions that it previously could not.

The company now actually benefits from the advantages of a chatbot, regardless of whether 50 or 1,000 inquiries are made daily. The inquiries in turn serve as a starting point for further automated optimisations of the chatbot. With this process, the chatbot is continuously optimised and further developed.

Conclusion

After this detailed discussion of the two approaches, it is time for a brief summary. 

You can develop chatbots and voice assistants using different approaches.

The machine learning-based approach requires a lot of training data, which is typically collected and created manually.

Medium-sized companies (and large companies anyway, because of their huge amount of interactions) often have very heterogeneous, complex and relatively few inquiries. That is why we recommend a Knowledge Graph-based approach. In a Knowledge Graph entities and information are modeled with their relationship to each other. Therefore, a chatbot can provide meaningful answers and offer the operational relief and automation that companies are looking for from the very first query.

To remember:

To summarize, the Knowledge Graph-based chatbot has more knowledge faster and can provide better answers to a larger number of more diverse queries. 

More Knowledge For Chatbots And Voice Assistants

In the whitepaper “More Knowledge For Chatbots And Voice Assistants” you will learn how meaningful conversations between humans and machines are made possible in automated customer communication through so-called Knowledge Graphs.

Onlim_Chatbot-Whitepaper

Request whitepaper

Are you considering Conversational AI for your company? Are you wondering whether a machine learning or Knowledge Graph-based approach would be more effective? Schedule a free demo with our experts. 

More articles