XML technologies / Other markup languages / Markdown in publishing / AI workflows

Markdown is also important for publishing professionals because it appears at interfaces to AI tools. Headings and lists can delimit tasks, sources, and expected outputs in a prompt. OpenAI's documentation explicitly describes a combination of Markdown structure and XML tags for such purposes. However, this does not imply a universal verdict of superiority, nor does it prove that every model processes Markdown best. S23

Markdown representations also arise during document extraction. Microsoft's document analysis, for example, documents a Markdown output that can additionally use HTML structures for complex tables and figures. An extraction described as Markdown is therefore not necessarily pure CommonMark. Anyone processing this output further must check the actual profile and the structures contained. S24

For RAG, a structured text can be practical: sections can be used as processing units, and code and tables can be treated separately. A sensible implementation should also include document identification, source location, and, where applicable, page reference outside the visible running text. If a table or its notes are separated during chunking, the relation can be lost. That is a pipeline problem, not a question of whether a text is still formally Markdown.

A reliable comparison of different input formats uses the same content, documented parsers, fixed evaluation rules, and concrete tasks. Blanket statements such as "Markdown always saves a certain number of tokens" or "XML is fundamentally worse for AI" are not justified by this. Token consumption and response quality must be measured separately.

Example 51: A verifiable Markdown output contract for AI

CommonMark

The headings separate task, output contract, and source data. The XML markup within the source delimits the document and carries an identifier. The example is a prompt text, not a model comparison carried out here. Its browser display merely shows how the same text is interpreted as Markdown.

SOURCE

# Task
Summarize only the supplied source.

# Output contract
Use one level-one heading and two paragraphs.
Keep identifiers unchanged.
Do not invent references or metadata.
Do not use raw HTML.

# Source
<document id="guide-01">
The revised edition contains 24 figures.
</document>

RENDERED RESULT

Browser display of the prompt text

The response of a model would then have to be parsed and checked against the contract. Neither a clear heading nor XML tags guarantee truthful answers or prevent prompt injection. A source must be treated as untrusted data. For the published version, facts, identifiers, and references must be checked separately.

For automatically generated articles, a good workflow is: define the source, define the output profile, parse Markdown, check the technical content, and only then publish. A successfully parsed text can still contain incorrect sources, invented figures, or impermissible links. Syntax checking, fact checking, and visual quality assurance complement each other; none of these checks replaces the others.

back to top