AI Engineering
/
Embeddings & Retrieval
/

Design hybrid retrieval within a latency budget

Embeddings & Retrieval · 3 to 4 hours

Design hybrid retrieval within a latency budget

Design hybrid retrieval with reranking for a multi-tenant help center, choose a configuration from measured quality and latency gates, and keep access rules intact through timeouts and model migrations.

Hard
System Design

4 h

Premium

Overview

Design and tune hybrid retrieval and reranking under quality, latency, access, and freshness constraints. A strong interview answer explains how candidates enter and leave the pipeline, how quality is measured at each stage, and what happens when a component times out. Detailed ingestion and answer-generation design belong to RAG & Data Pipelines.

Study time: 3 to 4 hours

Interview format: System design discussion with measured gates

By the end you can

  • Separate the three sizes in a retrieval pipeline and explain where a relevant item can be lost
  • Compute reciprocal rank fusion and nDCG, and say what each does not measure
  • Distinguish approximate-index recall from task relevance recall, and tune each with the right experiment
  • Select a configuration from measured gates and name the evidence still missing
  • Keep access rules intact under timeouts, caches, and post-filtering
  • Plan an embedding migration that switches query encoding and the index together

Prerequisites

Helpful background: Familiarity with percentiles, evaluation datasets, and service design helps.

This topic finds and ranks candidates. RAG & Data Pipelines covers ingestion, grounding, citations, and the document lifecycle.

In this guide

  1. Frame the retrieval problem
  2. Candidate generation, fusion, and reranking
  3. Fusion parameters and candidate coverage
  4. Approximate search and representation quality
  5. Reranker constraints
  6. Latency budget and deadlines
  7. Access filters, caches, and freshness
  8. Evaluation design
  9. Worked selection scenario
  10. Check each configuration against the gates
  11. Model and index migration

Hard questions are part of Premium: the study guide, reference answer, rubric, and exercises unlock with Premium.

Practice the interview question

Answer it in your own words before you look at the reference answer.