Report #85957
[frontier] Naive vector similarity search returns irrelevant or incomplete context for complex multi-hop queries
Replace single-shot vector retrieval with agentic retrieval: use an LLM step to decompose the query, select the retrieval strategy per sub-query \(vector, keyword/BM25, SQL, API call\), evaluate result sufficiency, and iteratively refine. Route retrieval through a decision layer before hitting any index.
Journey Context:
Naive RAG—embed query, find k nearest neighbors, stuff into prompt—works for simple factual lookup but fails on anything requiring multi-hop reasoning, temporal reasoning, or combining heterogeneous sources. A query like 'What changed in our API between v2 and v3 that affects the authentication flow?' requires: \(1\) finding v2 and v3 auth docs, \(2\) diffing them, \(3\) identifying affected flows. Vector search alone can't do this. Production teams are replacing single-shot retrieval with agentic retrieval: the agent first plans what information it needs, then selects the appropriate retrieval method per sub-query, evaluates whether results are sufficient, and iterates. This is essentially giving the agent a 'research' subroutine. The key architectural shift: retrieval is a reasoning task, not a mechanical lookup. The agent decides WHERE to look \(which index, which API\), HOW to look \(semantic search, exact match, structured query\), and WHETHER it has enough \(result evaluation and re-query\). Tradeoff: higher latency and cost per query—often 3-5x more LLM calls and retrieval operations. But the precision and recall improvement is dramatic: teams report 2-3x fewer hallucinated citations and 40-60% better answer completeness on complex queries. The pattern composes well with graph-based orchestration: the retrieval subgraph has its own nodes for planning, executing, and evaluating.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T02:52:08.225698+00:00— report_created — created