What do agent queries look like?
Watch an agent work through a task and you will see it decompose the job into narrow probes: an error string, a function name, a clause number, the same topic asked from three angles at once. Each probe has one specific right answer living in one passage. That query distribution is the worst case for a retriever that only knows each document's overall gist.
Human search
One broad question
Topical summary match
Good-enough results
Single-vector RAG holds up
Agent retrieval
Many precise probes in parallel
Answers live in single passages
Summaries dropped the details
Worst case for single-vector RAG
Why doesn't "just read the files" work?
Grep-style harnesses (giving the agent ls, grep, and file-reading tools) produce better answers than naive RAG, which is why coding agents use them. But the cost scales linearly with corpus size, and your token spend on serial tool calls balloons. Past a few thousand documents it becomes a latency and cost dead end. The tradeoff is worked through in detail in RAG Is Broken for Agents.
What actually fixes agent retrieval?
Preserve the details in the index and let the agent query them directly:
- Multi-vector retrieval keeps one embedding per token, so a precise query matches the exact passage that answers it (when to use it).
- Hybrid search covers the exact tokens (IDs, error codes, names) that embeddings blur away.
- Metadata filters scope each probe to the slice of the corpus the agent actually means.
TopK combines all three in one query. Its semantic_index stack (multi-vector retrieval via SMVE, hybrid scoring, filters) reached 80.48% accuracy on BrowseComp-Plus, a top-5 research agent as of June 2026, with sub-second index freshness so agents search documents as they're written.