All Questions
Rag And Retrieval medium

Your retrieval stage has an 800 ms p95 budget. The team reranks the top 1,000 first-stage candidates with a cross-encoder, which adds about 2 seconds. How do you meet the budget while keeping most of the quality gain?

  1. A Drop the reranker entirely and pass the top 1,000 first-stage candidates straight into the generator's context.
  2. B Rerank only the top 50-100 first-stage candidates, since cross-encoder cost scales linearly with candidate count.
  3. C Replace the cross-encoder with a second bi-encoder pass, since rescoring with cached vectors gives the same quality.
  4. D Precompute cross-encoder scores for every chunk at ingestion time so that query-time reranking becomes a lookup.

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions