docling-project/docling
Local-first document parser for structure-aware RAG ingestion
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
Docling is a Python ingestion and conversion layer, not a RAG database. docling.document_converter.DocumentConverter accepts a file path or URL and produces a conversion result whose document is a DoclingDocument. That shared representation is the handoff between format-specific parsing and export. A pipeline can retain it as lossless JSON for downstream processing or export Markdown when the next stage expects text. Embedding, storage, and retrieval remain downstream responsibilities.
The root pyproject.toml defines the modular docling-slim package with Hatchling, while the installation example and Dockerfile install docling. The container uses Python 3.11 and CPU-only PyTorch. The Python SDK and CLI are direct entry points; docling-serve exposes conversion as an API, and an MCP server provides agent access. LangChain, LlamaIndex, Haystack, and Crew AI integrations connect conversion to downstream applications without making Docling the retrieval backend.
Key Capabilities & Differentiators
For PDFs, Docling handles page layout, reading order, table structure, code, and formulas. OCR covers scans and other images. The CLI also exposes a vision-language model path through --vlm-model granite_docling. These are meaningful options when a document's columns or tables carry information that plain text extraction would flatten; validate the chosen pipeline on your own corpus rather than assuming layout or table fidelity.
Inputs extend beyond PDF to DOCX, PPTX, XLSX, HTML, EPUB, Apple iWork, email, and specialized XML such as USPTO patent records, JATS articles, and XBRL reports. Audio inputs such as WAV and MP3 use ASR. Outputs include Markdown, HTML, WebVTT, DocLang, DocTags, and lossless JSON. Choose JSON if later processing needs the structured representation; choose Markdown if ease of ingestion matters more than retaining the full structure.
Trade-offs & Limitations
A lightweight PDF text extractor is a simpler baseline for text-native files with predictable reading order. Docling is a stronger candidate when scans, multi-column layouts, or tables affect the quality of what gets indexed. Compare reading order, table structure, and downstream chunk quality on the same sample set, not just whether each tool returned text. A managed API can shift model and worker operations to a provider; local Docling puts those responsibilities on your team but lets you decide where documents are processed.
The CPU container is a starting point, not a capacity estimate. OCR, model selection, document length, and concurrency all affect resource use; measure wall time and peak RAM on realistic batches, and measure VRAM if you select a GPU-backed path. Treat OMP_NUM_THREADS=4 as the supplied container's starting budget, not a sizing rule. The project is MIT-licensed, but review the licenses of the model artifacts and dependencies you distribute separately.
Hardware & Deployment Guide
Install docling with Python 3.10 or newer. The project lists macOS, Linux, and Windows on x86_64 and arm64; check availability for the particular backend you intend to use. The supplied Dockerfile builds on python:3.11-slim-bookworm, installs CPU-only PyTorch, runs docling-tools models download at build time, and sets OMP_NUM_THREADS=4. For offline deployment, stage the dependencies and model artifacts, point DOCLING_ARTIFACTS_PATH at the staged models, and test conversion with outbound networking disabled. Use docling-serve when you need an HTTP service rather than a Python worker or CLI job.
In v2.155.0, Granite Docling v2 gained 500M and 2B VLM presets with MLX support; v2.156.0 made the Granite Docling V2 500M preset the default for the VLM path. That is not a claim that every conversion uses a VLM. Pin the package and model configuration, then regression-test representative exports before upgrading if downstream chunking or indexing depends on stable output.
DocumentConverter.convert() accepts local paths and URLs and returns a result containing a DoclingDocument.OMP_NUM_THREADS=4.docling-serve for an API, or the MCP server for agent access.Teams ingesting mixed-format corpora, especially scans and layout-heavy PDFs, that need structured output and control over where conversion runs.
You need a vector database or an end-to-end retrieval service, or your corpus is simple enough that plain text extraction meets your retrieval needs.
Quick Start & Installation
pip install doclingComparison vs. Top RAG, Data & Memory Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| docling ★ | 71.4k | +285 | Python | MIT | Local-first document parser for structure-aware RAG ingestion |
| marker | 41.2k | +103 | Python | Apache-2.0 | Hybrid OCR and layout parsing for document ingestion in RAG pipelines |
| MinerU | 84.7k | +326 | Python | — | Local document parser and library for structured RAG ingestion and page-level ci |
| markitdown | 199.7k | +909 | Python | MIT | Python library and CLI that turn mixed-format documents into Markdown for RAG in |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/docling-project/docling.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about docling
Where does Docling fit in a RAG pipeline?
DocumentConverter.convert() on a local path or URL, then pass Markdown or DoclingDocument JSON downstream. Use Markdown when text is the expected interface; keep JSON when downstream code needs to inspect document structure. Use docling-serve if conversion needs a separate service lifecycle.Do I need a GPU, and how should I size workers?
Can we use Docling commercially and deploy it in an air gap?
When should we choose Docling over a PDF text extractor or a managed API?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy