Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Lead: Diego

Draft Daniel BurkhardtShort definition/description of this topic: Retrieval-Augmented Generation (RAG) is a method that combines

Explanation of concepts

  • Retrieval-augmented generation (RAG) methods combine retrieval mechanisms with generative models to enhance the output of

...

  • LLMs by incorporating external knowledge.

...

  • Standard RAG: Utilizes vector databases to retrieve documents based on semantic similarity, which are then used to augment the generative process of language models.
  • Graph RAG: Integrates knowledge graphs into the RAG framework, allowing for the retrieval of structured data that can provide additional context and factual accuracy to the generative model
  • By grounding the generated output in specific and relevant information, RAG methods enhance the quality and accuracy of the generated output.
  • Types of RAG:

    • Conventional RAG has three components: 1) Knowledge Base, typically created by chunking text documents, transforming them into embeddings, and storing them in a vector store. 2) Retriever searches the vector database for chunks that exhibit high similarity to the query. 3) Generator feeds the retrieved chunks, alongside the original query, to an LLM to generate the final response.
    • Graph RAG integrates knowledge graphs into the RAG framework, allowing for the retrieval of structured data that can provide additional context and factual accuracy to the generative model. 
  • RAG is used in various natural language processing tasks, including question-

...

  • answering, information extraction, sentiment analysis, and summarization. It is particularly beneficial in scenarios requiring domain-specific knowledge

...

  • .

Conventional RAG Limitations

Despite its advantages over standalone LLMs, Conventional RAG has the following limitations:

  1. Struggles to answer queries that require the intricate interconnectedness of information and global context crucial for generating comprehensive summaries.
  2. It cannot integrate structure and unstructured data, a use case typically required in industrial applications.
  3. Limited accuracy due to context loss during text chunking and its reliance on text similarity search.
  4. It has limited reasoning capabilities, especially with abstract questions that require reasoning, inference, or the synthesis of new information not explicitly stated in the source material.

We describe various solutions for integrating knowledge graphs into RAG systems to improve accuracy, reliability, and explainability. 

Answer 1: KG-Guided Retrieval Mechanisms

Contributors:

  • Daniel Burkhardt (FSTI)
  • Robert David (SWC)
  • Diego Collarana (FIT)
  • Daniel Baldassare (doctima)
  • Michael Wetzel (Coreon)

Short definition/description of this topic: KG-Guided Retrieval Mechanisms involve

...

Answer 1: KG-Guided Retrieval Mechanisms

Contributors:

  • Daniel Burkhardt (FSTI)
  • Robert David (SWC)
  • Diego Collarana (FIT)
  • Daniel Baldassare (doctima)
  • Michael Wetzel (Coreon)

Short definition/description of this topic: KG-Guided Retrieval Mechanisms involve using for example knowledge graphs or vector databases to enhance the retrieval process in RAG systems. Knowledge graphs provide a structured representation of knowledge, enabling more precise and contextually aware retrieval of information. This approach can directly query knowledge graphs or use them to augment queries to other data sources, improving the relevance and accuracy of the retrieved information.

...

  • Initial RAG idea: Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks
  • RAG is commonly used with vector databases.
    • can only grasp semantic similarity represented in the document content
    • only unstructured data
    • vector distance instead of a DB search limits the retrieval capabilities
  • Graph RAG uses knowledge graphs as part of the RAG system
    • KGs for retrieval (directly), meaning the database is storing KG data
    • KGs for retrieval via a semantic layer, potentially retrieving over different data sources of structured and unstructured data
    • KGs for augmenting the retrieval, meaning the queries to some database is modified via KG data
  • Via Graph RAG, we can
    • ingest additional semantic background knowledge (knowledge model) not represented in the data itself
      • additional related knowledge based on defined paths (rule-based inference)
      • focus on certain aspects of a data set for the retrieval (search configuration)
      • personalization: represent different roles for retrieval via ingesting role description data into the retrieval (especially important in an enterprise environment)
    • reasoning
    • linked data makes factual knowledge related to the LLM-generated knowledge and thereby provide a means to check for correctness
    • explainable AI: provide justifications via KG
    • consolidate different data sources: unstructured, semi-structured, structured (enterprise knowledge graph scenario)
    • doing the actual retrieval via KG queries: SPARQL
    • hybrid retrieval: combine KG-based retrieval with vector databases or search indexes

Answer 2: Hybrid Retrieval Combining KGs and Dense Vectors

Contributors:

  • Daniel Burkhardt (FSTI)
  • Diego Collarana (FIT)
  • Daniel Baldassare (doctima)

Draft from Daniel Burkhardt

...

      • environment)
    • reasoning
    • linked data makes factual knowledge related to the LLM-generated knowledge and thereby provide a means to check for correctness
    • explainable AI: provide justifications via KG
    • consolidate different data sources: unstructured, semi-structured, structured (enterprise knowledge graph scenario)
    • doing the actual retrieval via KG queries: SPARQL
    • hybrid retrieval: combine KG-based retrieval with vector databases or search indexes

Answer 2: Hybrid Retrieval Combining KGs and Dense Vectors

Contributors:

  • Daniel Burkhardt (FSTI)
  • Diego Collarana (FIT)
  • Daniel Baldassare (doctima)

Draft from Daniel Burkhardt

Short definition/description of this topic: Hybrid Retrieval combines the strengths of knowledge graphs and dense vector representations to improve information retrieval. This approach leverages the structured, relational data from knowledge graphs and the semantic similarity captured by dense vectors, resulting in enhanced retrieval capabilities. Hybrid retrieval systems can improve semantic understanding and contextual insights while addressing scalability and integration complexity challenges. 

Key Challenges

  • Knowledge Graph Construction and Maintenance: Creating and updating high-quality knowledge graphs for specific domains can be challenging and resource-intensive.
  • Scalability and Efficiency: Retrieving information from large and complex knowledge graphs while maintaining acceptable response times remains challenging.
  • Evaluation Standardization: The lack of widely accepted benchmarks and evaluation metrics hinders progress and comparability across Graph RAG approaches. The quality of KG is crucial.
  • Human Element, we need knowledge engineers and domain specialists. 

References

How do I enhance LLM explainability by using KGs? (2.2 – Answer Verification) – length: up to one page

...