01

A stable contract across parser routes

Different formats and parsing engines naturally produce different native payloads. Passing those payloads directly downstream couples every consumer to every parser. DocIR provides a common boundary: pages reference ordered block identifiers; blocks carry type, text or Markdown, page index, and optional geometry; metadata records route, version, creation time, and warnings.

The goal is not to erase useful differences. Route-specific evidence can remain in metadata, while the fields used by chunking, indexing, review, and citation stay predictable. A versioned docir.v1 contract also makes schema changes explicit instead of silently changing application behavior.

02

What structured output enables

A RAG indexer can split on heading blocks and attach the source page to every chunk. A review interface can highlight the corresponding bounding box. A workflow can send tables to a validation step while leaving paragraphs on the deterministic path. An archive migration can preserve parser warnings for later remediation.

These workflows are difficult when the only artifact is a single Markdown string. Keeping both representations avoids a false choice: humans and language models get readable text; application code gets stable structure.

  • Page-aware citations and source previews.
  • Type-aware chunking for headings, paragraphs, lists, tables, formulas, and figures.
  • Selective quality review based on route and warning metadata.
  • Reprocessing decisions without reopening every raw document.
03

Validate before downstream use

DocParse validates generated DocIR against its schema before publishing a successful result. Consumers should still pin the supported schema version, reject unknown required shapes, and keep the original job and manifest identifiers with derived chunks.

Treat the parsed record as an intermediate data product. Record the parser version, content hash, options hash, and indexing version so a retrieval result can be traced to the exact transformation that produced it.

Frequently asked questions

Questions teams ask before building

Is DocIR a replacement for Markdown?

No. Markdown and DocIR serve different consumers and are returned together. Markdown is readable; DocIR is structured and traceable.

Does DocIR contain bounding boxes?

Blocks can include normalized geometry when the selected parsing route produces it. Route and warning metadata explain what evidence is available.

Can DocIR be used for RAG chunking?

Yes. Heading, page, and block boundaries give a chunker better signals than fixed-length splitting over flat text.