Daejeon, July 27–31
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
| Source | Ming Shilu | Joseon Annals |
| Date | 1597. 02. 12. (Lunar) | 1597. 03. 08. (Lunar) |
| Type | Macro-level Summary | Micro-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.
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
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:
Normalized text is processed into parallel streams:
A Hybrid Similarity Scoring mechanism drives alignment.
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.
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.
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):
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
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
| Method | mAP@30 | Recall@30 | mAP@50 | Recall@50 | mAP@100 | Recall@100 |
| Dense (Baseline) | 0.1154 | 0.3802 | 0.1192 | 0.5070 | 0.1205 | 0.5633 |
| Dense + Date Filtering (±3 months) | 0.1282 | 0.4647 | 0.1306 | 0.5352 | 0.1357 | 0.7183 |
| Sparse Only (Unigram) | 0.0872 | 0.3943 | 0.0922 | 0.5211 | 0.0961 | 0.6760 |
| Sparse Only (Bigram) | 0.1220 | 0.4507 | 0.1263 | 0.5633 | 0.1302 | 0.7042 |
| Sparse Only (Trigram) | 0.1680 | 0.5070 | 0.1697 | 0.5774 | 0.1720 | 0.6760 |
| Dense + Unigram + Bigram + Trigram | 0.1437 | 0.5352 | 0.1491 | 0.6619 | 0.1532 | 0.8028 |
| Dense + Chunking (800) | 0.1741 | 0.5070 | 0.1770 | 0.5915 | 0.1793 | 0.6901 |
| Dense + Knowledge Graph | 0.2139 | 0.6197 | 0.2200 | 0.7605 | 0.2223 | 0.8450 |
| Dense + Sparse + KG + Chunking (Final) | 0.2293 | 0.6478 | 0.2333 | 0.7464 | 0.2366 | 0.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.
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
| Model | Final Recall | Retention Rate | Aligned Pairs Found |
| Gemini 2.5 Pro | 0.6714 | 90% | 829 |
| Gemini 3.0 Pro Preview | 0.6143 | 82.3% | 431 |
| GPT-4.1 | 0.5758 | 76.2% | 702 |
| GPT-5.2 | 0.4714 | 63.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.
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
Future Work