The transformation of historical correspondence from print to TEI-compliant digital editions requires systematic person identification and authority linking—a process traditionally dependent on extensive manual labour and domain expertise. This paper presents a hybrid workflow combining retrieval-augmented generation (RAG) with authority database reconciliation to semi-automate person identification while maintaining scholarly standards. Our case study is the correspondence of Joseph von Hammer-Purgstall (1774–1856), with 3,500 transcribed and annotated letters.
The corpus was recently converted from a print edition (Höflechner et al. 2018) into TEI-XML digital scholarly edition (Höflechner et al. 2025). While the encoding captures the structural components of the letters, editorial interventions remain largely unaddressed. Person references remain encoded as <persName> tags without authority identifiers, while contextual information resides in unstructured editorial notes. This represents a common challenge in correspondence digitization: moving beyond mere structural markup toward what Sahle (2016) defines as “digital editions”, which exploit the capabilities of the digital, rather than replicating the print paradigm.
Historical correspondence presents challenges for this transformation. The Hammer-Purgstall collection exemplifies these through variant spellings (Photius vs Photios), abbreviated titles and names (Freih[errn] <persName>v[on] Buol</persName>), split annotations (<persName>v[on]</persName> <persName>Müller</persName>), partial annotations (<persName>Abu‘l-Fida</persName> Imad ad-Din Ismail ibn Ali al-Ayubi), and implicit contextual information in editorial notes attached to <persName> elements. Our goal is to develop an LLM-based approach to resolve the annotation errors by capturing full names (including forenames and roles), and linking them to authority files.
Amid ongoing debates on the role of generative AI in digital scholarship (Pollin et al. 2025), the transformation of print editions into “digital editions” constitutes a primary application area for LLMs in the editorial workflow (Pollin et al. 2024; Strutz 2026; Strutz forthcoming). Unlike rule-based systems, LLMs can apply contextual reasoning and semantic interpretation to make informed judgments based on textual evidence.
Our methodology implements a multi-stage RAG pipeline that progressively resolves person references through different matching strategies. <persName> tags in TEI-annotated letters are extracted with surrounding textual context. In a first stage, these entries are queried against an existing persons index represented in a vector database, resolving straightforward matches. The system then enters an iterative cycle: unmatched names are submitted to the GND (Gemeinsame Normdatei) via the lobid API, with LLM-based disambiguation leveraging letter context to select among multiple candidates (Strutz 2026). Successfully disambiguated persons are added to the vector database, and remaining persons are re-queried against this expanded index, iterating until resolution falls below a meaningful threshold. At this point, unmatched persons are queried against a vector database of the full correspondence corpus, exploiting cross-letter contextual patterns to identify individuals through co-occurrence and descriptive mentions. Finally, the remaining cases are flagged for human reconciliation.
This hybrid architecture addresses critical limitations in existing approaches. Simple string matching fails on variant spellings; pure LLM approaches risk hallucinating authority identifiers; population-based heuristics ignore historical context. By separating RAG retrieval from authority linking and employing LLMs only for contextual disambiguation, we minimize hallucination risks while maximizing computational efficiency and scholarly transparency.
We evaluate this workflow through comparative testing across proprietary models (GPT-5.2, Claude Sonnet 4.6) and open-source alternatives (OLMo2-32B-Instruct, Qwen3-14B), addressing sustainability concerns in DH infrastructure. This cross-model comparison contributes to community discussions about balancing performance with long-term reproducibility requirements.
This work contributes to emerging editorial practices by demonstrating how generative AI can complement human editorial work in enriching structurally digitized texts with the semantic depth characteristic of genuine digital editions, recognizing that as transformer-based LLMs integrate into digital scholarship, their capabilities and limitations must be critically assessed.
Deutsche Nationalbibliothek (n.d.) Gemeinsame Normdatei (GND). https://www.dnb.de/DE/Professionell/Standardisierung/GND/gnd_node.html.
Höflechner, Walter, Alexandra Wagner, and Gerit Koitz-Arko (2018): Joseph von Hammer-Purgstall. Briefe, Erinnerungen, Materialien. Graz: ADEVA.
Höflechner, Walter, Martina Scholger, Alexandra Wagner, Sabrina Strutz, Elisabeth Steiner (eds.) (2025): Joseph von Hammer-Purgstall. Korrespondenz. Graz. http://gams.uni-graz.at/hpe, http://hdl.handle.net/11471/559.20.
Pollin, Christopher, Franz Fischer, Patrick Sahle, Martina Scholger, and Georg Vogeler (2025): When it was 2024 – Generative AI in the Field of Digital Scholarly Editions. In: Zeitschrift für digitale Geisteswissenschaften 10 (2025). 10.07.2025. HTML / XML / PDF. DOI: 10.17175/2025_008.
Sahle, Patrick (2016): “What is a Scholarly Digital Edition?” In Driscoll, Matthew James, and Elena Pierazzo (eds.), Digital Scholarly Editing. Cambridge: Open Book Publishers. https://books.openedition.org/obp/3397.
Scholger, Martina, Sabrina Strutz, and Christopher Pollin. 2024. “Empowering Text Encoding with Large Language Models: Benefits and Challenges.” https://doi.org/10.5281/zenodo.13969082.
Steeg, Fabian, Adrian Pohl, and Pascal Christoph (2019). lobid-gnd – Eine Schnittstelle zur Gemeinsamen Normdatei für Mensch und Maschine. Informationspraxis 5(1), 52673. https://doi.org/10.11588/ip.2019.1.52673.
Strutz, Sabrina (forthcoming): “A Multi-Dimensional Evaluation Framework for Assessing LLM Performance in TEI Encoding.” Journal of Open Humanities Data.
Strutz, Sabrina, Martina Scholger, and Georg Vogeler (2025): Beyond Rule-Based Processing: LLM-Assisted TEI Encoding of Editorial Interventions in Historical Correspondence. TEI Annual Conference and Members' Meeting 2025, Jagielloninan University in Kraków. Zenodo. https://doi.org/10.5281/zenodo.17176474.
Strutz, Sabrina, Martina Scholger, and Georg Vogeler (2026): LLM-Assisted Metadata Extraction and Normalization for Historical Correspondence: A Multi-Stage Pipeline Approach. DHd 2026 Nicht nur Text, nicht nur Daten (DHd2026), Wien, Österreich. https://doi.org/10.5281/zenodo.18696370.