Right now, there is a great deal of excitement about Generative AI (Artificial Intelligence) especially Large Language Models (LLMs). The initial hype surrounding ChatGPT is arguably waning, but there is enough technology and academic research for serious developer attention. Despite the potential of the approach, LLMs come with a range of challenges. These include the well-known issue of hallucinations (making up persuasive falsehoods), but also false logical reasoning (if two shirts take two hours to dry on the line, how long do five shirts take?), and giving the wrong answer when a question is inverted.
In addition, there are high costs associated with training an enterprise-use LLM. It is complex to update and maintain them, and it is difficult to conduct audits and provide explanations. The drawbacks of LLMs can be significantly addressed by supporting them with knowledge graphs built atop modern graph database engines.
A knowledge graph is an information-rich structure that provides a view of entities and how they interrelate. They are a natural fit for graph databases which are well-suited for applications that involve complex, interconnected data with many relationships. We can express these entities and relationships as a network of assertable facts, that is a “graph” of what we know. Having built such a structure, we can query it for patterns but can also compute over the graph using graph algorithms and graph data science. Doing so can uncover facts that were previously obscured and lead to valuable insights. By pairing a knowledge graph with an LLM, four main approaches emerge:
First, the natural language processing features of LLMs can process a huge corpus of text data. We then ask the LLM itself to produce a knowledge graph. The knowledge graph can be inspected, QA-ed, and curated. Importantly, the knowledge graph is explicit and deterministic about its answers in a way that LLMs are not.
In the second approach, instead of training LLMs on a large general corpus, enterprises can train them exclusively on an existing knowledge graph. That means they can build natural language chatbots that appear very knowledgeable about a firm’s products and services and can answer users without risk of misleading hallucinations.
In a third approach, messages going to and from the LLM can be intercepted and enriched with data from the knowledge graph. On the path into the LLM we can enrich prompts with data from the knowledge graph, while on the way back from the LLM, we can take embeddings and resolve them against the knowledge graph to provide greater depth and context for the answer.
In a fourth approach, which is active in the research sphere, better AIs can be built with knowledge graphs. Here, an LLM is enriched by a secondary smaller AI, known as a “critic.” The critic looks for reasoning errors in the LLM. In doing so it creates a knowledge graph for downstream consumption by another “student” model. Ultimately, the student is smaller and more accurate than the original LLM since it never learns factual inaccuracies or inconsistent answers to questions, and fiction is largely omitted.
It’s worth reminding ourselves why we are doing all this work with ChatGPT-like tools. Using Generative AI can help knowledge workers execute queries they want to be answered without having to understand and interpret a query language or build multi-layered APIs. This has the potential to increase efficiency and allow employees to focus their time and energy on more value-added tasks.
Click here to read the original article published by Data Centre Dynamics Ltd (DCD).
Please give your feedback on this article or share a similar story for publishing by clicking here.