docling-project/docling-core
A Pydantic document core for structured export and RAG chunking
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 Core is an in-process Python library centered on DoclingDocument, a Pydantic model that defines the document schema and exposes an API for building documents. In a RAG pipeline, an upstream component supplies or constructs the structured document. Core then operates on that representation rather than requiring each downstream consumer to interpret the source file independently.
Serialization and chunking are distinct extension points with built-in implementations. The convenience export methods on DoclingDocument sit on top of the serialization API. This lets applications keep a common document model while choosing different output representations or chunking policies for different consumers.
Key Capabilities & Differentiators
A DoclingDocument can be exported to Markdown or HTML via its helpers, or processed through the serialization API when the built-in representation does not fit. The chunking API includes a hybrid chunking example and supports custom implementations for downstream retrieval needs.
The profiling API works on single documents and collections. It reports on pages, tables, pictures, and text items, and provides deciles, histograms, and collection visualizations. Use these measurements to select representative test fixtures and identify structural outliers before tuning chunking; they are not retrieval quality metrics.
Trade-offs & Limitations
Compared with splitting plain text or Markdown, retaining a structured model gives exporters and chunkers access to document structure instead of forcing them to infer it from flattened text. The cost is an extra schema boundary and a need to test custom transformations. If you need raw-file conversion, use full Docling upstream; if you already have clean text and need only simple splitting, a generic splitter introduces less integration work.
The MIT license permits commercial integration, subject to its notice requirements on redistribution. Local image access is a separate trust decision: references using a filesystem path or file:// are not read by default and raise ValueError when loading is attempted. Leave that default in place for mixed-trust inputs; if trusted documents need local images, opt in per document rather than changing process-wide settings.
Hardware & Deployment Guide
Install with pip install docling-core and import it into the Python application that performs document transformations. The development setup targets Python 3.10 through 3.15 and uses uv sync --all-extras. Runtime configuration is available through DOCLINGCORE_ environment variables or docling_core.utils.settings.settings. Size the worker for document complexity, concurrent transformations, and any image or tokenizer loading rather than assuming a GPU or a fixed VRAM requirement.
v2.109.0 adds tokenizer loading from an artifacts path, useful for pre-staging tokenizer assets in controlled environments, and preserves WebVTT cues with misnested end tags. v2.108.0 adds TrackItem and DocLang support; v2.107.1 addresses WebVTT serialization for sub-millisecond cues and escaping in cue text and voice names. Test representative exports and chunk boundaries before upgrading a pinned production version.
Teams that already produce DoclingDocument objects and need a shared model for export, retrieval chunking, and corpus profiling.
You need raw-file conversion or a complete indexing and retrieval service out of the box, or you only need to split clean text.
Quick Start & Installation
pip install docling-coreComparison vs. Top RAG, Data & Memory Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| docling-core ★ | 308 | +4 | Python | MIT | A Pydantic document core for structured export and RAG chunking |
| auto-ontology | 19.1k | +3.7k | Python | Apache-2.0 | An ontology framework that grounds agent-generated SQL in reviewed business defi |
| llama_index | 53.1k | +104 | Python | MIT | A modular Python SDK for document ingestion, indexing, and RAG |
| langextract | 39.5k | +85 | Python | Apache-2.0 | Python SDK for extracting structured data with traceable source spans |
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-core.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about docling-core
Where does Docling Core fit in a RAG ingestion pipeline?
How should I size CPU, RAM, and VRAM?
Can I use it commercially and run it on my own infrastructure?
When should I choose Core over a generic splitter or the full Docling pipeline?
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