Retriever
Also known as: First-stage retriever, Recall model
The fast first-stage search in RAG: bi-encoder or BM25 fetching a shortlist for the reranker or LLM.
The fast first stage of a RAG pipeline. Uses precomputed embeddings (bi-encoder) or an inverted index (BM25) to scan millions of documents in milliseconds and hand a shortlist of tens or hundreds of candidates to a downstream reranker or directly to the LLM.
In practice
Every production RAG interview covers the two-stage pipeline. The retriever is where recall lives, and its choice (dense vs sparse vs hybrid) drives cost, freshness, and quality.
How it compares
The retriever fetches a shortlist fast; the reranker scores that shortlist more accurately per pair.
A bi-encoder is one way to build a retriever: independent embeddings of query and docs compared by vector similarity.
Comparisons that include Retriever
Related topics
Questions that mention this term
- Select the practical mitigations for the lost-in-the-middle effect that actually move the needle
- Pick the right pattern for putting a long audio recording into context for a text model
- Walk through the prompt structure that maximizes provider prompt cache hit rate
- Why does a cross-encoder reranker pay off even though it is slower than a bi-encoder retriever?
- Distinguish context engineering from prompt engineering in one practitioner's working definition
- Explain why a typical…
Related terms
AI System Design
End-to-end design of production LLM systems: ingestion, retrieval, serving, eval, monitoring.
BM25
Classical TF-IDF-style lexical scoring: a surprisingly strong baseline, still the first stage of many hybrid RAG pipelines.
Chunking
Cutting documents into retrievable pieces before embedding them.
Context Engineering
Deciding what makes it into the model's context window (prompt + RAG + history + memory), and why.
Context Window
The max number of tokens a model can attend to at once.
Cosine Similarity
Compare two vectors by the cosine of their angle; the default similarity metric for embedding search.