Skip to main content
Intermediatecomparison Verified ~9 min

What is reranking in RAG, and why use a cross-encoder instead of only a bi-encoder?

Source: Anthropic: Building effective agents

Quick answerFree

Reranking re-scores the top N retrieved chunks (often 50 to 150) with a slower, more accurate model before the best few go into the prompt. A cross-encoder reads the query and document together, so it judges relevance better than a bi-encoder, which embeds them separately, but it is too slow to run on the whole corpus.

Detailed answer· ~430 words

Interview Prep

Unlock the full answer with Interview Prep

Get a ~430-word model answer, 5 key points, a visual explainer, 4 common mistakes and 5 follow-ups, plus 24 more Generative AI questions.

Also in Pro (₹499 / 90 days).

Key points· 5 points

Interview Prep
Unlock with Interview Prep

Visual explainer· animated, step by step

Interview Prep
Unlock with Interview Prep

Common mistakes· 4

Interview Prep
Locked

Best practices· 4

Interview Prep
Locked

Likely follow-ups· 5 questions

Interview Prep
Unlock with Interview Prep

+ 24 more Generative AI questions in Interview Prep, each with the full answer.

Discussion