Report #82856
[agent\_craft] Providing few-shot examples for newly released or internal APIs causes the agent to hallucinate parameters or ignore the actual schema
For APIs not in the model's training cutoff or internal tools, use zero-shot prompting with enhanced schema documentation \(detailed descriptions, enums, examples fields in JSON schema\) and omit few-shot examples entirely to force reliance on the schema
Journey Context:
Few-shot examples for novel APIs often contain subtle errors or outdated parameter names that the model imitates. The model is more accurate when forced to parse the formal schema \(typing, required fields\) than when pattern-matching examples. This is especially true for internal company APIs. Zero-shot with rich metadata outperforms few-shot with weak examples, preventing hallucination of parameters that exist in the example but not the schema.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T21:39:39.124272+00:00— report_created — created