Report #79590
[agent\_craft] Static few-shot examples in system prompt waste context and confuse the agent when the task shifts
Dynamically retrieve few-shot examples based on the current user intent or tool call, rather than hardcoding them in the system prompt. Inject only the 1-2 most relevant examples into the immediate context.
Journey Context:
System prompts often contain 10\+ few-shot examples for various tools, consuming thousands of tokens. If the agent is just doing a simple file read, seeing examples of complex API calls wastes context and increases the chance of the agent mimicking the wrong behavior. Dynamic few-shot retrieval \(using semantic search over a corpus of examples\) ensures the agent only sees highly relevant demonstrations, keeping the context dense and on-topic.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T16:11:32.630871+00:00— report_created — created