March 2, 2026 · Giorgio Ricciardiello
Everyone optimizes retrieval.
Few engineers optimize the information entering the retrieval system.
Retrieval-Augmented Generation (RAG) is fundamentally a knowledge reconstruction pipeline. Every downstream component assumes that the original information survives ingestion. If that assumption is false, no embedding model, reranker, or prompt engineering technique can recover what has already been destroyed.
The quality ceiling of a RAG system is therefore bounded by its document representation.
This is where many implementations fail.
A PDF is a visual layout language rather than a semantic document format. The parser has to infer structure from geometry.
The parser is reconstructing a hierarchy similar to:
Most extraction pipelines flatten this into
string
That transformation discards information that later stages implicitly expect to exist.
Typical failures include
Once those relationships disappear, retrieval quality becomes an upper-bounded optimization problem.
One realization I had recently is that OCR systems should not be compared by text accuracy.
They should be compared by the information graph they reconstruct.
Different systems make different assumptions.
Docling attempts to reconstruct document semantics into structured objects.
Rather than producing plain text, it generates structured elements such as headings, paragraphs, tables, figures and metadata that can later be serialized into Markdown or JSON.
Its design philosophy is
Preserve document hierarchy.
MinerU is optimized for complex scientific documents.
Its focus is recovering
The objective is high-fidelity reconstruction of academic literature rather than generic document conversion.
AllenAI approaches the problem differently.
Rather than arguing their parser is best, they introduced olmOCR-Bench, a benchmark specifically designed to measure parser performance across real-world PDFs.
Instead of evaluating OCR quality alone, the benchmark measures whether systems preserve
The interesting result is that their own parser is not ranked first.
That is exactly what makes the benchmark credible.
The contribution is not another parser.
It is making parsing measurable.
Most RAG architectures still assume this pipeline
A better mental model is
Chunking should operate on semantic objects rather than arbitrary token windows.
A table is a node.
A figure and its caption form a relationship.
A section heading defines context.
An appendix has different retrieval semantics than the main body.
Retrieval quality becomes a consequence of preserving these relationships.
This idea extends naturally beyond PDFs.
Andrej Karpathy's concept of an LLM Wiki and Google's Open Knowledge Framework both recognize the same limitation.
Markdown repositories were written for humans.
LLMs require machine-readable knowledge structures.
Instead of organizing information as files, documentation becomes an explicit knowledge system.
Each document references others.
Each experiment links to the code that generated it.
Each evaluation links to the dataset.
Each model links to deployment metadata.
Instead of retrieving isolated chunks, the system retrieves connected knowledge.
The repository becomes a continuously evolving knowledge graph rather than a collection of Markdown files.
I suspect the next evolution of Data Engineering is not larger vector databases.
It is engineering the knowledge lifecycle.
Each stage should be observable.
Each transformation should be versioned.
Each representation should be benchmarked.
The engineering challenge is no longer simply storing data.
It is preserving meaning.