RAKG:Document-level Retrieval Augmented Knowledge Graph Construction

Hairong Zhang, Jiaheng Si, Guohang Yan, Boyuan Qi, Pinlong Cai, Song Mao, Ding Wang, Botian ShiarXiv 2025 · DOI

Abstract

Knowledge Graph Construction (KGC) from long-form documents is often hampered by Large Language Models' (LLMs) tendency to forget early context or struggle with complex coreferences. We present RAKG (Retrieval Augmented Knowledge Graph), a framework that reverses the typical RAG paradigm by using retrieval to assist in the construction of high-fidelity knowledge graphs. By performing sentence-by-sentence entity recognition followed by retrospective context retrieval for each entity, RAKG achieves a record 95.91% accuracy on the MINE dataset, significantly reducing hallucinations and improving entity coverage.

Introduction: The Challenges of Document-Level KGC

Building Knowledge Graphs (KGs) automatically remains a significant challenge in Natural Language Processing. While LLMs have improved extraction capabilities, they face three primary hurdles when processing long documents:

  1. Long-Context Forgetting: Models often lose track of entities mentioned at the start of a text as they progress.
  2. Coreference Complexity: Resolving multiple mentions of the same entity across thousands of words is computationally intensive.
  3. Hallucinations: LLMs may generate relationships not explicitly supported by the source text.

RAKG addresses these issues by treating the construction process as a retrieval task, ensuring that every extraction is grounded in specific, retrieved context.

Methodology: Progressive Knowledge Extraction

The RAKG framework employs a "progressive knowledge extraction" strategy that focuses on both topological structure (nodes) and relationship alignment (edges).

The RAKG architecture for progressive knowledge extraction.

The process consists of four main stages:

  1. Topological Structure Coverage: RAKG performs sentence-by-sentence Named Entity Recognition (NER) to ensure no minor entities are overlooked.
  2. Entity Disambiguation: Mentions are merged using a two-step filter involving vector similarity and an LLM-based "judge" for precision.
  3. Relationship Network Alignment: This is the core "RAG" component. For each entity, the system retrieves all relevant text chunks (Corpus Retrospective Retrieval) and existing neighboring nodes (Graph Structure Retrieval).
  4. LLM Integration & Validation: The LLM generates relationships based on this concentrated context. A final factual verification step prunes any triples not supported by the source text.

Experimental Setup

The authors introduced the MINE dataset to evaluate performance. This dataset consists of 105 articles, each approximately 1,000 words long, covering diverse domains such as history, art, and science. Performance is measured by the "semantic inclusion rate" of 15 manually verified facts per article. RAKG was compared against two primary baselines: KGGen (a clustering-based approach) and Microsoft’s GraphRAG.

Key Results and Discussion

RAKG demonstrates a substantial performance leap over existing state-of-the-art methods, particularly in accuracy and entity coverage.

Accuracy distribution across different KGC methods.

Key performance metrics include:

  • Accuracy: RAKG achieved 95.91%, representing a 6.2% improvement over GraphRAG (89.71%).
  • Entity Coverage (EC): RAKG reached 0.8752, capturing nearly 88% of ideal nodes, whereas GraphRAG captured approximately 64%.
  • Relation Similarity (RNS): A score of 0.7998 indicates high semantic fidelity to the source text.
  • Hallucination Mitigation: The validation pass rates (91.33% for entities and 94.51% for relations) confirm the effectiveness of the "LLM as judge" filtering mechanism.

Conclusion and Future Work

RAKG proves that retrieval-augmented techniques can be as effective for building knowledge structures as they are for querying them. By contextualizing extractions, RAKG overcomes the inherent limitations of LLM context windows.

However, challenges remain. The computational overhead of per-entity retrieval is significant, and the system's current focus is on single-document construction. Future research will explore multi-document knowledge integration and optimizing the cost-efficiency of the validation pipeline.

Summary updated

BibTeX
@misc{zhang2025rakg,
  author = {Hairong Zhang and Jiaheng Si and Guohang Yan and Boyuan Qi and Pinlong Cai and Song Mao and Ding Wang and Botian Shi},
  title = {{RAKG:Document-level Retrieval Augmented Knowledge Graph Construction}},
  year = {2025},
  eprint = {2504.09823},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2504.09823},
}
Figure