Report #66594
[agent\_craft] Static few-shot examples become irrelevant as codebase evolves or task context shifts, causing degraded performance
Implement embedding-based dynamic few-shot: \(1\) Index past successful agent interactions \(query, code, result\) in vector DB; \(2\) For new query, retrieve top-k similar examples by embedding similarity; \(3\) Inject retrieved examples into prompt context; \(4\) Weight recent examples higher using recency bias in retrieval.
Journey Context:
Static examples assume homogenous tasks, but coding agents face heterogeneous contexts \(different languages, frameworks, file structures\). Dynamic retrieval adapts examples to current context, similar to RAG but for few-shot examples. This pattern is documented in papers on In-Context Learning with Retrieved Demonstrations.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T18:15:35.011670+00:00— report_created — created