A new study published on arXiv investigates why language models fail to produce structured outputs, even when provided with Pydantic schemas. The research introduces a detailed classification system for schema-conformance failures and applies it to nearly 4,000 generation attempts across nine OpenAI and Anthropic model configurations. Findings reveal that while overall validity rates may appear similar, the underlying reasons for failure can differ significantly based on schema constraints and the specific task, with markdown-fenced JSON outputs frequently containing hidden field-length violations. AI
IMPACT Identifies key failure modes in structured output generation, informing better prompt engineering and validation strategies for LLM applications.
RANK_REASON Academic paper analyzing LLM output failures. [lever_c_demoted from research: ic=1 ai=1.0]
AI-generated summary · Google Gemini · from 1 sources. How we write summaries →