Visual parsing : why your PDFs sabotage your RAG (and how LlamaParse fixes it)
We spent two years debating the model. GPT-5 versus Claude 4.5, Gemini versus Mistral, million-token context versus prefix cache. Meanwhile, the elephant in the room stayed invisible: 90% of production RAG pipelines are swallowing a mush of badly extracted pixels, then act surprised when the LLM hallucinates. The problem isn’t in the brain. It’s in the esophagus.
As I explained in the article on the shift from RAG to CAG, even a million-token context window won’t save a system fed on corrupt data. Garbage in, garbage out, the 1957 rule remains unbeaten. And the first gateway for the garbage is the PDF.
The PDF: a dead format, designed for the printer
Adobe invented the PDF in 1993 for a single mission: preserving a document’s visual appearance across machines. Not its meaning. Not its structure. Its appearance. When an InDesign designer exports a report, the reading order is often the one in which they placed the blocks on the page, not the one in which a human would read them. That’s the format’s dirty secret: the average PDF is a semantic graveyard with a pleasant layout.
PyPDF2, PDFMiner, pdfplumber: these traditional tools read the characters but ignore the geometry. They return the text in the order it was written in the file, not the order a brain would interpret it in. On a multi-column document, the result is immediate: sentences blur together, paragraphs become unreadable. On a table, it’s worse.
Take an automotive workshop manual, a BMW M manual for example. The tire-pressure table distinguishes front/rear, low load/maximum load, 19″ wheel/20″ wheel. Six values laid out on a grid. Run through PyPDF2, the table comes out as a linear sequence: 2.3 2.5 2.4 2.6 2.5 2.7. Six numbers. No relationship. The mechanic who’d see a table in it gets only an incoherent string. The embedding that comes out of it will be a cloud of probabilities floating between “pressure”, “tire” and “BMW”, incapable of answering the simple question: what pressure should I set at full load on the M4 G82 with a 20-inch M wheel?

The verdict is mechanical: if the extracted text is unreadable for a human, it’s unusable for the embedding model that follows it. That’s exactly the diagnosis made in the article on RAG’s Achilles’ heel: the weak link in the chain isn’t Voyage or Cohere, it’s the raw data we make them swallow.
Visual parsing: you look at the page, you no longer read the code
The paradigm shift arrived in 2024 with the industrialization of Vision-Language Models. Instead of parsing the PDF’s internal code, you rasterize each page into an image, then pass it to a VLM trained to recognize a document’s visual structure: headings, paragraphs, lists, tables, captions, column headers, footnotes. It’s exactly the way a human reads. You see before you understand.
LlamaParse, the service now rebadged “Parse” on LlamaCloud, is the segment’s reference tool. It combines OCR, vision models and semantic reconstruction to produce clean Markdown where the hierarchy is restored: # Title, ## Section, bullet lists, and above all, above all, Markdown tables with the vertical pipes in the right places. But in 2026, two competitors are seriously snapping at its heels and deserve a closer look.
The leading trio: LlamaParse, Reducto, Docling
Reducto (Y Combinator, $33M raised including a $24.5M Series A led by Benchmark) plays the card of absolute precision on financial and legal documents. Its multi-pass architecture, first a layout model, then contextual VLMs, then an “Agentic OCR” that re-reads and corrects its own errors, targets the cases where the slightest cell error costs an audit. On RD-TableBench, their own public table-extraction benchmark, Reducto reaches 90.2% average similarity on dense tables, ahead of Azure Document Intelligence, AWS Textract and GPT-4o.
Docling (IBM Research Zurich, 37,000 GitHub stars, donated to the Linux Foundation in early 2026) plays exactly the opposite card: open-source Apache 2.0, 100% local execution, distilled models to run on CPU without a dedicated GPU. Its internal stack combines DocLayNet (object detection on 81,000 annotated pages), TableFormer (table-structure recognition), the Heron model from December 2025 (RT-DETRv2, 28 ms per page on A100, +23.5 points of mAP on layout analysis), and now Granite-Docling-258M, a 258-million-parameter VLM under Apache 2.0. On sustainability reports, dense, multi-table, multi-language, Docling comes out at 97.9% precision in the independent Procycons benchmark, ahead of LlamaParse and Unstructured.
Here are the technical trade-offs that decide the choice:
| Criterion | LlamaParse | Reducto | Docling |
|---|---|---|---|
| Complex-table precision | ~85% (RD-TableBench) | 90.2% (RD-TableBench) | 97.9% (sustainability reports) |
| Speed | ~6 s/page (constant) | Multi-pass, slower | 28 ms/page (Heron on A100) |
| Cost | $3/1000 pages (premium mode) | $1-3/1000 pages by volume | Free (Apache 2.0) |
| On-prem | No (cloud-only), LiteParse as a local alternative | Yes (VPC, on-prem available) | Yes, native (air-gapped supported) |
| Specialization | Versatile, generalist RAG | Finance, legal, healthcare | Research, R&D, technical documents |
| Ecosystem | Native LlamaIndex | REST API, Python SDK | Native LangChain + LlamaIndex, Red Hat AI |
The practical verdict: LlamaParse to get started fast on a generic case, Reducto when every balance-sheet cell counts, Docling when sovereignty or zero marginal cost takes priority. The other players (Google’s Document AI, AWS Textract, Azure Document Intelligence, Unstructured for the open-source-first crowd, Nanonets-OCR for local GPU deployments) remain relevant in niches, but none simultaneously dominates the precision/cost/sovereignty triplet that these three offer.
LlamaIndex, of which LlamaParse is the ingestion brick, isn’t just a query orchestrator. It’s above all a structuring plumbing: it splits documents into usable Nodes, applies MarkdownElementNodeParsers that respect the hierarchy, and feeds the vector database with chunks whose internal coherence is preserved. The query comes after. And it’s better because the upstream was clean.
Markdown: the universal language of vectorization
Why Markdown as the pivot format, and not JSON, XML, HTML? Because Markdown is the only format that combines three rare properties: it’s human-readable, machine-structured, and token-light. A Markdown heading costs two characters (# ). The same heading in HTML costs nine (<h1></h1>). On a corpus of ten million pages, the difference is counted in thousands of euros on the embedding bill.
Above all, Markdown preserves the logical relationships that modern embedding models know how to exploit. A table’s pipes (| Front | Rear |) act as cues of spatial proximity: the model understands that the values in the “Front” column belong to the same semantic axis. A header ## Tire pressures attaches all the following paragraphs to that theme, until the next ##. The embedding model no longer invents the structure, it’s given to it.
This strong structure produces a valuable side effect: it widens the vector distance between the different types of blocks. A chunk identified as a heading ## Tire pressures doesn’t project into the same neighborhood of the latent space as a descriptive-paragraph chunk, nor as a table chunk. The embedding model no longer has to guess the nature of the content, it’s signaled to it by the Markdown syntax itself. It’s precisely the mechanism that prevents large-scale Semantic Collapse, that phenomenon where the vectors of a voluminous index become indistinguishable from one another. Raw text with no hierarchy produces vectors that clump into a cluster; structured Markdown produces vectors that pull clearly apart by block type. The noise recedes, the signal rises.
Voyage AI, bought by MongoDB in February 2025 for $220 million, pushes this logic even further with its voyage-context-3 model released in July 2025: each chunk is embedded not in isolation, but with the global context of the document it comes from, a single embedding pass sees all of a document’s chunks and automatically injects the relevant context into each vector, with no extra storage cost. On the benchmarks published by Voyage, the retrieval-precision gain ranges from +7% on generalist corpora to +23% on long legal contracts where context loss is most severe. It’s precisely the document profile, technical manuals, contracts, dense reports, where clean upstream visual parsing meets downstream global context to multiply the quality of the result. To understand why the vector itself is so sensitive to the quality of its input, you have to return to the very nature of the embedding, a point I dug into in the odyssey of the embedding, from Newton’s vector to ChatGPT.
2026 pipeline architecture: the refining chain

Here’s the stack I’d deploy today for an e-commerce, legal or industrial client with a complex documentary base:
- Source, heterogeneous PDFs: technical manuals, contracts, product sheets, B2B catalogs, ERP documentation. The worst imaginable scenario: multi-column, nested tables, annotated diagrams, footnotes.
- Parsing, LlamaParse in
premiummode for dense pages (tables, diagrams),cost_effectivefor simple text pages. Output in Markdown. For players who want to keep control of the data, government, defense, healthcare, legal sovereignty in the strong sense, switch to Docling locally, or LiteParse in TypeScript for simpler cases. - Vectorization,
voyage-3-largefor generalist multilingual search (1024 dimensions by default, up to 2048),voyage-context-3for long corpora where inter-chunk coherence matters, orvoyage-code-3for code bases. The input context goes up to 32K tokens, which allows embedding voluminous chunks without aggressive pre-splitting. - Storage, Pinecone Serverless v2 with one index per business use case (client RAG, semantic search, recommendation), partitioned by
namespaceto isolate each client or knowledge domain. The physical isolation of namespaces forbids cross-leaks between tenants: aclient_acme_2026namespace can’t leak intoclient_beta_2026. It’s the cornerstone of an honest multi-tenant RAG SaaS. - Reranking, Voyage’s
rerank-2.5in post-retrieval to reorder the top-k candidates before passing them to the LLM. And here’s where a often-ignored multiplier effect appears: the reranker’s work is only relevant if the candidates it compares make sense. On a retrieval from PyPDF2, the reranker arbitrates between incoherent fragments, it picks the least bad. On a retrieval from well-structured Markdown chunks, it compares extracts that are each, individually, complete units of meaning: an intact table, a paragraph with its heading, a procedure with its steps. The typical gain then rises from 5-10% to 15-20% precision on ambiguous questions. Visual parsing doesn’t only serve the embedding; it multiplies every link downstream. - Generation, the LLM of your choice. And that’s the key point: at this stage, it hardly matters which one. If the data is clean, Mistral Large, Claude Opus 4.5 and GPT-5 produce largely comparable answers. The differentiation has moved upstream.
The sovereignty trap
Let’s be clear about the diagnosis: LlamaParse SaaS, Voyage AI now under MongoDB’s flag, Pinecone hosted on AWS, this standard 2026 pipeline is entirely American, subject to the Cloud Act and the extraterritorial regime of the United States. For a French law firm, a defense contractor, or even an SME handling GDPR-sensitive documents, that’s unacceptable.
The substitute building blocks exist, but the entry ticket is higher than it seems. Docling is the most mature option for on-prem parsing: open-source IBM, hosted at the Linux Foundation, supported by Red Hat in its AI 3.3 distribution, executable on CPU with an optional GPU fallback. LiteParse, written in TypeScript, does spatial parsing with no Python or GPU dependency, perfect for simple cases, but it drops off the moment the document becomes visually complex. To go further, you have to switch to a self-hosted VLM: Microsoft’s Florence-2 (770M parameters, versatile in OCR and layout detection), or, more radical, ColPali, a visual-retrieval approach developed by the French team Illuin Technology, which bypasses markdown entirely by embedding the pages directly as images. These models run on GPU. Count on an A100 or an RTX 4090 minimum for reasonable inference, plus a DevOps team capable of managing the PyTorch stack, the batching, the quantization. On the vector-database side, self-hosted Qdrant or Weaviate take over. On the embeddings side, BGE-M3 (BAAI) or Mistral Embed replace Voyage.
The operational cost climbs, you need the GPU, the VM, the backup plan, the monitoring, but the dependency collapses. It’s exactly the trade-off posed in the debate on sovereign AI and local open source: sovereignty is expensive, but it’s worth the price when the litigation arrives.
Clean data, the last bastion of expertise
The battle of enterprise AI is no longer fought on the model. It’s fought on the refinery that prepares the data before it touches the model. As I wrote in AI is a commodity, your know-how is the competitive advantage, the real differentiator in 2026 is neither your prompt, nor the LLM you call. It’s the quality of your corpus, the finesse of your chunking, the rigor of your indexing.
A player who’ll have spent six months cleaning their 50,000 PDFs with Docling or LlamaParse, vectorizing them with voyage-context-3, organizing them in clean Pinecone namespaces, will crush any competitor who bet on the latest fashionable model. The LLM is interchangeable. Clean data isn’t.
It’s also what looms behind the move toward agents and MCP, which I discussed in RAG is dead, long live the Agent: an autonomous agent only works if it queries structured sources. A clean knowledge base is the condition of possibility for the agent. PyPDF2 has had its day. Visual parsing is no longer a luxury, it’s the entry ticket.