Skip to content

Build1 publisher3 min readPublished

Clean POC PDFs hide the parsing defect a production corpus exposes

A dev.to post argues enterprise RAG failures start at document parsing, where a PDF holds only rendering instructions and a page-scoped reader hands the chunker two columns interleaved and a table with no header.

The Engineer · Build desk

What happened

  • A dev.to post puts the failure of most enterprise RAG deployments at the ingestion layer, in the document parsing stage, before a single query is ever issued.
  • Proof-of-concept corpora are a few well-structured PDFs and maybe a Markdown file or two, basic parsers handle them, the results look reasonable and the system is approved for production.
  • Production corpora, in the post's account, include scanned audit reports whose content is raster images, financial disclosures whose running headers break into body text, and multi-column pages carrying two unrelated sections.
  • The chunker, the embedding model and the vector index all operate on the parser's degraded output, and the resulting query-time failures get attributed to the LLM or the retrieval logic instead.

Compiled by The EngineerSomething wrong?How this is made

Why it matters

  • decision Swapping the parser is not a local change, because the chunker, the embedding model and the index all consume its output, so the fix commits a team to re-chunking and re-embedding the whole corpus.
  • exposure The production sign-off is granted on a corpus that does not resemble production, which leaves the approving team holding a defect its acceptance test had no way to surface.
  • constraint With no failure rate in the post, no team can size its own exposure from it, and the only way to know whether ingestion is the problem is to sample your own documents and read the parser output.

Teams compare embedding models and vector databases, and they benchmark retrieval precision [2]. A precision score compares a query against the chunks you already put in the index. If every chunk is interleaved two-column text, the nearest one is still the nearest one, and the score has nothing to say about it. The post's phrase for the parser is the one that matters: it "does not fail loudly" [10]. A parser that failed loudly would at least file a ticket.

The cross-page table is the cleanest example. In the post's version the header row sits on page 11 and the data rows continue on page 12, and a page-scoped parser handles each page on its own [12]. Page 11 comes out as a header fragment with no data rows. Page 12 comes out as rows with no header context. Chunked and embedded, according to the post, those fragments produce vectors that cannot answer any query correctly about that table's content [13].

The reason sits in the file format. A PDF encodes rendering instructions (draw this glyph at this coordinate, in this font, at this size) and carries no semantic marker for a heading, a paragraph, a table or a section [6]. Membership of a table cell is a human inference from the rendered page [7]. PyPDF and PDFMiner extract character sequences and their approximate positions, and with no layout model they have no mechanism for reading order, column boundaries, or the relationship between elements that sit apart on the page [8]. So they read across the full page width, left to right and top to bottom [9]. Repeated furniture lands wherever it appears spatially, which is how page numbers, document titles, section labels and legal footers end up inside body text [15].

Whether that is your defect depends on your corpus. The post names four failing document classes, and if your production documents are HTML out of a CMS or Markdown from a docs repo, none of the four is present [4][16]. Nothing in the piece argues the parser is the problem for a corpus without them.

What the post does not supply is a count. It asserts that the ingestion layer is where the majority of enterprise RAG deployments fail [1], and it reports no sample, no failure tally, and no retrieval measurements taken before and after a parser change [18]. The mechanism is testable on one document in an afternoon: run a two-column page through PyPDF and read the output. The prevalence is testable only against a corpus that is not in the piece. The pipeline the post documents is Docling and LangChain with a structured metadata extraction layer [14], described without a measured comparison against the basic parsers it replaces [18].

What to watch

  • Whether anyone publishes retrieval numbers for one corpus parsed twice, once with a basic extractor and once with a layout-aware one.
  • Follow-up detail on how the documented Docling pipeline handles the scanned audit reports whose content sits in raster images.
  • Whether POC sign-off starts requiring a sample drawn from the real production corpus, including the multi-column and scanned documents.
Loading claim ledger
Loading source directory links
Loading share composer
Loading topic controls
Loading related stories