arXiv:2608.24976cs.DLAug 2026

Manuscript Offprint

arXiv:2608.24976

A Comparative Evaluation of Digitization Pipelines for Historiographical Sources

Marina Gómez Rey, Patricia Callejo, Mario Muñoz-Organero, Carlos Alario-Hoyos

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Purpose: The digitization of historical documents presents fundamental challenges for modern information retrieval and Artificial Intelligence (AI) systems. Optical character recognition (OCR) errors in source corpora propagate through retrieval-augmented generation (RAG) pipelines, compromising the factual accuracy of generated outputs.

Methods: This study presents a systematic evaluation of PDF-to-text extraction pipelines applied to historiographical secondary sources on the Visigothic period. We assess thirteen distinct approaches spanning three methodological families: direct extraction, Large Language Model (LLM) post-correction, and chunk-and-extract. Documents are stratified into five categories based on production method and visual complexity. Performance is measured using character error rate (CER) and word error rate (WER) against manually corrected ground truth.

Results: Results demonstrate that direct extraction with Marker achieves superior performance (98.70% CER accuracy; 97.71% WER accuracy overall), while conventional OCR pipelines exhibit substantial degradation on scanned documents and complex layouts. Embedded-text extraction performs well on digital PDFs but fails on scanned documents. LLM post-correction does not provide systematic improvements and frequently degrades accurate extractions.

Conclusion: End-to-end document parsing is the most reliable approach for heterogeneous historical collections. Document characteristics such as scan quality, layout complexity, and the presence of embedded text layers have a significant impact on extraction accuracy. LLM-based post-correction should not be assumed beneficial by default and requires validation before large-scale application.

Keywords: Digitization, OCR, historical documents, RAG

1 Introduction

Information quality fundamentally determines the reliability of knowledge systems [5]. In text-based applications, degradation introduced at the digitization stage can cascade through subsequent processing layers, affecting search, retrieval, and knowledge generation tasks. This dependency becomes critical when historical documents serve as knowledge sources for modern Artificial Intelligence (AI) systems, especially Retrieval-Augmented Generation (RAG) architectures that enhance Large Language Model (LLM) outputs with retrieved contextual information [22, 24].

RAG-based systems operate through a multi-stage process: documents are first segmented into smaller chunks, which are then transformed into vector representations using embedding models, and subsequently stored in vector databases. When a user submits a query, the system retrieves semantically relevant chunks and supplies them as context to an LLM, which generates responses conditioned on both the query and retrieved information. This architecture has become foundational for conversational AI systems, enabling question answering over specific document collections, supporting domain-specific applications, and grounding model outputs in external knowledge sources rather than relying solely on pretrained parameters.

However, the effectiveness of RAG-based systems depends critically on the quality of the underlying document corpus. When source documents contain OCR character substitutions, word segmentation failures, or layout corruption, these errors propagate through the retrieval and generation stages [46]. RAG systems may fail to match queries to relevant chunks due to corrupted entity names or key terms. Even when retrieval succeeds, corrupted content is passed directly to the generation model, which may reproduce or amplify errors in its outputs. Because modern LLMs typically generate fluent responses independent of source quality, users may be unaware that responses are grounded in corrupted content.

Historical texts present distinct challenges for OCR systems integrated into RAG-based systems. Unlike contemporary digital documents, historical materials frequently exhibit multi-column layouts, non-standard typographical conventions, archaic orthography, physical degradation, and mixed content types [17]. These characteristics introduce systematic errors including character substitutions, word segmentation failures, reading order corruption, and layout misinterpretation. When such errors persist in digitized corpora, they propagate through information retrieval pipelines and may be reproduced by LLMs, creating factually incorrect outputs that appear authoritative to end users.

Consider a representative failure case: when queried “Who was deposed by Witérico?”, a RAG-based AI system responds “Liuva 11” rather than the correct “Liuva II”. This error originates from OCR misrecognition of the Roman numeral II as the Arabic number 11. While superficially minor, such errors systematically corrupt historical knowledge in systems deployed to millions of users. The error becomes particularly relevant because modern conversational AI systems present outputs with high confidence regardless of source quality, rendering digitization errors invisible to non-expert users.

Despite advances in neural OCR architectures and vision-language models [11], no existing solution reliably digitizes complex historiographical documents. Recent work has explored LLM-based post-correction [16, 20, 41], hybrid layout analysis approaches [11], and end-to-end document parsing [24]. However, systematic comparative evaluations on heterogeneous historical corpora remain limited. This study addresses three research questions:

RQ1: How do contemporary PDF-to-text extraction pipelines perform across different document types in historiographical secondary sources, and what error patterns characterize each approach?

RQ2: To what extent does document heterogeneity (production method, visual complexity, scan quality) affect extraction accuracy across pipeline architectures?

RQ3: To what extent does LLM-based post-correction improve OCR quality for historical documents?

We present a systematic evaluation of thirteen extraction pipelines on a stratified corpus of historiographical secondary sources on the Visigothic period. This corpus is selected because it exhibits the heterogeneity typical of digital humanities collections, including poor quality scans, modern digitizations, native digital PDFs, and complex layouts, with sufficient linguistic complexity (Latin terms, proper nouns, Roman numerals) to stress-test OCR systems beyond standard benchmarks. We measure character and word level accuracy against manually corrected ground truth, with evaluation focused on the quality requirements of modern AI systems, particularly RAG architectures where OCR errors in source documents propagate directly to generated outputs. This work makes three key contributions. First, we provide empirical performance comparison of thirteen extraction pipelines across five document categories, revealing substantial variation in accuracy and characteristic failure modes. Second, we demonstrate how document characteristics (production method, scan quality, and layout complexity) systematically affect extraction quality, with direct implications for workflow design and tool selection. Third, we present evidence that LLM-based post-correction, despite theoretical promise, can degrade performance under standard edit distance metrics.