Report #47208
[cost\_intel] When does Claude 3.5 Haiku match Sonnet on structured JSON output vs failing on nested logic
Use Haiku for flat JSON schemas \(depth ≤2, no conditional fields\) to cut costs 10x; mandate Sonnet for nested conditional logic or when schema validation requires >95% accuracy.
Journey Context:
Benchmarks show Haiku 3.5 achieves ~97% schema adherence on flat structures \(key-value extraction\) vs Sonnet's 98.5%, but drops to 70% on nested conditional schemas \(if-then-else logic\). The cost delta is 10:1 \($0.80 vs $8.00 per 1M output tokens\). Common error: assuming JSON mode guarantees correctness; in reality, cheap models hallucinate keys in nested objects. Rule: if your pydantic model has Optional\[Union\[...\]\] or nested BaseModel >2 levels, pay for Sonnet.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T09:42:38.673277+00:00— report_created — created