Docling Puts the Structure Back into PDFs Before RAG Ever Retrieves
When RAG output degrades, the fix usually sits upstream in parsing, not in the embedding model or vector store. Docling keeps structure through extraction locally and open-source, so table-heavy and multi-column documents retrieve far better without swapping models.
Docling attacks the failure before retrieval: when a PDF becomes text, the document structure dies, and RAG retrieves fragments of tables, detached headings, and scrambled multi-column pages. Docling renders each page to an image and runs DocLayNet layout analysis to identify headings, paragraphs, tables, formulas, and code blocks with coordinates. A reading order model re-sorts multi-column pages the way a human reads them, and TableFormer rebuilds table rows, columns, and merged cells with TEDS scores between 0.877 and 0.911.
Output lands in a single DoclingDocument object that exports losslessly to JSON, Markdown, or HTML. HybridChunker splits that document along structural boundaries and contextualize() prepends the section hierarchy to each chunk, so an embedding model sees "Employee Handbook > HR Policy > Resignation Management" attached to the sentence about giving 30 days' notice.
Docling runs fully on local machines with models downloaded once, covers PDF, DOCX, PPTX, XLSX, HTML, Markdown, images, and audio, and integrates with LangChain, LlamaIndex, and an MCP server. The trade-offs: a complex PDF takes 9 to 10 seconds on CPU, deeply nested tables still lose accuracy to commercial tools, Java teams must call through a REST API, and formula, code block, and image-description features ship off by default.
Debugging usually targets retrieval first: swapping embedding models, chunk sizes, and vector search strategies left RAG broken, because structure was lost at extraction. Parsing costs less to fix and sits further upstream.
Graduated status at LF AI & Data and 68% of PRs from outside the core team carry as much weight as the star count; governance at that level survives whatever happens to the original sponsor.
Structure preservation is conditional in practice. Formula-to-LaTeX conversion, code block recognition, and image description ship disabled, so reaching the advertised capability takes explicit configuration.
Nine to ten seconds per complex PDF on CPU and a REST-API detour for Java stacks set real operational limits on teams that choose Docling for structure preservation.