Questions
14 of 14
1What does HNSW stand for, and at a high level, how does it achieve sub-linear approximate nearest-neighbor search?
2What do the HNSW parameters m and ef_construct control, and what trade-off do they represent?
3What does the query-time parameter ef (search breadth) control, and how would you use it to trade off recall against latency?
4Why might increasing m significantly improve recall on one dataset but barely help - or even hurt latency - on another?
5Why does Qdrant set m: 0 on a named vector used purely for reranking (e.g. a ColBERT multivector)?
6What problem does vector quantization solve, and what is the fundamental trade-off it introduces?
7Compare scalar quantization, product quantization, and binary quantization in Qdrant in terms of compression ratio and accuracy impact.
8What are oversampling and rescoring in the context of binary quantization, and why are they necessary?
9What newer quantization options - beyond the original scalar, product, and binary trio - has Qdrant introduced to fine-tune the compression/accuracy curve?
10What is Inline Storage, and how does embedding quantized vectors directly into HNSW graph nodes improve disk-based search performance?
11What is a multivector point, and how does it differ from a point with several named vectors?
12How does late-interaction scoring (as used by ColBERT-style models) with MaxSim differ from comparing two single dense vectors?
13Why is late-interaction reranking typically applied to a small candidate set rather than the entire collection?
14Design a three-stage retrieval pipeline using dense retrieval, sparse retrieval, fusion, and ColBERT reranking. What does each stage contribute?
14 / 14

Design a three-stage retrieval pipeline using dense retrieval, sparse retrieval, fusion, and ColBERT reranking. What does each stage contribute?

Dense + sparse prefetch, fusion, then late-interaction rerank

The three stages are: (1) parallel first-stage retrieval with dense and sparse retrievers, (2) fusion of the two candidate lists into a single ranked list, and (3) late-interaction reranking of the fused candidates. Each stage has a distinct job. The dense retriever captures semantic similarity - it retrieves documents that mean the same thing as the query even when they share no words, which is what you want for paraphrases and conceptual matches. The sparse retriever (typically BM25 or a learned sparse model like SPLADE) captures lexical overlap - it retrieves documents that contain the query terms, which is what you want for exact matches, rare terms, proper nouns, and code identifiers. Neither alone is sufficient: dense retrieval misses exact term matches, sparse retrieval misses semantic paraphrases. Fusion combines the two ranked lists into one, typically with Reciprocal Rank Fusion (RRF), which is robust to score-scale differences between the two retrievers. The fused list is then reranked by a late-interaction model, which applies token-level matching to reorder the candidates. The reranker is the precision stage; the retrievers are the recall stages.

The mechanism of each stage determines what it can and cannot fix. Dense retrieval with HNSW gives sub-linear search over millions of documents, but its recall is bounded by the embedding model's ability to represent the query and by the ANN approximation. Sparse retrieval with an inverted index is exact at the term level, but its recall is bounded by vocabulary mismatch - if the user's query uses different words than the document, it will miss. Fusion mitigates both: RRF gives a document credit for appearing high in either list, so a document that is semantically relevant but lexically different (only in the dense list) and a document that is lexically identical but semantically different (only in the sparse list) both make it into the fused candidate set. The reranker then applies a much more expensive model to order the candidates correctly. Critically, the reranker cannot recover documents that neither retriever surfaced - the fused recall is the ceiling on end-to-end recall. This is why the candidate set sizes for the two retrievers and the fusion limit are the most important tuning parameters in the pipeline.

  1. 1

    Dense stage: semantic recall. Contributes paraphrases, conceptual matches, cross-lingual similarity.

  2. 2

    Sparse stage: lexical recall. Contributes exact matches, rare terms, proper nouns, code identifiers.

  3. 3

    Fusion stage: robustness to score-scale differences between the two retrievers. RRF is the safe default; DBSF is an alternative when score distributions are comparable.

  4. 4

    Rerank stage: precision. Token-level MaxSim reorders the fused candidates; the ceiling on its quality is the fused recall.

The trade-offs are latency budget allocation and candidate set sizing. Each stage adds latency, and the reranker is the most expensive per candidate, so the pipeline has to be tuned as a whole: the dense and sparse prefetch limits determine the fused candidate set size, which determines the reranker cost. A common configuration is 100 dense + 100 sparse, fused to 50, reranked to 10. But the right numbers depend on the corpus and the query distribution. The common mistake is to over-invest in one stage - usually the reranker - while under-investing in the retrievers, and then wonder why recall plateaus. If the fused recall is 0.85, no reranker can push end-to-end recall above 0.85. The second common mistake is using a naive score-normalization fusion (e.g. adding cosine similarity to BM25 score) without accounting for the fact that the two scores live on different scales; RRF avoids this by using ranks instead of scores. The third mistake is assuming that sparse retrieval is obsolete because dense retrieval is better on benchmarks. On real production queries with rare terms, product names, or error codes, sparse retrieval is often the difference between finding the answer and not. Version note: Qdrant's prefetch and fusion API supports RRF and DBSF, and the exact nesting semantics have evolved across releases - verify the shape of the query for your version.

javascript

Version-dependent: the nested prefetch with FusionQuery and the multivector rerank field is part of the qdrant-client 1.10+ API. On older versions, multi-stage retrieval had to be orchestrated in the application layer with multiple round trips. The in-engine version has lower latency and avoids serializing intermediate results, but the API shape is version-specific. Also note that sparse vector support and the exact fusion options (RRF vs DBSF) have evolved; check the release notes for your version before designing around a specific fusion mode.

Difficulty: 9/10
Topics: Hybrid Retrieval, Fusion, Reranking, Late Interaction

Scenario Questions

0-2 years experience
  1. 1

    You have a working dense-only pipeline and want to add sparse retrieval. Explain what new queries would benefit and why you cannot just replace dense with sparse.

  2. 2

    A teammate wants to skip fusion and just concatenate the dense and sparse results. Explain why that is not the same as RRF.

2-5 years experience
  1. 1

    Your three-stage pipeline has a 40ms p99 and the budget is 25ms. Walk through how you would find and cut the biggest contributor without dropping recall below target.

  2. 2

    You add ColBERT reranking to a hybrid pipeline and end-to-end recall improves by only 1 point. Diagnose whether the bottleneck is the retrievers, the fusion, or the reranker.

5-8 years experience
  1. 1

    Design a hybrid retrieval pipeline for a code search system where queries can be natural language, code snippets, or a mix. Specify the retrievers, the fusion, the reranker, and the schema.

  2. 2

    Your pipeline serves 500 QPS with a 30ms p99 over a 50M-document corpus. Walk through your capacity planning: how many candidates per stage, what hardware, and where the bottlenecks are.

8+ years experience
  1. 1

    Design a self-tuning hybrid pipeline that adjusts prefetch limits, fusion weights, and reranker depth based on observed recall against sampled ground truth. How would you prevent oscillation and ensure the pipeline converges to a good operating point?

  2. 2

    You must migrate a two-stage dense + rerank pipeline to a three-stage dense + sparse + rerank pipeline with zero downtime and no recall regression. Describe the migration, the shadow evaluation, and the rollback plan.

Follow-up Questions

  • How would you decide between RRF and DBSF for the fusion stage, and what would you measure to pick one?
  • If the dense and sparse retrievers disagree strongly on a query, what does that tell you about the query and how would you adapt the pipeline?