PDF chunking strategies compared for trustworthy RAG
Compare PDF parsing and chunking strategies with a reproducible corpus that measures structure, tables, retrieval, citation recovery, latency, and storage.

Compare the tools behind this article on ToolVerse.
Open ToolVerse for evidence, pricing context, alternatives, and current review status. Every link below navigates to the external ToolVerse directory.
Compare Unstructured and MegaParse and MarkPDFdown and OpenDataLoader PDF Open on ToolVerse · externalQuick answer
PDF retrieval fails long before a vector database chooses the wrong neighbor. A parser can merge columns, detach a table from its header, repeat page furniture, omit a scanned footnote, or lose the page that lets a reader verify a claim. Chunking cannot repair evidence that was never recovered. Start by preserving a faithful, inspectable document representation; then compare fixed, page, title or section, semantic, and layout-aware chunks against the same PDFs and adjudicated questions. The winning setting is the one that improves supported answers and reconstructable citations at an acceptable operating cost, not the one with the most chunks or the lowest average token count.
This is a PDF-specific decision. A plain-text handbook and a two-column annual report can produce the same extracted characters while requiring different evidence boundaries. Treat parser choice, layout extraction, chunk construction, retrieval, and answer generation as separate stages with separate failure labels. The general chunking strategy guide explains reusable citation principles; this comparison concentrates on the layouts that make PDF ingestion unusually fragile.
PDF failure anatomy
PDF is a presentation format, not a reliable semantic document model. A word can be visually adjacent to a heading while being stored elsewhere in the text stream. Multi-column pages may be read across columns instead of down one column. Page headers and footers can become frequent, high-scoring fragments. A table can continue across a page break, while its units, definitions, and the row labels needed to interpret a number are separated from the cell. Scans add OCR errors, rotated pages, uncertain reading order, and figures whose captions are the only textual explanation.
That anatomy creates three kinds of error. Extraction error means the text, table, order, coordinate, or source image is wrong or missing. Boundary error means valid extracted content is split away from the qualification, header, or neighboring row that gives it meaning. Retrieval or answer error means the proper chunk exists but is not retrieved, ranked, cited, or followed by the generator. These labels matter because a larger window may conceal a boundary error in a demo while raising irrelevant context and still leaving an extraction error untouched.
Require an immutable provenance record for every chunk: document ID and version, file checksum, parser and version, page range, bounding boxes or source spans when available, heading path, element IDs, table or figure IDs, and the index revision. A user should be able to open the cited PDF, navigate to the claimed page, and see the supporting passage or table cell. If the UI cannot reconstruct that path, report citation accuracy separately from answer quality rather than treating an opaque document link as a citation.
Strategy comparison
Use the simplest strategy that retains the evidence units your questions need. Fixed windows are useful controls because they are cheap and predictable, but their apparent neutrality can cut a condition from an exception. Page chunks offer familiar locators but frequently mix unrelated sections. Title or section chunks fit well-structured reports when headings are trustworthy. Semantic chunks can adjust to topic changes but must be evaluated for repeatability and source anchoring. Layout-aware chunks preserve elements and hierarchy before applying a token constraint; they typically demand more parsing work and richer observability.
| Strategy | Structure integrity | Table integrity | Citation reconstructability | OCR tolerance | Retrieval recall | Answer faithfulness | Latency | Storage |
|---|---|---|---|---|---|---|---|---|
| Fixed token or character window | Low unless source spans are retained | Low | Medium with explicit page offsets | Inherits OCR defects | Baseline control | Often weak on qualifications | Low | Predictable |
| One chunk per page | Medium for simple pages | Medium when a table stays on one page | High at page level, low for cell evidence | Inherits OCR defects | Can dilute narrow questions | Medium | Low | Moderate |
| Title or section boundary | High when headings parse correctly | Medium | High with heading path and page range | Inherits OCR defects | Often strong for prose | High for section questions | Moderate | Moderate |
| Semantic boundary | Variable; inspect each split | Low to medium without table rules | Variable unless source spans survive | Inherits OCR defects | Candidate-dependent | Candidate-dependent | Moderate to high | Moderate |
| Layout-aware element and hierarchy chunking | High when layout extraction is verified | High when headers and row groups stay linked | High with element, page, and coordinates | Depends on OCR and layout model | Test on corpus | Test on corpus | High | Higher |
Unstructured documents the separation directly: partitioning finds document elements, then chunking combines those elements; a table remains isolated rather than being combined with unrelated content. Its by_title option can close chunks at a detected title and can optionally respect page boundaries. Docling similarly exposes chunkers over a native document representation and describes a hybrid approach that refines hierarchical chunks with tokenizer-aware constraints. Those mechanisms are capabilities, not proof that either parser has understood a particular report. Validate the emitted element sequence, headings, tables, and locators before comparing any size setting.
Haystack’s DocumentSplitter exposes page, sentence, passage, line, word, and function boundaries, copies metadata, and adds source and page information. That makes it a practical controlled baseline, particularly when the input has already been converted into trustworthy text. LlamaIndex node parsers provide another abstraction for transforming documents into retrievable nodes. Neither abstraction relieves a team of deciding which metadata and parent context must survive. Choose a tool because it makes the desired provenance observable and testable, not because its default split unit sounds semantic.
The extraction-versus-chunking boundary
Freeze the parser output before tuning chunking. Store a human-readable intermediate form such as structured JSON plus a visual review artifact. For each PDF, compare the original page with the representation for reading order, title hierarchy, page labels, table cells, repeated headers, footnotes, figures, and OCR confidence. A parser regression is then observable without reinterpreting a retrieval score.
Chunking begins only after that review. Its job is to compose extracted elements into retrievable evidence units, add a contextual representation for embedding, and retain a link to the source elements. Keep raw element text and the contextualized chunk separately where possible. A heading may improve retrieval as context, but the answer display should still distinguish the exact evidence span from its added breadcrumb. Do not duplicate full parent sections into every child merely to improve recall; it inflates storage, causes near-duplicate retrieval, and can make repeated text look like independent corroboration.
Tables deserve a separate contract. Retain table title, units, column headers, row headers, notes, page range, and a cell or row locator. For a table that crosses pages, preserve the repeated header and the continuation relationship. For figures, keep caption, page, and a pointer to the source image; do not create a textual fact from an image description unless the product labels it as generated or verified. OCR confidence below a pre-set threshold should route the page or table to review or a distinct evaluation slice rather than silently entering the same index as clean text.
Evaluation dataset and decision matrix
Build a reproducible corpus before selecting a tool or split setting. Include text-heavy pages, multi-column layout, repeated headers and footers, scanned OCR, tables crossing pages, footnotes, and figures. Preserve the original files, a manifest of checksums, parser configuration, chunker configuration, embedding model, retriever and reranker settings, and index revision. A representative set can be modest for the first decision, but every document type with a meaningful user workflow should have at least several questions that require an exact source locator.
Create questions independently of the candidate chunks. Label one or more acceptable source pages, sections, table rows, or figure captions; mark unanswerable questions too. Include questions where the correct response depends on a qualification in a footnote, a unit in a table header, a continuation page, or a contrast between two columns. This prevents a candidate from winning by returning plausible snippets that omit the part a human must verify.
| Decision criterion | What to measure | Promotion interpretation |
|---|---|---|
| Structure integrity | Correct reading order, heading path, and element boundaries after sampled review | A prerequisite; do not compensate with chunk overlap |
| Table integrity | Header, units, row group, notes, and continuation survive together | Required for table-dependent answers |
| Citation reconstructability | Reviewer can open the PDF and locate the cited evidence | Required for high-trust answer display |
| OCR tolerance | Error rate and routing behavior for scans and rotated pages | Report separately from born-digital PDFs |
| Retrieval recall | At least one accepted evidence unit appears in top-k | Compare with fixed retriever settings |
| Answer faithfulness | Answer claims are supported by retrieved, visible evidence | Human adjudicate a sampled set |
| Latency | Parse, index, retrieval, rerank, and answer latency by file type | Must fit the service objective |
| Storage | Raw artifacts, chunks, vectors, and provenance metadata per source page | Include re-index and retention cost |
The 2026 study Empirical Evaluation of PDF Parsing and Chunking for Financial Question Answering with RAG compares multiple parsers, chunking strategies, and overlap choices for question answering on two financial-domain benchmarks, including TableQuest. That is valuable evidence for forming candidates where financial PDFs and table questions resemble the benchmark. It is not evidence that its measured relationships hold for legal scans, scientific articles, multilingual reports, internal slide exports, another embedding model, or your access-control behavior. Keep that scope in the experiment record and avoid importing a reported ranking as a production default.
Failure modes
- Reading-order collapse: a two-column page becomes one alternating sentence stream. Detect it in a visual parser review; changing chunk size will not restore the original order.
- Table without semantics: a row retrieves without units, headers, or notes. Keep a table element or explicitly attach the relevant header and note context.
- Header and footer contamination: boilerplate creates high-frequency, non-informative chunks. Identify and remove only confirmed repeated furniture while retaining true page titles and legal notices.
- Citation drift: a chunk points to a document but cannot locate the supporting paragraph after re-indexing. Use stable element IDs, page spans, source checksums, and versioned index metadata.
- OCR confidence blindness: an incorrect digit or negation flows through embeddings as if it were clean text. Slice evaluation by scan quality and require manual review for high-impact pages.
- Overlap inflation: adjacent chunks repeat the same sentence and dominate top-k. Deduplicate by source span and do not count overlap as independent evidence.
- Evaluation leakage: authors see the candidate output while writing questions, or one parser receives richer metadata. Freeze questions and keep parser, retrieval, and answer settings explicit.
Validation protocol
Run the comparison as a bounded, reproducible decision rather than an open-ended tuning exercise.
- Freeze the corpus manifest and produce parser artifacts for every candidate. Sample every difficult PDF type visually before indexing.
- Define fixed questions, accepted evidence locations, answer rubrics, unanswerable cases, and a blind adjudication procedure. Split questions by layout type so aggregate scores cannot hide a table failure.
- Index fixed-window, page, title or section, semantic, and layout-aware variants with the same embedding model, retriever, top-k, filters, and reranker. Log versions and costs.
- Measure extraction accuracy, structure and table integrity, top-k evidence recall, citation reconstructability, answer faithfulness, parse and query latency, and stored bytes. Inspect errors by PDF class rather than only the overall mean.
- Require a reviewer to reproduce a sample of displayed citations from the original PDF. A correct answer with an unrecoverable citation fails the high-trust release gate.
- Promote one candidate only if it clears pre-set thresholds without a material regression on scans, multi-column pages, or tables. Keep the previous index until freshness, deletion, access-control, and rollback checks complete.
Use hybrid retrieval only after this base comparison makes source units trustworthy. Lexical search can rescue an exact identifier or a rare table term, but it cannot restore a header that parsing discarded. When the decision changes vector count, filters, or metadata storage, revisit the vector database selection guide with measured corpus characteristics instead of estimating capacity from a demo.
Recommendation
For a low-risk, text-heavy PDF corpus, begin with a parser review plus a title or section candidate and a fixed-window control. Preserve page and heading metadata, test citation reconstruction, and keep table questions out of scope until the extraction contract passes. For reports, filings, research PDFs, and knowledge bases where tables, columns, or footnotes affect answers, make layout-aware extraction and element-level provenance the default candidate, even if its ingestion cost is higher.
Do not choose a universal token size. Choose an evidence contract first, then choose the smallest chunking strategy that reliably carries the source, structure, and qualification a reader needs. Treat the financial-document study as a useful, bounded input to candidate selection; let your own corpus, questions, permissions, and citation review determine the production setting. Before launch, complete the broader RAG quality checklist so a good parsing result is not mistaken for a complete retrieval-quality program.