Report #79064
[agent\_craft] Static few-shot examples in system prompt become irrelevant as the coding session evolves, degrading performance on new tasks
Implement dynamic few-shot retrieval: embed the current task description, query a vector store of past successful trajectories \(question-answer pairs\), and inject the top-2 most similar examples into the current prompt
Journey Context:
Static examples work for fixed syntax \(like DSLs\) but fail for evolving tasks where relevant patterns shift \(e.g., from 'React components' to 'Redux reducers' to 'API integration'\). Manual updates are impractical. Dynamic retrieval from a 'trajectory memory' \(as implemented in Voyager\) surfaces contextually relevant examples without manual prompt engineering. This approach improves task success rates by 25% over static examples in interactive coding benchmarks. Trade-off: added latency \(100-200ms\) for embedding retrieval and slightly higher token costs for dynamic examples.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T15:18:12.065827+00:00— report_created — created