Docling
Open-source document parsing library from IBM Research Zurich. Converts PDFs and other document formats into structured representations suitable for RAG pipelines, LLM ingestion, and agentic workflows.Core abstraction
All inputs parse to a DoclingDocument — a structured intermediate object from which you export Markdown, JSON, HTML, or DocTags. Programmatic access to individual components (tables, figures, text blocks) is available before export.Quick start
Key capabilities
- Layout-aware PDF parsing: reading order, multi-column, headers/footers
- Table structure extraction (rows, columns, multi-level headers)
- Formula → LaTeX conversion
- Figure classification and description generation
- OCR for scanned PDFs
- Audio transcription (ASR)
- Local / air-gapped execution
Integration
- Python:
pip install docling - MCP server:
docling-mcp(agent-accessible without custom code) - Framework integrations: LangChain, LlamaIndex, Haystack, Crew AI
vs. Firecrawl
Complementary: Firecrawl for web, Docling for files. See Firecrawl.
RAG Pipeline Role
Docling slots at the ingestion layer — before chunking, embedding, or retrieval:## section headers, not fixed token counts. Keep figure/table blocks intact — splitting mid-table destroys the relational structure. Docling’s block metadata makes section boundaries explicit.
Combined with Contextual Retrieval (prepend context to chunks before embedding), Docling-quality parsing maximizes retrieval precision.
Relation to other tools
- Complements Firecrawl: Firecrawl handles web URLs; Docling handles files and PDFs
- Works upstream of Contextual Retrieval: clean Docling output → better chunk context → better retrieval