Report #74149
[agent\_craft] Static few-shot examples anchoring the model to specific syntax unlike the user's actual codebase
Replace static few-shot examples with dynamic retrieval \(RAG\) from the user's actual codebase to match their specific patterns \(naming conventions, error handling style\)
Journey Context:
Developers often include 3-5 static code examples in the system prompt to demonstrate the desired output format. However, these static examples anchor the model to the specific syntax, variable naming, and patterns in those examples, which may differ from the user's actual codebase \(e.g., using snake\_case in examples when the codebase uses camelCase\). This creates jarring inconsistencies in the generated code. The fix is to eliminate static few-shots entirely and instead dynamically retrieve relevant examples from the user's own codebase using semantic search. This ensures the model mimics the user's actual patterns rather than the static examples.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T07:03:31.434673+00:00— report_created — created