📁 Sangam Dhakal - Portfolio v2.0 - Netscape Navigator 4.0
_
□
×

📚 Interview question

When would you use hybrid search with a reranker instead of pure vector search, and how does reciprocal rank fusion combine the results?

Intermediate Theory Intermediate ai azure-ai-search hybrid-search rag reranking vector-search

🎯 Key points

  • Vectors miss exact tokens (codes, IDs); keywords miss paraphrase
  • Hybrid fits enterprise search and support / help-desk queries
  • RRF: score = sum of 1/(k + rank), k around 60
  • Rank-based fusion avoids normalising incompatible BM25 and cosine scores
  • Cross-encoder reads query and document together; more accurate, slower
  • Rerank only the top ~50 candidates to bound latency and cost
  • Measure with recall@k and MRR before and after

⏱ 30-second answer

Each method fails differently. Pure vector search misses exact tokens (product codes, IDs, names, error messages) and jargon the embedding model handles poorly. Pure keyword (BM25) misses paraphrases, which are common in support and help-desk questions. Hybrid runs both in parallel and merges them with reciprocal rank fusion: each document scores Σ 1/(k + rank) across the lists (k is often 60). Because RRF uses ranks, not raw scores, you don't have to normalise BM25 and cosine scores that sit on incompatible scales, and documents ranked well by both rise.

A reranker (a cross-encoder, such as Azure AI Search's semantic ranker) then reads the query and each candidate document together in one model pass and reorders them. That is far more accurate but adds roughly 100–300 ms and cost per query, so apply it only to the top ~50 candidates. Prove the gain with recall@k and MRR before and after.

🔍 What the interviewer is checking

Checks depth on retrieval beyond basic embeddings.

Green flags

  • Gives a concrete failure case for vector-only and keyword-only search
  • Writes the RRF formula and explains why ranks avoid score normalisation
  • Bounds the reranker to the top N and measures the gain

Red flags

  • Thinks vector search always beats keyword search
  • Averages raw BM25 and cosine scores directly

↩ Usually asked after

More in .NET and AI

Last updated 23 Nov 2026.

🌐 Sangam's Webring

⏪ Previous 🏠 Main Next ⏩
💬 Chat with me