Report #66094
[architecture] Agent retrieves irrelevant memories because the search query is phrased differently than how the memory was stored
Implement hypothetical document embeddings \(HyDE\). Before searching the vector store, have the LLM generate a hypothetical answer or a detailed memory entry based on the query, then use the embedding of that hypothetical text to search the vector store.
Journey Context:
Users ask questions in short, ambiguous ways \(e.g., 'fix the bug'\), while memories are stored as detailed, declarative statements \(e.g., 'The authentication module fails when the token is expired'\). The embeddings of a short question and a detailed answer often have low cosine similarity. HyDE bridges this gap by transforming the search query into the same format and detail level as the stored memories, dramatically improving retrieval recall.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T17:25:20.025223+00:00— report_created — created