Concept guide · Embeddings and vector search
What does a reranker do?
A slower explanation for when the short interview answer is not enough. Start with the intuition, then connect it to the technical idea and the way an interviewer expects you to reason about it.
ML area
Generative AI → Reranking
Interview format
Core · Concept
Question
GENAI-043
Start with the idea
In simple terms
A reranker looks at the user’s question and each candidate passage together, then produces a more accurate ordering than the fast first-stage retriever.
Make it concrete
The vector search may return ten passages about account access. A reranker can move the passage about enterprise SSO above a broadly similar password-reset passage.
Build the answer
How to reason about it
- 1Keep the first stage broad enough to avoid missing the answer.
- 2Use the reranker to spend extra computation on a bounded candidate set.
- 3Verify that ranking gains survive context assembly and generation.
Go one level deeper
The technical explanation
Retrieval is commonly split into a fast high-recall stage and a slower high-precision stage. Retrieve more candidates than you will send to the model, score the query-document pairs with a cross-encoder or provider reranker, then apply metadata and context limits. Measure recall before reranking, ranking quality after reranking, p95 latency, and whether the improvement changes final answers.
Say this in the interview
A reranker examines the query and each retrieved candidate together, often with a more expensive relevance model, and produces a better ordering than the initial fast retriever. Retrieve a wider candidate set, rerank it, keep a small context set, and measure whether quality justifies the extra cost and latency.
Keep preparing