DH 2026

Daejeon, July 27–31

Thu, July 3011:00–12:30S029104
Long Paper

Imjin War-Align: A Graph RAG and LLM-Driven Framework for A Cross-Source Event Alignment in Ming-Joseon Chronicles

Ji Yeon Choi
Center for GIS, Research Center for Humanities and Social Sciences, Academia Sinica, Taiwan · neo_wandern@naver.com
Tsai Ting Shih
Department of Computer Science and Information Engineering, National Central University, Taiwan · 113522063@cc.ncu.edu.tw
Chun Kai Wu
Center for GIS, Research Center for Humanities and Social Sciences, Academia Sinica, Taiwan; Department of Computer Science, National Tsing Hua University, Taiwan · s106062851@m106.nthu.edu.tw
Yu Chun Wang
Department of Buddhist Studies, Dharma Drum Institute of Liberal Arts, Taiwan · ycwang@dila.edu.tw
Richard Tzong-Han Tsai
Center for GIS, Research Center for Humanities and Social Sciences, Academia Sinica, Taiwan; Department of Computer Science and Information Engineering, National Central University, Taiwan · thtsai@csie.ncu.edu.tw

Introduction

The Imjin War (1592–1598) is one of early modern East Asia’s most extensively documented conflicts. Although the Ming and Joseon courts produced detailed records, cross-textual comparison is hindered by divergent narrative conventions. Historical relevance is defined across three complex dimensions: 1) high textual similarity, 2) narrative divergence with consistent core entities, and 3) implicit causal or temporal links.

Existing digital humanities approaches face limitations: string-based matching often misses semantic relationships, while supervised models (e.g., BERT) suffer from scarce training data for classical languages.

Table 1 exemplifies these challenges of the second type by contrasting the Veritable Records of the Ming Dynasty (hereafter, Ming Shilu) and the Veritable Records of the Joseon Dynasty (hereafter, Joseon Annals) regarding Japanese General Katō Kiyomasa’s movements in 1597.

Table 1. Narrative Divergence in the Same Event

SourceMing ShiluJoseon Annals
Date1597. 02. 12. (Lunar)1597. 03. 08. (Lunar)
TypeMacro-level SummaryMicro-level Field Report
Text禮科給事中張正學、河南道御史陳遇文奏:倦將清正領兵舨二百駐機張營,驅逐太守,其勢甚急。請急救朝鮮,速補吝部尚書,以理釓事。俱不報。○壬子/兼慶尚等四道都體察使議政府右議政李元翼 【身兼將相, 時擬蕭、鄧。】 書狀: 機張縣監李廷堅馳報內, 淸正今月十三日多大浦到泊, 先來船二百餘隻。 十五日廷堅又馳報曰: “倭大船一隻、倭子七十餘名及倭將喜八, 【即金大夫。】 直到釜山, 以牌文示之曰: …
Trans.Supervising Secretary of the Office of Scrutiny for Rites, Zhang Zhengxue, and Investigating Censor of the Henan Circuit, Chen Yuwen, memorialized: “Japanese General Kiyomasa has led 200 warships to station at the Gijang camp, driving out the prefect; the situation is extremely critical. We request immediate aid for Joseon and the swift appointment of a Minister of Personnel to manage the selection of officials.” No response was given to either.[Day of] Imja: Yi Won-ik, Right State Councilor of the State Council and concurrently Supreme Commissioner for the Four Provinces including Gyeongsang, submitted a written report: “According to an urgent report from Yi Jeong-gyeon, the Magistrate of Gijang, Kiyomasa arrived and docked at Dadaepo on the 13th of this month; the advance ships numbered over two hundred. On the 15th, Jeong-gyeon sent another urgent report saying: ‘One large Japanese ship, over seventy Japanese men, and the Japanese commander Kihachi arrived directly at Busan and displayed a placard saying: …’”

As shown, while the Ming Shilu provides a macro-level justification and the Joseon Annals offers a micro-level field report, they share minimal lexical overlap despite describing the same event—rendering traditional keyword searches ineffective.

To address this, we propose a framework integrating Large Language Models (LLMs) and Graph Retrieval-Augmented Generation (Graph RAG). This approach utilizes multilingual embeddings and knowledge graphs to infer semantic connections without task-specific fine-tuning, effectively bridging these narrative gaps.

Methodologies

This study proposes a scalable framework to construct a parallel reading database for the Ming Shilu and the Joseon Annals. As illustrated in Figure 1, the pipeline consists of four integrated stages.

Figure 1. The overall pipeline: From preprocessing to adaptive hybrid retrieval

Stage I: Data Preprocessing

Covering the extended Imjin War period (1591–1600), we utilize 250 Ming query segments and 7,918 Joseon target segments. Two normalization tasks address historiographical discrepancies:

  • Date Normalization: Converting Ming regnal years to the Joseon sexagenary cycle for temporal alignment.
  • Entity Normalization: Resolving alias variations (e.g., “Kiyomasa” vs. “General Kato”) via a unified 482-person database to ensure consistent recognition.

Stage II: Feature Extraction

Normalized text is processed into parallel streams:

  • Vector DB: BGE-M3 generates dense representations, selected for Classical Chinese proficiency.
  • Graph DB: Gemini 2.5 Pro extracts event subgraphs (Nodes: Persons, Locations; Edges: Actions) to enable structural comparison beyond keyword matching.

Stage III: Adaptive Filtering, Retrieval and Generation

A Hybrid Similarity Scoring mechanism drives alignment.

Adaptive Time Window

This adaptive time window mechanism iteratively refines retrieval through a dynamic loop. Initially filtering within ±3 months, top candidates undergo Gemini 3.0 Pro Preview verification. If no alignment is found, the window expands to ±6 months to account for diplomatic delays, triggering a re-rank.

Graph Matching

We formulate KG alignment as an assignment problem using the Linear Sum Assignment Algorithm. Node similarity aggregates Exact Matches (1.0) and Partial Matches (0.3 unigram + 0.7 embedding), yielding a structural score that identifies event logic despite narrative differences.

Hybrid Ranking

We combine three complementary retrieval signals: dense scores, which capture semantic similarity through BGE-M3 contextual embeddings; sparse scores, which measure surface-level lexical overlap via character-level n-gram matching; and structural scores, which quantify event-level correspondence through KG subgraph alignment. The dense signal preserves meaning across paraphrastic variation, the sparse signal anchors retrieval to the specialized terminology and proper nouns characteristic of historical chronicles, and the structural signal captures actor-action logic that surface features alone cannot recover. We apply relative weights of 3 : 3 : 3 : 1 to four signals (bigram, trigram, structural, semantic):

  • Lexical (0.3 + 0.3) — bigram and trigram overlap.
  • Structural (0.3) — KG-based event similarity.
  • Semantic (0.1) — BGE-M3 embedding similarity.

Stage IV: Application

Validated pairs are stored in the Comparative Database of the Imjin War, supporting the Parallel Reading Visualization Tool.

As shown in Figure 2, the interface enables flexible alignment beyond 1:1 matching. It supports one-to-many (1:N) mappings, allowing researchers to connect diverse descriptions of the same event —thus realizing the “Digital Reading” paradigm.

Figure 2. Parallel Reading Visualization Interface

Result and Analysis

Retrieval Performance and Component Analysis

Table 2 presents the comprehensive evaluation of our retrieval strategies. Initially, we observed that the Sparse (Trigram) model outperformed the Dense baseline (mAP@30: 0.1680 vs. 0.1154), highlighting the necessity of exact lexical matching for specific historical terminology. However, the ablation study reveals that Knowledge Graph (KG) alignment is the most transformative component. By capturing structural event logic—distinguishing actor-action relationships—the KG module provided the most significant individual performance boost, raising Recall@30 to 0.6197. Furthermore, 800-token chunking successfully mitigated context fragmentation. Ultimately, the Final Integrated Model achieves superior performance across all metrics (Recall@100: 0.8591), confirming that combining semantic, lexical, structural, and chunking signals is essential for robustly aligning disparate historical narratives.

Table 2. Overall Retrieval Performance Comparison and Component Ablation Results

MethodmAP@30Recall@30mAP@50Recall@50mAP@100Recall@100
Dense (Baseline)0.11540.38020.11920.50700.12050.5633
Dense + Date Filtering (±3 months)0.12820.46470.13060.53520.13570.7183
Sparse Only (Unigram)0.08720.39430.09220.52110.09610.6760
Sparse Only (Bigram)0.12200.45070.12630.56330.13020.7042
Sparse Only (Trigram)0.16800.50700.16970.57740.17200.6760
Dense + Unigram + Bigram + Trigram0.14370.53520.14910.66190.15320.8028
Dense + Chunking (800)0.17410.50700.17700.59150.17930.6901
Dense + Knowledge Graph0.21390.61970.22000.76050.22230.8450
Dense + Sparse + KG + Chunking (Final)0.22930.64780.23330.74640.23660.8591

Note: The “Dense (Baseline)” represents raw vector retrieval. All other methods (Rows 2–9) incorporate the ±3 month date filtering strategy to constrain the search space to a historically relevant window.

LLM Reasoner Performance and Model Selection

We evaluated four models to balance noise filtration with recall. As shown in Table 3, while Gemini 2.5 Pro achieved the highest recall (0.6714), it generated an excessive 829 pairs, indicating a high false-positive rate. In contrast, Gemini 3.0 Pro Preview demonstrated superior discrimination, reducing the alignment count to 431 pairs—effectively halving the noise—while maintaining a robust recall of 0.6143. This “High Recall, Low Volume” profile confirms Gemini 3.0 as the optimal choice for constructing a precise, high-quality database.

Table 3. LLM Reasoner Performance Evaluation

ModelFinal RecallRetention RateAligned Pairs Found
Gemini 2.5 Pro0.671490%829
Gemini 3.0 Pro Preview0.614382.3%431
GPT-4.10.575876.2%702
GPT-5.20.471463.2%209

Upon validating the framework (Val: 0.6143, Test: 0.8571), we applied the final model to 250 Ming records, identifying 2,170 corresponding paragraphs from the Joseon Annals (see Figure 3). These candidates are currently undergoing a final manual review for database integration.

Figure 3. Yearly Distribution of Aligned Joseon Segments by Confidence Level (1591–1600). H/M/L indicates the certainty that the records refer to the same event.

Conclusion

This study establishes a few-shot Graph RAG framework to align diverse event records in the Ming Shilu and Joseon Annals without fine-tuning.

Contributions

  • Mitigating Hallucinations: Using RAG for database construction rather than as a generative “answering machine” mitigates hallucination risks.
  • Framework Validity: The framework bridges narrative gaps via semantic embeddings and knowledge graphs, proving alignment feasibility without fine-tuning.

Future Work

  • Segmentation Trade-offs: We will implement “Dual-Granularity Scoring”—combining chunk-level retrieval with full-text reasoning—to balance precision and causality.
  • Scaling Coverage: We are expanding the Ming Shilu corpus by integrating records via LLM-based extraction.
  • Domain-Specific Adaptation: We will explore embedding and reasoning models fine-tuned on Classical Chinese corpora, which may further improve retrieval precision and entity recognition in this linguistically specialized domain.
References
  1. Chao, J. Y. (2024). Event Alignment Model for Ancient Chinese Literature without Requirement of Manually Labeled Data [Master’s thesis]. National Central University. https://hdl.handle.net/11296/7t8573.
  2. Chen, J. et al. (2024). BGE M3-Embedding: Multi-Lingual, Multi-Functionality, Multi-Granularity Text Embeddings Through Self-Knowledge Distillation. arXiv preprint arXiv:2402.03216. https://arxiv.org/abs/2402.03216.
  3. Chu, Y. T. (2022). Weakly Supervised Learning for Paraphrase Identification with Two-Stage Training in Ancient Chinese Literature [Master’s thesis]. National Central University. https://hdl.handle.net/11296/y2bqn9.
  4. Edge, D. et al. (2024). From Local to Global: A Graph RAG Approach to Query-Focused Summarization. arXiv preprint arXiv:2404.16130. https://arxiv.org/abs/2404.16130.
  5. Liu, Qinghua et al. (Eds.). (2005). Ming Shilu Chaoxian ziliao jilu [Compilation of Historical Materials on Joseon in the Ming Veritable Records]. Bashu Publishing House.
  6. Meng, Y. et al. (2020). Text Classification Using Label Names Only: A Language Model Self-Training Approach. Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pp. 9006–9017. 10.18653/v1/2020.emnlp-main.724.
  7. Institute of History and Philology, Academia Sinica. Ming-Qing Veritable Records. https://hanchi.ihp.sinica.edu.tw/mql/login.html.
  8. National Institute of Korean History. Veritable Records of the Joseon Dynasty. https://sillok.history.go.kr/.