HyperAIHyperAI

Command Palette

Search for a command to run...

Document Retrieval-Aware Chunking (D-RAC) : ingestion universelle des documents d'entreprise adaptée à la récupération par normalisation PDF et conversion Markdown multimodale

Uday Allu Abhivanth Sivaprakash Pratik Singh Aman Manocha

Résumé

Les systèmes de génération augmentée par récupération (RAG) portant sur des bases de connaissances d'entreprise doivent ingérer des formats de documents hétérogènes — PDF, documents Word, présentations et documents numérisés — dont le contenu est enfermé dans des mises en page visuelles complexes, des pages multicolonnes et des tableaux denses. Les pipelines d'ingestion traditionnels s'appuient sur une extraction de texte à base de règles ou sur l'OCR, ce qui détruit fréquemment l'ordre de lecture, aplatit les tableaux et fait perdre la hiérarchie des titres, dégradant la qualité de la récupération en aval. Le découpage entièrement agentique opérant sur le texte brut extrait restaure une certaine cohérence sémantique, mais entraîne des coûts de jetons élevés et un risque d'hallucination. Dans cet article, nous présentons Document Retrieval-Aware Chunking (D-RAC), une extension de notre cadre Web Retrieval-Aware Chunking (W-RAC) à des formats de documents arbitraires. D-RAC normalise d'abord tout document d'entrée — DOCX, PPTX, XLSX, images numérisées ou PDF natif — en PDF, en exploitant le fait que pratiquement tout format de document possède un rendu PDF fidèle et déterministe. Il applique ensuite une passe unique de LLM multimodal qui convertit les pages rendues en Markdown optimisé pour la récupération — en normalisant les tableaux en énoncés en prose autonomes et en préservant la hiérarchie des titres — après quoi le découpage se déroule exactement comme dans W-RAC : une segmentation déterministe en unités adressables par identifiant, suivie d'une planification légère des segments fondée sur un LLM et portant sur les identifiants plutôt que sur le texte. Le texte source n'est jamais régénéré pendant le découpage, ce qui préserve les avantages de W-RAC en matière de coût, de déterminisme et d'observabilité tout en faisant de tout format de document pouvant être rendu une entrée de premier ordre. Sur le sous-ensemble PDF de 236 documents et 795 pages du benchmark RAG-Multi-Corpus — couvrant les domaines automobile, universitaire, des services cloud, des technologies d'entreprise et bancaire — D-RAC convertit et découpe l'ensemble du corpus en 72 minutes sans aucune erreur, produisant 1 748 segments prêts pour la récupération. Comparé au découpage agentique avec des LLM de pointe, D-RAC réduit les jetons de sortie de l'étape de découpage de 95,7 %, diminuant le coût du découpage de 77,8 % avec la tarification GPT-4.1 et de 85,6 % avec la tarification Gemini 2.5 Pro, et réduisant le temps de découpage de 75 %. D-RAC passe à l'échelle linéairement jusqu'à des documents de plus de 500 pages.

One-sentence Summary

Researchers at Yellow.ai propose Document Retrieval-Aware Chunking (D-RAC), which extends W-RAC by normalizing heterogeneous enterprise documents to PDF and applying a single multimodal LLM pass to produce retrieval-optimized Markdown, followed by deterministic ID-addressable parsing and lightweight identifier-based chunk planning without source-text regeneration; on the 236-document, 795-page PDF subset of the RAG-Multi-Corpus benchmark, D-RAC converts and chunks the corpus in 72 minutes with zero errors, producing 1,748 retrieval-ready chunks, and compared to agentic chunking it reduces chunking-stage output tokens by 95.7%, cuts cost by 77.8% under GPT-4.1 pricing and 85.6% under Gemini 2.5 Pro pricing, and reduces chunking time by 75%.

Key Contributions

  • Document Retrieval-Aware Chunking (D-RAC) extends retrieval-aware chunking from web content to arbitrary enterprise documents by normalizing DOCX, PPTX, XLSX, scanned images, and native PDFs into PDF and applying a single multimodal LLM pass to convert rendered pages into retrieval-optimized Markdown with preserved heading hierarchy and self-contained prose table statements.
  • The chunking stage parses the converted Markdown into ID-addressable units and performs lightweight LLM-based chunk planning over identifiers only, so source text is never regenerated during chunking and the one-time conversion cost is decoupled from repeatable re-chunking.
  • On the 236-document, 795-page PDF subset of RAG-Multi-Corpus, D-RAC converts and chunks the corpus in 72 minutes with zero errors and 1,748 retrieval-ready chunks; compared with agentic chunking, it reduces chunking-stage output tokens by 95.7%, chunking cost by 77.8% under GPT-4.1 pricing and 85.6% under Gemini 2.5 Pro pricing, and chunking time by 75%, while scaling linearly to documents over 500 pages.

Introduction

Retrieval-Augmented Generation has become the standard way to ground large language models in enterprise knowledge, but enterprise corpora are dominated by PDFs whose presentation-oriented layout breaks conventional text extraction. Prior work, Web Retrieval-Aware Chunking (W-RAC), reduced chunking cost and latency by planning chunk boundaries over deterministic identifiers, yet it assumed recoverable HTML-like structure and therefore could not handle PDFs, while rule-based, OCR/layout-analysis, and agentic alternatives either inherit extraction artifacts or pay repeated text-generation costs. The authors introduce D-RAC, which normalizes any input document to PDF and adds one retrieval-aware multimodal pass that converts rendered pages into structured Markdown, allowing the unchanged W-RAC pipeline to ingest arbitrary enterprise documents.

Dataset

The authors use the PDF subset of RAG-Multi-Corpus, the benchmark introduced with W-RAC, for evaluation.

Dataset composition and sources

  • Main evaluation corpus: 236 PDF documents totaling 795 pages across five fictional enterprise organizations in distinct industry verticals.
  • Document types reflect enterprise knowledge base content: product sheets, FAQs, policy and procedure documents, parts catalogs, and service guides.
  • Formatting is table-heavy and layout-rich, typical of each domain.

Query subset

  • 762 curated queries with supporting-fact ground truth are used for retrieval evaluation.
  • Queries cover four of the five organizations; CloudWay-24 has no annotated queries in the reference set.
  • Queries are categorized into seven types to test factual recall, reasoning, comparison, and procedural understanding.
  • Each query is annotated with one or more supporting facts: verbatim snippets from the source documents and their originating file.

Processing and usage

  • Because all inputs are natively PDF, Stage 1 normalization is treated as identity.
  • A separate 503-page financial prospectus is used as a scalability stress test.
  • Processing uses AWS Bedrock with temperature 0.1.
  • Conversion uses a maximum of 8,192 output tokens per batch and chunk planning of 16,384 tokens per section call.
  • Documents are processed in 5-page batches with 5 parallel workers.

The provided excerpt focuses on evaluation data. It does not describe training splits, mixture ratios, filtering rules, or cropping strategies.

Method

The authors propose Document Retrieval-Aware Chunking (D-RAC), a pipeline designed to convert heterogeneous documents into retrieval-optimized chunks. The system architecture comprises four distinct stages: normalize and render, convert, parse and section, and plan and reconstruct.

Refer to the framework diagram for the overall pipeline structure.

In the first stage, the authors ensure format agnosticism by treating PDF as the universal visual interchange format. Any input document that is not already a PDF is converted using standard deterministic tooling. Each page of the normalized PDF is then rendered to a PNG image at 200 DPI, downscaled to ensure no dimension exceeds 1,568 pixels to match common vision-encoder input limits. This step is entirely deterministic and involves no LLM calls.

The second stage involves multimodal Markdown conversion. Rendered pages are grouped into batches and sent to a multimodal LLM. The conversion prompt enforces strict retrieval-aware output rules. Text content is preserved verbatim, and explicit hierarchy is reconstructed using Markdown heading levels. Crucially, the system applies retrieval-aware table normalization. Instead of using Markdown table syntax, every table row is transformed into a self-contained sentence using column headers as context.

As shown in the figure below, this row-level table prose ensures that every tabular fact becomes an independently embeddable statement.

The authors explicitly forbid collapsing multiple rows into disjunctive sentences to prevent precision loss during retrieval. Image suppression is also applied to omit logos and decorative graphics, preventing hallucinated captions from polluting the index.

In the third stage, the converted Markdown undergoes deterministic parsing and sectioning. The text is parsed into ID-addressable elements, such as headers and content blocks. For documents exceeding a planning budget, a recursive sectioning algorithm splits the element sequence at header boundaries. Each section is accompanied by its parent-header context, allowing the planner to understand the document hierarchy without re-sending content.

The final stage focuses on LLM chunk planning and reconstruction. The LLM receives only element IDs, truncated text previews, and hierarchy metadata, returning chunk plans as ordered ID lists. The planner is instructed to group content blocks around single topics and reuse header IDs across chunks for context. Coverage is verified programmatically to guarantee lossless ingestion. Final chunks are reconstructed locally by mapping IDs back to the verbatim converted text. Each chunk is prefixed with its full ancestor-heading chain and annotated with a human-readable breadcrumb before being embedded and indexed. Because the converted Markdown and element IDs are persisted, retrieval strategy changes require only re-planning, avoiding the need for re-conversion or re-OCR of the source PDF.

Experiment

The evaluation uses the PDF subset of RAG-Multi-Corpus across five enterprise domains, with 762 annotated queries covering seven reasoning types. Experiments show that D-RAC converts all documents without errors and scales linearly on a large stress test, while chunk planning remains inexpensive, stable, and lossless. Retrieval results indicate D-RAC outperforms fixed-size parsing and matches or exceeds agentic chunking, especially on boundary-sensitive query types, with consistent performance across domains. Cost analysis further shows D-RAC reaches this quality at a fraction of agentic chunking cost by minimizing output tokens and avoiding prose regeneration.

D-RAC achieves the highest structure recovery and retrievability among the compared ingestion strategies while keeping chunking output costs very low and avoiding prose generation. It matches or exceeds agentic chunking on overall metrics even though it processes rendered PDF pages, and its planning-only re-chunking scales more efficiently than full regeneration. The approach is stable across domains and shows the largest quality gains on boundary-sensitive query types. D-RAC is the only strategy with high structure recovery, high retrievability, and high scalability to large page counts at the same time. Agentic chunking incurs high LLM output cost and some hallucination risk, while D-RAC reduces output to planning-only identifiers with very low to no hallucination surface. D-RAC matches or exceeds agentic chunking across all seven overall metrics despite working from rendered PDF pages, the hardest input format. The largest gains appear for temporal, comparative, and analytical queries, while boolean queries remain an edge case where agentic chunking retains an advantage.

The evaluated PDF subset spans five fictional enterprise domains and includes realistic table-heavy documents such as product sheets, FAQs, policy documents, parts catalogs, and service guides. D-RAC matches or exceeds agentic chunking on overall retrieval metrics while working directly from rendered PDF pages, with the largest gains on temporal, comparative, and analytical queries. Its planning stage also cuts output tokens and processing time substantially compared with agentic rewriting, while recall remains stable across domains. The evaluated subset spans five fictional enterprise domains, with banking and academia contributing the heaviest page loads and cloud services the lightest. The documents mirror realistic enterprise knowledge base content, including product sheets, FAQs, policy documents, parts catalogs, and service guides, with table-heavy layouts. D-RAC matches or exceeds agentic chunking on overall retrieval metrics despite working from rendered PDF pages rather than clean structured sources. Temporal, comparative, and analytical queries gain the most from topic-coherent chunk boundaries; boolean queries are the one area where agentic chunking remains ahead. Recall stays consistent across organizations, indicating the pipeline does not overfit to a particular document style. D-RAC's planning output is far smaller than agentic rewriting, so output token costs collapse and processing time drops substantially.

The evaluated query set spans seven categories designed to balance factual recall, reasoning, comparison, and procedural understanding. Procedural questions form the largest category, while temporal questions are the smallest. Retrieval gains from topic-coherent chunking are most pronounced for temporal, comparative, and analytical queries, though boolean queries remain the one category where agentic chunking retains an edge. Procedural queries form the largest category, followed by comparative and descriptive questions. Temporal queries are the smallest category but benefit most from topic-coherent chunk boundaries and row-level table prose. Boolean queries are the sole category where agentic chunking keeps an advantage over topic-coherent chunking.

Across five organizations, the corpus of 236 PDF documents and 795 pages converted into roughly one million characters of Markdown with zero errors. Average file conversion times ranged from about 12 to 22 seconds, and page-level throughput varied by organization, with Cendara University being the fastest per page and Velvera Technologies the slowest. Rendering overhead was minimal, with multimodal inference dominating conversion cost. All 236 documents converted without a single error, including parts catalogs, fee-schedule tables, and multi-column product sheets. Page rendering was negligible, while multimodal inference was the main driver of conversion time and scaled across parallel page batches.

Chunk planning covers every content element exactly once with zero chunking errors, and it remains inexpensive relative to conversion and agentic chunking because the planner outputs only ID arrays. Average chunk sizes stay within a stable, dense retriever friendly range across organizations without hard size limits. Planning cost is a small fraction of conversion time and much lower than agentic chunking, driven by minimal ID-only output. Chunk sizes remain stable and retriever-friendly across organizations, averaging between about 580 and 850 characters.

The experiments evaluate D-RAC against agentic and other chunking strategies on a table-heavy enterprise PDF corpus spanning five fictional domains and on a query set covering factual, procedural, comparative, temporal, and boolean questions. D-RAC validates that planning-only, identifier-based chunking recovers document structure most accurately, preserves retrievability, and scales to large page counts without prose generation or high LLM output cost. It matches or exceeds agentic chunking on overall retrieval quality even from rendered PDF pages, with the largest gains for temporal, comparative, and analytical queries and stable recall across domains, while boolean queries remain the one category where agentic chunking retains an edge. The pipeline also shows high reliability in practice, with error-free document conversion, negligible rendering overhead dominated by multimodal inference, and inexpensive zero-error chunk planning that yields stable retriever-friendly chunk sizes.


Créer de l'IA avec l'IA

De l'idée au lancement — accélérez votre développement IA avec le co-codage IA gratuit, un environnement prêt à l'emploi et le meilleur prix pour les GPU.

Codage assisté par IA
GPU prêts à l’emploi
Tarifs les plus avantageux

HyperAI Newsletters

Abonnez-vous à nos dernières mises à jour
Nous vous enverrons les dernières mises à jour de la semaine dans votre boîte de réception à neuf heures chaque lundi matin
Propulsé par MailChimp