Editor’s introduction
The study evaluates HistoRAG, a framework designed for historical research, by comparing standard RAG systems against its interventions: separated retrieval, temporal windowing, and LLM-based relevance assessment. Temporal windowing prevents bias from era-specific vocabulary, while separated retrieval ensures historians control source input. The framework introduces Zwischentexte as a way to treat AI-generated text as interpretive proposals rather than final conclusions. Findings show that vector similarity and LLM relevance scores correlate weakly (Spearman rho = 0.275), supporting the need for post-retrieval evaluation. A key limitation is computational cost and model-dependent scoring, where thresholds like 7/10 for relevance vary across models or configurations, limiting generalizability.
Introduction
Retrieval-Augmented Generation has become an integral piece of LLM-application architectures, used for grounding language model outputs in external evidence. Yet RAG system design often remains generic, oriented toward factual question-answering, optimised to find the single best passage, generate a concise answer, and move on. By design these systems tend to encourage frictionless user behaviours no matter the source type. For disciplines whose engagement with text is fundamentally interpretive, standard RAG architectures embed assumptions that conflict with hermeneutic scholarly practice. In such fields, “relevance” is empirically hard to define, often depending on the individual researcher’s specific epistemic interest, the research questions being pursued, temporality, and semantics, and the basis for selecting sources must itself be open to scrutiny. The task here is not information retrieval in the conventional sense of locating statements within a corpus, but interpretation. It means posing questions about the texts themselves, such as how the statements they contain shift over time, which amounts to making statements about those statements rather than merely finding them. This paper asks how RAG can be redesigned to support historical research, and demonstrates that doing so requires architectural decisions grounded in the epistemological commitments of the discipline.
Digital History is currently undergoing a transition that is both fundamental and disruptive. For decades, computational methods have offered historians powerful tools for analysing large corpora, with methods that, as we argue, generally share a focus of operating on sequences of characters, at the level of signs rather than meaning. Drawing on Silke Schwandt’s characterisation of the computer as “semantically blind”, these earlier computational methods operated on the surface of the text rather than its meaning. As we have argued, the deeper point is that the semantic level was not available to these methods at all, a constraint that shaped what historians could do with them. We characterise this paradigm as DH 1.0. For example, topic modelling operates on co-occurrence matrices, text reuse detection identifies repeated character sequences, and corpus tools like Voyant visualise frequencies of token sequences. Large Language Models (LLMs) now promise something qualitatively different, a shift toward what we call DH 2.0. LLMs work with what call “contextualised representations”, which are computational approximations of meaning that enable both pattern recognition and interpretive generation (p. 2). While LLMs still operate on tokens internally, the crucial difference is that our interaction with these tools occurs at the level of meaning rather than formal operations. The historian poses questions in natural language and receives responses that engage with semantic content, not frequency tables or co-occurrence matrices. This shift from computing sequences of characters to computing approximations of the semantic meaning of those sequences raises urgent questions for interpretive disciplines, and represents a fundamental epistemological change.
This potential comes with real dangers. If earlier methods required historians to explicitly formalise their analytical approaches and interpret the results, LLMs risk hiding these choices entirely. When a system can “read” thousands of sources and generate coherent analyses, how do we preserve the interpretive authority that defines historical scholarship? As argues, this is at its core a question of epistemic agency. It is a matter of preserving researchers’ capacity to make, evaluate, and contest knowledge claims instead of delegating these to computational systems. The risk is not that AI will replace historians but that we will accept interfaces that obscure the critical decisions that constitute scholarly practice (such as source selection, relevance evaluation, interpretive framing). If we do not actively shape the tools we use, commercial vendors will design them for us, optimising for efficiency and seamless user experience at the expense of epistemic transparency.
RAG offers a path forward because it preserves the distinction between the reasoner (the LLM) and the archive (the documents), allowing generated insights to be traced back to specific sources. Unlike fine-tuning, which buries knowledge within neural network weights and produces outputs whose epistemic origins cannot be traced, RAG maintains the connection between claims and evidence that historical scholarship demands. As argues, LLM outputs are cultural productions shaped by training data in ways that resist inspection. RAG offers a means of preserving the link between generated text and identifiable sources. But standard RAG architectures are typically built and evaluated for information retrieval rather than interpretive inquiry. They conflate source discovery with interpretation in a seamless pipeline, treat similarity as a proxy for relevance, lack mechanisms for ensuring temporal coverage, and treat the vocabulary of the corpus as stable, ignoring the conceptual change that historical inquiry must track. These are all assumptions that conflict with the requirements of historical method.
Related Work
HistoRAG sits at the intersection of three research trajectories. The first is the evolution of RAG architectures beyond factual question-answering. The second is the growing recognition that domain-specific corpora demand domain-specific retrieval designs. The third involves the methodological debates within digital humanities about how computational systems intervene in interpretive scholarship. We trace these trajectories here to identify the specific gap our framework addresses.
In the years since Lewis et al.’s original proposal, a growing body of work has demonstrated that generic RAG pipelines falter when applied to specialised domains. In medicine, conducted the largest expert evaluation of medical RAG to date, finding that standard RAG often degraded rather than improved performance, with only 22% of retrieved passages rated relevant by expert evaluators. A systematic review of 70 healthcare RAG studies similarly concluded that basic implementations yield only marginal improvements and that effective clinical applications require domain-adapted embeddings, structured knowledge integration, and expert validation. In law, demonstrated that commercial legal RAG tools hallucinate between 17% and 33% of the time, indicating that domain-focused applications require not just improved retrieval but perhaps different frameworks entirely. Additionally, these efforts show that the distance between general-purpose RAG and disciplinary requirements is not merely quantitative (more documents, better embeddings) but qualitative, involving different conceptions of what “relevance” means in context.
Within digital humanities and historical research specifically, engagement with RAG remains nascent but is accelerating. A cited study introduced TopicRAG, integrating BERTopic-based topic modelling with retrieval to improve thematic coherence when searching historical newspaper archives. Their system restricts retrieval to topically relevant documents, accepting reduced recall as a trade-off for precision. This strategy contrasts with our own, which treats recall for precision as a central design principle. Because relevance in historical inquiry is interpretive and contestable, we do not let a similarity threshold discard sources before a historian can judge them. HistoRAG instead casts a wide net at retrieval and achieves precision afterwards, through a transparent evaluation step that keeps the relevance decision with the researcher. A cited study applied RAG to the Annals of the Joseon Dynasty, a 472-year historical record, demonstrating substantial improvements over LLM-only baselines while emphasising the need for clear source citation as a non-negotiable requirement of historical analysis. Most directly relevant to our work, proposed a “humanities-in-the-loop” framework that embeds close reading practices into RAG pipeline stages for digital archival materials. Their argument that conventional RAG fails to capture the contextual complexity and interpretive nuance required by humanities research closely parallels our own, though their focus on close reading as method differs from our emphasis on integrating historiographical theory (periodisation, source criticism, temporal reasoning) into system architecture. Beyond RAG specifically, have explored how machine learning can combine computational breadth with traditional depth in the history of ideas, while broader critical assessments of AI in archival science emphasise the need for interdisciplinary collaboration between computational and domain experts.
These emerging applications of RAG and LLMs to historical materials share the recognition that generic architectures are insufficient, but they have not yet systematically addressed the epistemological dimensions of the problem. This is where a separate methodological literature becomes essential. A first strand argues that computational systems must be shaped from within their disciplines of application rather than merely critiqued from outside. ’s concept of Critical Technical Practice provides the foundational design philosophy, recently extended by into “Reflexive Data Science”. Cited researchers develop a complementary programme of “digital hermeneutics”, arguing that computational infrastructures intervene in research practices at every phase (from search through interpretation to publication) and that these interventions must be made visible, not hidden behind seamless interfaces (p. 8). A second strand addresses what happens when LLMs specifically enter this landscape., adopting ’s description of the computer as “semantically blind”, characterise earlier computational methods as operating in the “realm of signal” rather than the “realm of meaning”, a characterisation that LLMs partially challenge but do not resolve, since their semantic operations remain opaque in ways that sequence-based methods were not. frames this opacity as a question of epistemic agency, while identify a related “accessibility-literacy trade-off” in which natural language interfaces lower barriers to entry while obscuring the interpretive assumptions embedded in retrieval algorithms and prompt templates. Finally, ’s foundational account of historical method, particularly his concept of the Kontinuitätsannahme (the principle that historical understanding requires tracing connections across time), provides the specific theoretical grounding for our temporal windowing intervention.
LLM-as-Judge: Post-Retrieval Evaluation
Separated retrieval ensures the historian controls which sources enter interpretation; temporal windowing ensures those sources are balanced across the research period, with neither vocabulary alignment nor thematic density allowed to determine temporal coverage. But neither addresses a more fundamental problem: whether the retrieved sources are actually relevant to the research question being asked. Semantic similarity, even within temporal windows, remains a blunt instrument for assessing interpretive relevance. Vector similarity captures lexical and conceptual proximity but cannot evaluate whether a source addresses the specific dimensions that matter for a given research question. A journalistic report about public fears of automation is not the same as a reader letter that itself articulates fear. A query embedding has limited capacity to encode such nuanced criteria; adding affective terms like “Hoffnung” (hope) or “Angst” (fear) alongside “Computer” and “Automatisierung” dilutes the semantic focus rather than sharpening it.
Our third intervention introduces an LLM-based evaluation layer after retrieval and temporal balancing. A language model reads each retrieved chunk and evaluates it against explicit, researcher-defined criteria, producing both a numerical score and a written justification citing specific textual evidence. This post-retrieval step draws on the “LLM-as-a-judge” paradigm but adapts it for interpretive rather than factual evaluation. Research on LLM-based evaluation has shown that even highly specific scoring instructions yield only marginal improvements in LLM-human alignment for factual tasks. We draw a different implication for interpretive disciplines: where “relevance” is itself a contested category, the value of explicit evaluation criteria may lie less in improving accuracy than in making the basis of relevance judgments transparent and open to scholarly contestation.
The evaluation criteria are designed by the historian, not the system. For a research question such as public attitudes toward computerisation, the criteria specify that highest scores go to sources that explicitly thematise hopes or fears, contain voices of affected individuals, or represent public debate. These are the interpretive qualities that distinguish sources valuable for understanding attitudes from sources that merely mention technology. The criteria are formulated in natural language as a detailed rubric (scored 1–10), making the basis for relevance judgments transparent and open to scholarly contestation. A different researcher with different theoretical commitments could substitute different criteria, producing different evaluations of the same corpus, which is precisely how interpretive scholarship should work.
Three prompt-design decisions merit attention. First, the system requires argumentation before scoring. The LLM must justify its assessment with reference to specific textual evidence before assigning a numerical score. This produces evaluation texts that function as interpretive annotations, not opaque relevance labels. The historian can examine why a source was rated highly or poorly, enabling informed acceptance or rejection of the algorithmic judgment. Second, we enforce absolute rather than comparative evaluation. During development, we found that batch processing, in which several sources are evaluated together in a single request to the model, led models to rank sources relative to each other within a batch instead of evaluating each against the stated criteria. This is consistent with documented biases in LLM-based evaluation, where comparative settings introduce position and preference effects that independent, criterion-referenced scoring avoids. The evaluation prompt explicitly instructs independent assessment, producing more consistent scores across different batch configurations. Third, the criteria foreground dimensions that vector similarity cannot capture, such as explicit thematisation, affective framing, and voices of affected individuals. These encode the historian’s scholarly interest (in our case, in vernacular discourse and reader responses) as a computational filter.
System Architecture
SPIEGELragged implements the two-phase HistoRAG workflow as a web application with a Python Flask backend and a Next.js React frontend. The backend exposes REST API endpoints for standard semantic search, LLM-assisted search with evaluation, and analysis of selected chunks. The two-phase design (Section 3.2) is realised through separate interface tabs labelled Heuristik (source discovery) and Analyse (LLM-assisted interpretation) with explicit user-initiated transfer between them.
A further component bridges lexical and semantic retrieval through FastText word embeddings trained on the full corpus. Word embeddings have proven valuable for tracking semantic change in historical texts, and in RAG systems they can serve a dual function that complements the text embeddings used for chunk retrieval. First, they enable query expansion. Starting from a user’s initial search terms, the system identifies semantically proximate vocabulary as attested within the corpus itself, surfacing period-specific synonyms and related terms that the researcher may not have anticipated. Searching for “Computer”, for instance, reveals that “Elektronenhirne” appears with high semantic similarity (0.788) but low corpus frequency (16 occurrences), suggesting rapid obsolescence and guiding the researcher toward vocabulary that would otherwise require manual lexicographic work, or never come into focus at all. Second, corpus-trained word embeddings provide a form of vocabulary verification grounded in DH 1.0 methods. Because the embedding space reflects co-occurrence patterns in the actual source material, the semantic relationships it surfaces can be checked against the corpus, not taken on trust from a general-purpose model. This positions word embeddings as a controlled intermediary between keyword search (which requires knowing the exact terms in advance) and text-embedding-based retrieval (which operates in a high-dimensional space that resists direct inspection). In our implementation, FastText was chosen specifically for its subword information handling, which makes it robust for the morphologically rich German language and capable of generating meaningful vectors even for rare compound words characteristic of the corpus.
All retrieved chunks carry full provenance metadata (article title, publication date, issue number, source URL), ensuring that any passage surfaced by the system remains traceable to its origin, fulfilling the Quellenbeleg requirement that grounds our entire architectural approach.
Limitations
Several limitations constrain the scope of our claims. Computational cost is significant. Evaluating retrieved chunks across temporal windows involves API expenses and processing time that raise questions of sustainability for any workflow routing large volumes of text through LLM APIs. The calibration variation across models (Section 5.3) means that absolute score thresholds are model-dependent. Our relevance stratification using a threshold of 7/10 would yield different counts with a different model or threshold. Because the value 7 is anchored to the rubric’s band for clear relevance, it remains an interpretable cutoff within a single model’s scores, as in the stratification reported here. Percentiles, which apply equally within a single model, become the more robust choice when comparing across models, where absolute scores are not directly comparable (Section 5.3). One direction for future work is to anchor the evaluation rubric more explicitly, fixing a baseline score as the midpoint and instructing the model how far to adjust upward or downward from it, in the manner of anchored review scales. Such anchoring might reduce the calibration divergence we observe across models.
Query formulation proved to be a consequential methodological variable. Our shift from keyword enumerations to natural language queries aligned with the embedding model’s training regime produced substantially higher similarity scores, confirming that query design is itself an interpretive act that shapes what the archive makes visible. Systematic comparison of query formulation strategies across different corpora and research questions remains future work, as does controlled comparison isolating the contribution of each pipeline component under matched conditions.
A deeper concern relates to the alignment training that shapes commercial LLMs. When an aligned model evaluates a 1950s text about “Rationalisierung”, its assessment is filtered through contemporary interpretive frameworks embedded during training. More broadly, the model’s responses are themselves shaped and altered by the human feedback used to align it. From a hermeneutic perspective, interpretation always requires a Vorverständnis (pre-understanding), and this is not a flaw but a condition of understanding. Yet with commercial models, this pre-understanding is neither transparent nor controllable. This is an argument for exploring open-weight or domain-specific models where interpretive assumptions could be made explicit and scholarly contestable.
Our empirical evaluation focuses on Leserbriefe (reader letters) as a test case, chosen because their vernacular vocabulary makes them harder to find through keyword search and thus demonstrates the architecture’s potential more fully. However, reader letters are a specific genre (shorter, more affective, more likely to use everyday vocabulary), and the findings may not transfer straightforwardly to longer analytical articles or editorial coverage. Evaluating the architecture across article types remains future work.


