179 questions
No questions match those filters.
What is a reranker, and when do you add one to a RAG pipeline?
This is one of the questions in the full AI/ML interview bank. Pro unlocks all 1789 questions; Premium includes the same bank plus the highest daily Practice limit.
See plansVector similarity is fast but approximate, and it measures a different thing than relevance: it tells you how close two pieces of text are in embedding space, not whether one actually answers the other. A reranker closes that gap with a cross-encoder — a model that reads the query and a candidate chunk together and produces a relevance score, rather than comparing two independently computed embeddings.
The standard design is two-stage: use fast ANN search to pull a generous candidate pool (often 20), then spend the more expensive cross-encoder pass narrowing that down to the handful of chunks that actually go to the LLM. This buys most of the quality benefit of exhaustive search without its latency cost.
The failure mode to watch for is over-applying it — reranking a hundred-plus candidates turns a cheap precision boost into a latency problem, since cross-encoder scoring doesn’t parallelize the way ANN search does.