Knowledge Graphs & Creating An Ontological Structure For Enhanced FAQ Chatbots

Here I take a look at practical implementations of Knowledge Graphs by considering Kore AI & Microsoft’s approach.

Cobus Greyling
5 min readOct 5, 2022

--

For a breakdown of the five other approaches to managing knowledge and QnA, click here. This post focusses on Knowledge Graphs and how Kore AI and Microsoft approach the problem.

The challenge of managing knowledge in a chatbot has been approached from various angles. The idea is that an organisation has a body of information which needs to be made available to users via a conversational interface.

The basic idea is that a user enters a question in natural language (1), which is inherently unstructured data. This data needs to be structured to perform a semantic search (2) on the stored knowledge (3) and the structured data extracted needs to be unstructured into a coherent, concise and succinct natural language response message (4).

Please follow me on LinkedIn for the latest updates on Conversational AI. 🙂

What Is A Knowledge Graph?

In its simplest form, a knowledge graph (KG) is a knowledge base using a graph structure, and underlying topology. In the Knowledge Graph elements are linked via semantic similarities.

With most commercial Knowledge Graphs, data can be uploaded from files like PDF’s, text files, etc. Or a URL can be defined and the KG extracts the information and organises it according to semantically similar questions and answers. Below is the Kore AI GUI for importing knowledge documents.

And in the following image, the import results can be seen; I used the OpenAI Whisper white paper as the data source, the grouping of semantically similar clusters are evident.

Please follow me on LinkedIn for the latest updates on Conversational AI. 🙂

Ontology

The following step in creating and finalising the Knowledge Graph is creating the Ontology. This definition from Wikipedia describes an ontology best:

In computer science and information science, an ontology encompasses a representation, formal naming, and definition of the categories, properties, and relations between the concepts, data, and entities that substantiate one, many, or all domains of discourse.

~ Wikipedia

By having sub or nested nodes, the ability to manage the graph nodes become less of a challenge during scaling of functionality. The nodes have an easy drag and drop approach to construct the ontology engine.

In most commercial knowledge graphs the ontology or node structure is the framework or hierarchy lending structure to the Knowledge Graph. Below is a practical example from the Kore AI UI, where the node structure is created on the left, and a question/answer set can be dragged to a specific node or sub-node.

Apart for imported data, intents can be created and assigned to specific nodes in the ontology.

This approach is analogous to the approach of Microsoft, where a structure can be defined using nodes with follow-up facts; as seen below.

Please follow me on LinkedIn for the latest updates on Conversational AI. 🙂

Final Thoughts…

Knowledge Graphs are sure to grow in popularity and in sheer computing power to convert data into a conversational experience. However, in order for a Knowledge Graph to scale well, it is crucial that the ontology is mapped out accurately.

Hence a data-centric latent space is well suited for creating the relevant nodes or data labels for the ontology. In turn nodes / labels are a hierarchal collection of semantically similar facts or utterances.

However, I’m wondering…

  • Should a Knowledge Graph not have a more flexible bi-directional ontology?
  • Potentially connecting multiple nodes together based on semantic connections?
  • Should the word taxonomy not be used instead of ontology? Especially considering that nodes are organised in a hierarchical classification, ordered by groups and types?
  • And how will the methods of custom crafting a Knowledge Graph evolve in the sort term?

I’m currently the Chief Evangelist @ HumanFirst. I explore and write about all things at the intersection of AI and language; ranging from LLMs, Chatbots, Voicebots, Development Frameworks, Data-Centric latent spaces and more.

https://www.linkedin.com/in/cobusgreyling
https://www.linkedin.com/in/cobusgreyling

--

--

Cobus Greyling

I explore and write about all things at the intersection of AI & language; LLMs/NLP/NLU, Chat/Voicebots, CCAI. www.cobusgreyling.com