Lately, as I have been thinking more deeply about context engineering, I have been reminded just how important output-format optimization really is.
I have usually preferred Markdown.
At a vague, intuitive level, I thought Markdown was agent-friendly, while visually rendered HTML was human-friendly. I also assumed Markdown would be more efficient in terms of tokens and data size.
But that, too, turned out to be a very human way of thinking.
In environments where AI agents perform complex tasks, tag-based formats such as HTML and XML are said to be far more model-friendly than JSON or plain text, and may even improve reasoning performance.
The model reads structure, not just words.
Structure beats vibes.
Large language models have absorbed vast amounts of web-page data during training, so they are believed to understand the hierarchical structures of HTML and XML, as well as paired opening and closing tags such as <tag>...</tag>, quite intuitively.
This can be particularly effective when AI agents need to perform complex multi-step reasoning, make tool calls, or separate prompts into clearly defined sections.
That makes me think I may need to start using HTML as the default format going forward.
For AI agents carrying out complex tasks, formats such as HTML and XML appear to be much more natural to work with.
Perhaps the saying “seeing is believing” applies not only to humans, but to AI as well.
Example: a project management document from one of my recent ongoing projects.





