Research on Graph-Retrieval Augmented Generation Based on Historical Text Knowledge Graphs

Fan Yang, Qi Zhang, Wenqian Xing, Chang LiuarXiv 2025 · DOI

Abstract

This paper presents a Graph-Retrieval Augmented Generation (GraphRAG) framework tailored for the analysis of ancient Chinese historical texts. General-purpose Large Language Models (LLMs) often struggle with the semantic complexity and data scarcity inherent in classical literature, leading to frequent hallucinations. By constructing a domain-specific knowledge graph from "The First Four Histories" and implementing a novel process supervision scoring method, the proposed system enhances retrieval accuracy and reasoning. Results demonstrate that the fine-tuned Xunzi-Qwen1.5-14B model significantly outperforms general models in relation extraction, and the GraphRAG framework effectively reduces hallucinations by providing structured historical context.

Introduction

Large Language Models (LLMs) like GPT-4 have revolutionized natural language processing, yet they face significant hurdles in the specialized field of Digital Humanities. When analyzing ancient Chinese texts—specifically "The First Four Histories" (Records of the Grand Historian, Book of Han, Book of the Later Han, and Records of the Three Kingdoms)—general models suffer from hallucinations and struggle to identify low-frequency entities or complex social hierarchies.

This challenge stems from two primary factors: the scarcity of high-quality, cross-period corpora for historical character relationships and the semantic complexity of Classical Chinese. Standard retrieval-augmented generation (RAG) often fails here because it relies on unstructured text chunks that may lose deep semantic associations. To address this, we propose a GraphRAG framework that combines structured knowledge graphs with advanced reasoning techniques.

System Architecture and Methodology

The proposed framework is organized into a multi-layered architecture designed to bridge the "knowledge gap" in historical text analysis. The system comprises three primary layers: the Application Layer, the Instance Layer, and the Ontology and Data Layer.

The multi-layered architecture of the Historical Records Large Model Retrieval Enhancement Platform.

Knowledge Graph Construction

At the core of the system is an automated Knowledge Graph (KG) construction process. Rather than relying on manual entry, we utilized a domain-specific model, Xunzi-Qwen1.5-14B, to extract entity-relation triplets from the corpus. The ontology defines specific entity types such as Persons, Social Organizations, Locations, Noble Titles, and Official Positions, along with their corresponding relationships.

The schema defining entity types and relationship mappings within the historical knowledge graph.

Process Supervision and GraphRAG

A key innovation in this research is the implementation of "process supervision." Instead of grading only the final output, a five-stage scoring system monitors the model’s reasoning path: translating text to Modern Chinese, performing Named Entity Recognition (NER), analyzing semantic relations, constructing the relationship framework, and finally, triplet extraction.

For retrieval, the system integrates the KG into a Neo4j database. When a user submits a query, the system converts it into a Cypher statement to retrieve structured triplets (e.g., Cao Cao -> father of -> Cao Pi). These triplets serve as "prior knowledge" for the DeepSeek LLM, ensuring the generated response is grounded in historical fact.

Key Results and Insights

The experimental results highlight the efficacy of domain-specific fine-tuning and graph-based retrieval:

  • Extraction Accuracy: The fine-tuned Xunzi-Qwen1.5-14B model achieved an F1 score of 0.68 in relation extraction, vastly outperforming general models like GPT-4o (0.28) and DeepSeek (0.23).
  • GraphRAG Performance: Integrating DeepSeek with the GraphRAG framework improved its F1 score on the C-CLUE dataset from 0.08 to 0.19, an 11% absolute increase. This allowed the general model to surpass the native performance of the fine-tuned Xunzi model in cross-domain tests.
  • Hallucination Reduction: Qualitative analysis showed that the GraphRAG system could identify historically accurate figures that baseline LLMs missed, such as specific members of the Sun clan lineage.

Interestingly, the research found that models performed better when processing Simplified Chinese rather than Traditional characters, likely due to the higher coverage and more consistent semantic segmentation in the models' training data.

Conclusion and Future Work

The GraphRAG framework successfully demonstrates how structured knowledge can mitigate the limitations of LLMs in specialized domains like ancient history. While the current system is limited to "The First Four Histories" and requires substantial computational resources, future work will focus on expanding the KG's scope and utilizing knowledge distillation to create more efficient, smaller-scale models for academic use.

Summary updated

BibTeX
@misc{yang2025research,
  author = {Fan Yang and Qi Zhang and Wenqian Xing and Chang Liu and Liu Liu},
  title = {{Research on Graph-Retrieval Augmented Generation Based on Historical Text Knowledge Graphs}},
  year = {2025},
  eprint = {2506.15241},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2506.15241},
}
Figure