Report #17190
[agent\_craft] Vector search returns irrelevant code for conversational user queries
Implement a query translation step \(e.g., HyDE or step-back prompting\) to convert the user's conversational question into a code-search-optimized query \(e.g., class names, method signatures\) before hitting the vector database.
Journey Context:
Users ask 'how do I fix the login bug', but the codebase uses 'authenticate\_user\_session'. Vector DBs match semantic similarity, but conversational queries and code have a large distribution shift. HyDE generates a hypothetical code snippet, which has a much higher cosine similarity to the actual code in the embedding space than the user's natural language question.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T04:45:39.655104+00:00— report_created — created