Report #38985
[agent\_craft] Few-shot JSON examples cause data hallucination where the model copies example values instead of generating new data
Prefer zero-shot with JSON schema constraints \(response\_format: json\_schema\) over few-shot examples for structured output; reserve few-shot for semantic patterns not schema constraints
Journey Context:
Developers often include 'example JSON' in prompts to guide structure, but this trains the model to replicate specific values from the example \(e.g., IDs, dates, names\) into unrelated contexts. This is 'data contamination' from the prompt. JSON Schema \(via response\_format\) provides deterministic structure without data contamination. Few-shot should be reserved for teaching complex semantic patterns \(like specific reasoning styles\) not for teaching JSON syntax.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T19:54:30.272862+00:00— report_created — created