Day 81 of 133

Reranking: cross-encoders, Cohere/BGE rerank, MMR

Bi-encoder retrieve + cross-encoder rerank — the two-stage pattern.

DSA · NeetCode 2-D DP

  • Interview questions to prep

    1. State the 2-D DP: indices, recurrence, base case. What's the order of fill?
    2. Can you reduce 2-D to 1-D by reusing rows or columns? Walk through the dependency direction.
    3. Top-down with memoization vs bottom-up — which is easier to reason about, and which is faster in practice?

GenAI · Reranking

  • Interview questions to prep

    1. Why is a cross-encoder more accurate than a bi-encoder, and why can't we use it for retrieval?
    2. What's the latency cost of cross-encoder reranking, and how do you keep it under your budget?
  • Interview questions to prep

    1. When does adding a reranker actually move the needle?
    2. Compare hosted (Cohere) vs self-hosted (BGE / monoT5) rerankers — when would you pick each?
  • MMR & diversity rerankingGenerative AILlamaIndex

    Interview questions to prep

    1. What is MMR, and why does diversity matter in retrieved context?
    2. How would you tune the MMR diversity λ — what does the user actually feel as it changes?

References & further reading