Modern agent search is not one algorithm.
It is a pipeline.
The job is to find evidence that an AI agent can trust and use. That usually requires multiple retrieval and ranking stages.
Sparse Retrieval
Traditional sparse retrieval uses lexical signals.
It is good at exact terms:
- function names
- error messages
- package names
- API endpoints
SPLADE improves this idea with neural sparse representations. It can expand terms while still producing sparse vectors that work well for search infrastructure.
For coding agents, this matters because exact tokens are often important.
Dense Retrieval
Dense retrieval uses embeddings.
It is good at semantic similarity:
- concept matches
- paraphrases
- related explanations
- natural-language questions
Dense retrieval can miss exact technical strings, so it works best with sparse retrieval rather than replacing it.
ColBERT and Late Interaction
ColBERT-style retrieval keeps richer token-level interactions than a single dense vector.
That makes it useful when relevance depends on multiple terms aligning across a document.
It can be more expensive than simple vector search, but it often improves ranking quality.
Cross-Encoders
Cross-encoders rerank candidates by reading the query and document together.
They are usually too expensive for the first retrieval stage, but strong for final reranking.
Pipeline shape:
What Agents Need
Agents need more than relevance.
They need:
- source authority
- freshness
- compact passages
- deduplication
- enough context to act
That is where the retrieval pipeline meets product design.
The Practical Takeaway
SPLADE, ColBERT, and cross-encoders are not buzzwords.
They are tools for reducing wrong context.
For agents, better search means fewer hallucinations, fewer retries, and more useful first attempts.
