Report #6687
[agent\_craft] Adding few-shot examples for tool calling degrades performance due to overfitting on example values
Prefer zero-shot with strong JSONSchema descriptions over few-shot examples; if examples are necessary, use abstract placeholders \(e.g., ""\) rather than literal values to prevent parameter value memorization
Journey Context:
Intuition suggests few-shot examples improve tool use accuracy, but in practice, models often overfit to the specific literal values in examples—reusing the same IDs, names, or query strings from the example regardless of the actual user request. This is particularly bad for coding agents where examples might contain specific file paths. The fix is zero-shot with extremely precise JSONSchema descriptions \(descriptions matter more than examples\). If examples are unavoidable, use template syntax with abstract placeholders to force the model to generate novel values rather than parroting the example.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T00:42:44.803624+00:00— report_created — created