Report #83060
[agent\_craft] Agent produces outdated patterns or deprecated APIs because few-shot examples in the system prompt use old syntax
Version-pin your few-shot examples to the target framework version \(e.g., 'React 18 examples using hooks'\), or prefer zero-shot with explicit API version constraints \('Use Python 3.11\+ syntax'\) rather than stale examples from StackOverflow.
Journey Context:
Developers often copy-paste few-shot examples from StackOverflow or old documentation into system prompts. These examples use deprecated patterns \(e.g., React class components instead of hooks, OpenAI's legacy function calling syntax with 'functions' parameter instead of 'tools', or Python 2 print statements\). The model replicates these patterns because few-shot examples have high salience in the context window. The solution is either dynamic example retrieval from current documentation APIs or explicit version pinning in zero-shot prompts. Research on few-shot learning \(Brown et al., 2020\) shows that models are highly sensitive to example distribution, and fine-tuning docs emphasize data freshness.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T22:00:23.637884+00:00— report_created — created