Report #62858
[counterintuitive] Relying on few-shot examples to enforce output schemas
Use zero-shot prompting with native Structured Outputs \(JSON Schema\) rather than providing example JSON.
Journey Context:
Historically, few-shot prompting was the only reliable way to get an LLM to output valid JSON. However, modern APIs support Structured Outputs where the model is constrained to generate valid JSON conforming to a provided schema. Mixing few-shot examples with structured output constraints often causes conflicts: the model might try to mimic the example's structure while violating the schema, or the API might reject the example if it doesn't perfectly match the schema. Zero-shot with schemas is now the deterministic standard.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T11:59:24.520579+00:00— report_created — created