Published · journal article
A Retrieval‐Augmented Generation System for Accurate and Contextual Historical Analysis: AI‐Agent for the Annals of the Joseon Dynasty
2025 · Computer Animation and Virtual Worlds
Article-aware retrieval grounds answers in the Annals of the Joseon Dynasty.

From the paper
Author abstract
In this paper, we propose an AI-agent that integrates a large language model(LLM) with a Retrieval-Augmented Generation(RAG) system to deliver reliable historical information from the Annals of the Joseon Dynasty through both objective facts and contextual analysis, achieving significant performance improvements over existing models. In order for an AI-agent using the Annals of the Joseon Dynasty to deliver reliable historical information, clear source citations and systematic analysis are essential. The Annals, an official record spanning 472 years (1392–1897), offer a dense, chronological account of daily events and state administration that shaped Korea’s cultural, political, and social foundations. We propose integrating a LLM with a RAG system to generate highly accurate responses based on this extensive dataset. This approach provides both objective information about historical figures and events from specific periods and subjective contextual analysis of the era, helping users gain a broader understanding. Our experiments demonstrate improvements of approximately 23 to 50 points on a 100-point scale compared to the GPT-4o and OpenAI AIAssistant v2 models.
Author-written abstract from the author manuscript.
In plain language
What this work does
The agent preserves historical article boundaries, uses date metadata and query refinement to retrieve evidence, and supplies that evidence to a language model. Its purpose is to support factual answers and contextual interpretation with traceable sources.
- 01Historical question
- 02Date-aware evidence retrieval
- 03Answer + source citations
At a glance
Method, evidence, and scope

| Input | A historical question and the Annals corpus |
|---|---|
| Output | Source-grounded answers and contextual analysis |
| Method | Article-aware chunking, date-aware retrieval, query refinement, and LLM response generation |
| Data and scope | Annals of the Joseon Dynasty |
| Evaluation | Paper reports improvements of approximately 23–50 points on its 100-point evaluation scale over the compared systems |
| Limitations | Evidence comes from the paper’s historical task and benchmark; it does not guarantee factual correctness for arbitrary questions. |
Implementation and artifacts
Code and setup
Independent implementation of the paper’s core ideas, with setup instructions and data preparation documented in the repository README. The institute’s original source, datasets and trained models are not distributed.
Browse code and setup guideReference this work
Citation
Jeong Ha Lee, Ghazanfar Ali, Jae‐In Hwang. A Retrieval‐Augmented Generation System for Accurate and Contextual Historical Analysis: AI‐Agent for the Annals of the Joseon Dynasty. Computer Animation and Virtual Worlds, 2025. Volume 36. Issue 4. Article e70048. DOI: 10.1002/cav.70048.
@article{joseonragjournal2025,
title = {{A Retrieval‐Augmented Generation System for Accurate and Contextual Historical Analysis: AI‐Agent for the Annals of the Joseon Dynasty}},
author = {Lee, Jeong Ha and Ali, Ghazanfar and Hwang, Jae‐In},
year = {2025},
journal = {Computer Animation and Virtual Worlds},
volume = {36},
number = {4},
eid = {e70048},
doi = {10.1002/cav.70048},
url = {https://ghazanfarali.com/research/joseon-rag-journal/}
}