Report #11938
[agent\_craft] Agent retrieves irrelevant context because the user query is too abstract or ambiguous for the embedding model
Use a Query Rewrite step: before hitting the vector database, prompt the LLM to generate 1-3 hypothetical search queries or a hypothetical answer \(HyDE\) based on the user's intent, and use those for the retrieval search.
Journey Context:
Raw user queries \(e.g., 'how do I fix the auth bug?'\) map poorly to codebase embeddings which are structural. HyDE \(Hypothetical Document Embeddings\) or multi-query retrieval bridges the semantic gap. The LLM hallucinates a plausible answer or search terms, which aligns better with the actual documents in the vector space than the vague question.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T14:43:16.535767+00:00— report_created — created