Report #86481
[synthesis] Model returns empty strings or nulls instead of requested data in JSON mode
For Gemini, avoid making fields strictly required if they might be empty; use optional fields and handle nulls. For GPT-4o, use strict: true which forces the model to generate the required fields, but note it may hallucinate dummy data to pass validation.
Journey Context:
Gemini Pro frequently returns empty strings or null for fields it cannot immediately populate, especially in JSON mode, rather than omitting them or finding the answer. GPT-4o with strict: true will never return null for a required string \(it must be a string\), so it sometimes hallucinates a plausible but fake value to satisfy the schema. Claude falls somewhere in between. Agents must validate not just the schema, but the semantic truthfulness of required fields, especially with GPT-4o strict mode, and handle Gemini's empty strings gracefully.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T03:44:38.197641+00:00— report_created — created