DocLang: a markup language for LLMs
| Source: IBM Research
Tags: IBM, DocLang, Docling, RAG, document AI, LangChain, LLM infrastructure
IBM Research released DocLang, a constrained XML dialect designed for LLM document understanding — one document, one byte-identical encoding — as a complement to Docling, its document parser with 32M downloads and 64K GitHub stars already integrated into LangChain and Red Hat OpenShift.
Details
IBM Research's Peter Staar, creator of Docling, has introduced DocLang — a constrained XML dialect designed from the ground up for machine understanding rather than human readability or rendering. Where PDF tells a renderer where to place pixels and DOCX tells a word processor how to lay out pages, DocLang encodes structure explicitly: headlines, table captions, reading order, bounding boxes, and metadata all survive conversion intact. The practical motivation: ambiguous document structure costs model accuracy before the LLM even sees the content. DocLang guarantees one document, one correct encoding — a byte-identical output property that makes the representation both trainable and verifiable. This is analogous to JSON's role in data exchange: a well-defined schema that eliminates format ambiguity upstream of inference. DocLang is already integrated into Docling's conversion pipeline. Docling converts PDFs, PPTs, XLSXs, and video files into an internal representation that serializes to DocLang. The project has 32 million downloads and 64,000 GitHub stars — IBM's most successful open-source project — and is integrated into LangChain, Red Hat OpenShift, and IBM's Granite LLM family. For AI practitioners building RAG pipelines over enterprise documents, DocLang represents a potentially lower-latency, lower-cost input format. Whether it achieves JSON-level adoption depends on how many document pipeline tools and embedding services implement it.