Report #7483
[agent\_craft] Few-shot examples containing deprecated tool names cause agent to hallucinate unavailable tools
When adding new tools or removing old ones, use zero-shot prompting with explicit JSON schema injection for novel tools; for established tools, dynamically retrieve few-shot examples from a vector database filtered to only include currently available tool names
Journey Context:
Static few-shot examples hardcode specific tool names \(e.g., 'use read\_file'\). When the environment changes \(e.g., 'read\_file' is replaced by 'read'\), the model continues invoking the old tool due to pattern matching bias. Zero-shot with explicit schemas forces the model to rely on the current function definitions rather than memorized patterns. For older stable tools, dynamic few-shot retrieval ensures examples always reference live tool sets.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T02:48:01.786384+00:00— report_created — created