Docling
把 PDF、Office、图片、音频等解析成喂给 gen AI 的 Markdown,可全本地跑
IBM 研究院出的文档解析库(现归 LF AI & Data 基金会):把 PDF、Word、PowerPoint、Excel、HTML、图片、音频(WAV/MP3/WebVTT)等几十种格式解析成 Markdown、HTML、JSON 或 DocTags,供 RAG 与 agent 取用。强项在 PDF 的深度理解——版面、阅读顺序、表格结构、公式、代码、图片分类都尽量还原。可全本地运行(敏感数据不出机),并内置对 LangChain、LlamaIndex、Crew AI、Haystack 的接入。pip install docling 后,命令行或 from docling.document_converter import DocumentConverter 直接调,一行 export_to_markdown() 出文本。
社区实测
输出质量在开源方案中公认最好,但处理速度慢,是典型的精度换速度方案。
- 复杂表格解析成功率高,优于其他开源方案
- 将 PDF/DOCX/PPTX 转为 Markdown 和 JSON,供 LLM 或 RAG 管线消费
- 扫描版书籍 PDF 转 Markdown 文本
- 开源、即插即用的 Python 包,无需额外基础设施
- 处理速度慢,官方以精度优先设计;可通过 --no-ocr 或 --pdf-backend=dlparse_v2 提速
- 生产环境中速度与稳定性的平衡仍不可靠,多数开源方案在这方面都有短板
来源
Docling: Great quality, but painfully slow : r/LocalLLaMADocling is a new library from IBM that efficiently parses PDF, DOCX ...A new tool to unlock data from enterprise documents for generative AIcan you please share some details how are you using docling? This ...
截至 2026-06-18
pip install docling