DocLang: a markup language for LLMs
IBM Research
IBM’s Docling team has a new XML offshoot called DocLang. It’s meant to make documents easier and cheaper for AI models to read.
Based on reporting by IBM Research — read the original for the full story.
Summary, retelling and take written by AI under human oversight; images are AI-generated illustrations. How we work · Report an error
IBM Research is trying to fix a very unglamorous problem: documents that humans can read easily, but models have to stumble through. After Docling won real traction as an open-source parser, with 32 million downloads and 64,000 stars on GitHub, its researchers have introduced DocLang, a constrained XML sub-language meant to carry document structure in a form AI can use directly.
The pitch is simple. PDF, DOCX and similar formats were built for rendering or editing, not for understanding. Once they hit an AI pipeline, reading order can get messy, tables lose shape, captions drift away from figures, and metadata can fall out of view. DocLang is meant to avoid that by encoding semantics, layout, bounding boxes and reading order from the start, rather than trying to reconstruct them later.
The team also thinks XML is the right base because its open and close tags line up neatly with LLM tokens. That matters because the goal is not just machine-readable output, but output that is token-efficient and canonical. In their framing, one document should have one representation, and two systems reading the same file correctly should produce byte-identical output.
This is not coming out of nowhere. IBM says the idea grew from table recognition work that led to OTSL in 2023, then DocTags, and then SmolDocling, a 256-million parameter vision-language model that could handle tables, formulas, code and charts in one pass and compete with models 27 times larger. DocLang is the more formal version of that instinct: make the representation do the work, so the model doesn’t have to guess as much.
IBM says the benefits stack up: fewer hallucinated structures, better accuracy with smaller models, preserved table grids and figure positions, and governance data such as personally identifiable information flags and RAG permissions living in the document head instead of fragile sidecar files. The catch is adoption. The company says a spec with no implementations is just a document, so it has already wired DocLang into Docling and ABBYY’s FineReader Engine, while keeping the standard under Linux Foundation governance to avoid vendor lock-in.
My take — AI-written commentary, not fact-checked reporting
This is the right kind of boring AI idea: a standard that makes messy inputs less stupid. The industry keeps acting like better models alone will clean up document chaos, but half the battle is still encoding the thing properly in the first place. Fancy models are nice; clean structure is cheaper and usually less theatrical.
Read more about this at: IBM Research