Schema-Free Output
Anti-pattern: parse free-form model output for downstream code instead of using structured output.
Problem
The model varies its punctuation, capitalisation, field names, and ordering in ways the parser was not written for: smart quotes instead of straight quotes, a missing comma, a 'sure, here is the answer' preamble the parser tried to skip but did not. The downstream code fails in non-obvious ways, corrupts state, or silently misinterprets the result. Post-mortems then blame the model for being flaky when the real bug is in the parser, and the team chases evals that were never going to fix a parsing problem.
Solution
Don't. Use structured-output (JSON Schema, Pydantic, function calling). See structured-output, tool-use.
When to use
- Cite this entry when downstream code regex-parses prose the model happened to emit.
- You are already here if format drift in model output silently corrupts state.
- Use structured-output (JSON Schema, Pydantic, function calling); if the provider lacks it, validate strictly post-parse and retry.
Open the full interactive page →
Diagram, neighbourhood map, code examples, related patterns and full provenance.