Report #58437
[frontier] Naive RAG retrieving semantically similar but contextually wrong tools for the agent
Replace vector similarity search with HyDE \(Hypothetical Document Embeddings\): have a lightweight LLM generate a hypothetical 'ideal' tool call or document based on the query, then embed and search with that hypothetical output, bridging the gap between query and target tool descriptions.
Journey Context:
Users ask 'how do I save this?' when the tool is named 'persist\_to\_disk' - vector search fails on semantic gaps. Keyword search misses synonyms. HyDE generates the 'bridge' text that aligns the query intent with the tool documentation, effectively translating user intent into tool-native vocabulary before retrieval.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T04:34:26.515300+00:00— report_created — created