Cornell study: JSON mode cuts answer diversity across 44 language models
omarsar0 · x · 2026-07-23
Structured output can narrow model answers more than expected
A Cornell paper tests whether asking for structured output changes not just formatting, but the content distribution itself. Across 44 language models and 31 broad-answer prompts, the authors find that a simple instruction like “Reply with JSON only” measurably reduces diversity.
Key findings
- On an open-ended pick-a-word prompt, asking for JSON shifts the modal answer from 41% to 64% and cuts distinct answers from 52 to 36.
- The collapse appears for JSON and XML, both formats models are trained to emit, but not for YAML and CSV.
- Forcing a schema at the decoder does not compress answers further, suggesting the narrowing happens when the model forms the response, not when the decoder enforces structure.
- In a within-run re-sample, 53% of stable chat defaults shift under JSON mode, often back toward the majority answer.
- The effect survives in 28 of 31 categories and shows a register-specific gradient: compression is present in answer-delivery formats, absent for YAML/CSV, and reversed for a generic bracket wrapper.
Why it matters
If your agent or pipeline relies on JSON mode, you may be sampling from a smaller and more homogeneous pool than the chat surface suggests.
More from coding & agent
- shadcn's /improve skill paired with Grok on SuperGrok Heavy for plowing through issues — shadcn · 2026-10-27
- Paradigm Launches Envoys: Your Claude Code and Codex on Your Research Graph, Free — tensorqt · 2026-10-27
- AXL launches remote MCP server exposing 1,284 sales and marketing APIs to Claude and Codex — EdTech_Padre · 2026-10-27
- GitHub's Thomas Dohmke ships Entire, a Git forge built for agent-human collaboration — carrycooldude · 2026-10-27
- OmarchyTV hits GitHub: Omarchy-style TV launcher with AI TUI and MCP — alexcovo_eth · 2026-10-27
- AWS on agent prompt caching: explicit + implicit patterns to slash token costs — AWS ML Blog · 2026-10-27