Skip to content

Minimise LLM hallucinations through RAG with semantic graphs

Retrieval-Augmented Generation (RAG) based on semantic graphs or knowledge graphs is the most effective method to counter hallucinations in Large Language Models (LLMs). Our semantic data platform, Almato Bardioc, provides the foundation for secure applications.

Our customers want to fully exploit the potential of customised LLMs (Large Language Models). Examples of applications for such LLMs are chatbots in corporate customer service or for analysing laws and protocols in public administration. It is crucial that the output of the chatbot is correct. Since LLMs generally exhibit hallucination, effective measures must be taken to minimise this phenomenon. Currently, we consider retrieval-augmented generation (RAG) based on semantic graphs or knowledge graphs to be the most effective method. Our semantic data platform Almato Bardioc can be used as the basis for extremely robust and secure applications.

The following illustration shows the functional architecture of Almato Bardioc:

Bardioc Architektur EN

Architecture for retrieval-augmented generation based on Bardioc:

Architektur für Retrieval-Augmentation Generation_DE

The difference between retrieval-augmented generation based on Bardioc and other approaches without a knowledge graph lies mainly in the way information is retrieved and integrated into the generation process. Here are the main differences:

Retrieval-augmented generation based on Bardioc

  • Structured information

Bardioc stores data in a highly structured way. This structure makes it possible to efficiently capture and exploit relationships and connections between different data points.

The nodes represent entities (e.g. people, places, events), and the edges represent relationships between these entities.

 

  • Efficient retrieval of relevant data

Because the data in Bardioc's knowledge graph is already structured and linked, the retrieval process can be carried out in a targeted and efficient manner. This enables a precise selection of the relevant data and information.

Example: If you have a question about a law, the Knowledge Graph can quickly provide relevant information about this law, its history and its relationship to other laws or events.

 

  • Semantic Coherence

The structure of the knowledge graph helps to generate semantically coherent and consistent answers, as the relationships and hierarchies between the data points are explicitly defined.

This is particularly helpful when dealing with complex questions and generating detailed answers that take into account multiple entities and their relationships. It also significantly increases the reliability of the generated statements.

However, the phenomenon of hallucination cannot be completely avoided at present. This has been shown by numerous studies, such as „A Comprehensive Survey of Hallucination Mitigation Techniques in Large Language Models“ in which Stanford University and Amazon AI participated.

Approaches without Knowledge Graph

Unstructured or weakly structured information

These approaches are often based on large amounts of unstructured textual data (e.g. documents, articles, websites) that are stored in their raw form.

The information is not explicitly linked, making it difficult to retrieve relevant data.

Text-based retrieval methods

Without the structure of a knowledge graph, these approaches often rely on text search methods such as TF-IDF, BM25 or more advanced techniques such as Dense Passage Retrieval (DPR).

These methods search for relevant text passages based on keywords or similarities in the text, leading to less precise and sometimes incorrect or even harmful results.

Coherence and consistency

As the data is not structured, there is a high risk that the answers generated will be incoherent or inconsistent, especially if the information comes from different, unrelated sources.

This can lead to difficulties in integrating multiple sources of information into a unified and coherent response.

Summary

Bardioc (Knowledge Graph Based)

Leverages structured data and explicit relationships between entities, resulting in more accurate, coherent and consistent answers. Relevant information can be retrieved in an efficient and targeted manner. In this way, Bardioc provides a comprehensive and reliable knowledge source of enterprise and organisational data for text generation.

Without Knowledge Graph

Works with unstructured or weakly structured data, using text-based retrieval methods that are often less accurate. Generating coherent and consistent answers is more difficult and can lead to inconsistent results.

Using Bardioc and its knowledge graphs can therefore generate higher quality and more relevant answers, especially when complex and detailed information is required.

 

Let's talk!

We're ready when you are to get started. Please complete the form to connect to a sales representative today or contact us by phone at +49 711 3406-7810