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
- Stanford's PaperFormalizer turns research papers into Lean-verified versions with author in the loop — StanfordUniversity · 2026-10-27
- Hugging Face TRL makes score centering + masked importance sampling default in async GRPO — _lewtun · 2026-10-27
- AutoResearch agent's weird training curve gets dug into instead of discarded — ZimingLiu11 · 2026-10-27
- Firecrawl offers 2.5x credits to a16z Speedrun founders, unveils $75M Series B — devdigest · 2026-10-27
- Chums: open-source Apple Watch app puts Claude Code and Codex on your wrist — brandon_galang · 2026-10-27
- Open-source Clairic Studio turns pasted text into typed data and working code in 5 languages — dfinke · 2026-10-27