Library of the Week — Docling A weekly teardown of one open-source AI/ML library: what it does, why it stands out, and when to use it. 2026-11-13T12:00:00.000Z Library of the Week Library of the Week open-sourcelibrariestoolsdeveloper-tools

Library of the Week — Docling

A weekly teardown of one open-source AI/ML library: what it does, why it stands out, and when to use it.

Weekly One open-source library you should know about.

Docling — extract clean, structured content from PDFs and documents at production scale

GitHub · Language: Python · License: MIT

What it does

Docling converts PDFs, Word files, PowerPoint decks, HTML, and images into clean Markdown, JSON, or structured document representations ready for RAG pipelines. It handles the hard parts—table extraction, reading-order detection, figure identification—that generic PDF parsers botch entirely. Built by IBM Research, it’s aimed at developers who need reliable document parsing without standing up a heavyweight OCR service.

Why it stands out

  • Layout-aware parsing: Uses a purpose-built document layout model (DocLayNet) that understands columns, headers, tables, and captions as semantic units, not just text blobs—tables round-trip to Markdown or export as pandas DataFrames
  • Local and fast: Runs entirely offline with optional GPU acceleration; no API calls, no data leaving your environment—important for enterprise and regulated workloads
  • Chunking built in: Ships with HierarchicalChunker and HybridChunker that respect document structure when splitting for embedding, so chunks don’t straddle section boundaries
  • LlamaIndex and LangChain connectors exist, but Docling also works as a standalone step in any pipeline via its clean Python API

Quick start

from docling.document_converter import DocumentConverter

converter = DocumentConverter()
result = converter.convert("quarterly_report.pdf")

# Export to Markdown
markdown = result.document.export_to_markdown()
print(markdown[:500])

# Export tables as DataFrames
for table in result.document.tables:
    df = table.export_to_dataframe()
    print(df)

When to use it

  • Building RAG pipelines over real-world enterprise documents—annual reports, contracts, technical manuals—where table and layout fidelity actually matters
  • Offline or air-gapped environments where sending documents to a cloud OCR API isn’t acceptable
  • Anywhere you need chunking that respects section hierarchy rather than naively splitting on token count

When to skip it

  • If your documents are plain text or clean HTML, Docling is overkill—simpler parsers like markdownify or beautifulsoup4 will do
  • Handwritten documents or heavily degraded scans still trip it up; a dedicated OCR service (Tesseract, Google Document AI) will outperform it on those inputs

The verdict

Docling is the most thoughtfully engineered open-source document parser available right now, and it plugs directly into the RAG workflows most LLM developers are building. The built-in structure-aware chunking alone is worth the dependency. If you’re still splitting PDFs with pypdf and crossing your fingers, switch.