arXiv:2610.24659cs.IROct 2026

Manuscript Offprint

arXiv:2610.24659

RAGit: Turning Document Preprocessing into an Experimental Variable for RAG

Omar El Bachyr, Saad Ezzini, Tegawendé F. Bissyandé, Jacques Klein

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

Omar El Bachyr*, Saad Ezzini‡, Tegawendé F. Bissyandé*, Jacques Klein*,

  • University of Luxembourg, Luxembourg

{omar.elbachyr, tegawende.bissyande, jacques.klein}@uni.lu

‡^{\ddagger} King Fahd University of Petroleum and Minerals, Dhahran, Saudi Arabia

saad.ezzini@kfupm.edu.sa

Abstract—Document preprocessing choices can substantially affect retrieval in Retrieval-Augmented Generation (RAG) pipelines, yet they are often selected heuristically and are difficult to compare under consistent conditions. We present RAGit, an open-source experimentation workbench for the systematic and reproducible evaluation of document preprocessing choices through downstream retrieval. RAGit represents parsing, chunking, indexing, retrieval, and evaluation as configurable experimental stages, enabling controlled comparisons while the remaining downstream settings are kept fixed. It preserves provenance from retrieved chunks to source pages and maps heterogeneous retrieval units to a common page-level ranking for evaluation. The current implementation supports multiple parsers and chunking strategies, dense and late-interaction retrieval, reusable intermediate artifacts, and multi-configuration benchmarking. We demonstrate RAGit through controlled experiments comparing alternative preprocessing configurations under a fixed retrieval setup, illustrating how preprocessing can be treated as an explicit experimental variable. RAGit and its documentation are publicly available on GitHub. A demonstration video is available at https://youtu.be/tsst-Bhfz4I.

Index Terms—Retrieval-Augmented Generation, document preprocessing, information retrieval

I. INTRODUCTION

Retrieval-Augmented Generation (RAG) increasingly operates over complex documents such as technical reports, scientific articles, manuals, scanned documents, and slide decks. Before retrieval, these documents must be parsed and split into suitable retrieval units. This introduces several consequential choices, including the parser and its configuration, the chunking strategy, chunk size, and overlap. For visually rich documents, where text, tables, figures, and layout interact, these choices can substantially change the content exposed to the retriever. Nevertheless, preprocessing is often treated as an implementation detail rather than as an experimental variable.

Recent studies have started to quantify the impact of preprocessing choices on retrieval and downstream RAG performance. One study systematically evaluates PDF parsing and chunking choices in financial question answering [1], while another compares PDF conversion and chunking configurations through downstream RAG evaluation [2]. These studies show that preprocessing can materially affect downstream performance, but their evaluation pipelines are tailored to individual studies rather than designed as reusable tools for systematically comparing and extending preprocessing configurations.

General RAG experimentation frameworks address adjacent problems. AutoRAG [3] explores combinations of RAG components, Rankify [4] supports unified retrieval and reranking experimentation, and RAGChecker [5] provides fine-grained RAG evaluation. Their focus, however, is broader pipeline optimization or diagnosis rather than controlled evaluation of document preprocessing. A particular challenge is comparing preprocessing configurations that produce different retrieval units, such as complete pages, smaller chunks, or cross-page chunks, while benchmark relevance judgments remain defined at the page level.

We present RAGit, an open-source experimentation workbench for the systematic and reproducible evaluation of document preprocessing choices for retrieval in RAG pipelines. RAGit represents parsing, chunking, indexing, retrieval, and evaluation as explicit experimental configurations, allowing preprocessing choices to be varied while downstream conditions remain fixed. It preserves provenance from retrieved chunks to their originating source pages, allowing heterogeneous retrieval units to be mapped and aggregated into a common page-level ranking for evaluation. The resulting workflow is illustrated in Figure 1.

RAGit is designed for both researchers studying the effect of preprocessing on retrieval and practitioners comparing alternative document-processing configurations before integrating them into RAG systems. The current implementation supports multiple parsers and chunking strategies, dense and late-interaction retrieval, reusable intermediate artifacts, and controlled comparison of multiple experimental configurations.

The contributions of this tool demonstration are:

• We introduce RAGit, an open-source workbench for configurable document preprocessing and retrieval experiments.

• We provide provenance-preserving mapping from retrieved chunks to source pages, separating retrieval and evaluation units.

• We support reproducible comparison of multiple configurations under shared downstream settings.

The remainder of the paper presents the RAGit architecture, an illustrative usage scenario, and its empirical validation.

(a) Controlled Experiment Configuration

Compare preprocessing configurations in RAGit

Figure

  1. Document Collection

• Documents (any format)

• Queries

• Page-level relevance judgments

Figure

  1. Document Parsing

• Parser

• Parsing configuration

Figure

  1. Chunking (Experimental Variable)

Configuration A

Chunking settings

Configuration B

Chunking settings

Figure

  1. Indexing & Retrieval

• Shared indexing configuration

• Shared retrieval configuration

(b) Retrieval and Page-Level Evaluation

Evaluate and compare preprocessing configurations in RAGit

Retrieval Performance

ConfigurationnDCG@10Recall@10
Configuration A0.4180.612
Configuration B0.4630.689

Retrieved Chunks

Source-Page Mapping

Page-Level Evaluation

Figure

Page 12

Figure

Figure

Fig. 1. Overview of a controlled RAGit experiment. (a) Alternative preprocessing configurations are compared while the downstream indexing, retrieval, and evaluation settings remain fixed. (b) Retrieved chunks are mapped to their source pages for page-level evaluation, and the resulting metrics are summarized for comparison.

TABLE I BUILT-IN PARSERS IN RAGIT.

ParserOutputOptional capabilities
PyMuPDF4LLM [6]Text, MarkdownOCR
Docling [7]Text, MarkdownOCR, VLM, picture descriptions
Marker [8]MarkdownOCR, picture descriptions