Candidate depth
candidateDepth · Retrieval depth
How many candidates each retriever hands to fusion and reranking, as opposed to how many results you finally return.
In DocSlurpGlossary entry
On this page
Candidate depth is how many candidates each retriever contributes before fusion and reranking, separate from how many results you return. A typical pipeline might pull 100 candidates from keyword search and 100 from vector search, fuse them, let a reranker reorder the pool and return the top 8. The 100 is the depth; the 8 is top-k.
Depth matters because every later stage can only reorder what it receives. If the passage with the answer sits at vector rank 140 and the depth is 100, no reranker will ever see it. The classic BERT reranking work reranked the top 1,000 BM25 candidates to return a top 10 for exactly this reason: cheap retrieval casts a wide net, and expensive reading picks from it.
The gotcha: deeper is not free
A deeper pool means more passages for the reranker to score, so reranking latency and cost grow roughly linearly with depth, and a weak reranker has more distractors to get wrong. Measure recall@k at the candidate stage: if answers are missing from the pool, raise depth; if they are in the pool but ranked low, the reranker is the problem.
In DocSlurp, candidateDepth takes 1 to 200 and bounds each retrieval branch and the fused window before the relevance floor. When it is omitted, searches with reranking pull 200 candidates per branch, and searches without it pull as many as the result limit. A depth smaller than limit returns fewer results; nothing refills the window.
In DocSlurp
In DocSlurp
candidateDepth (1 to 200) bounds each retrieval branch and the fused window before the relevance floor. When it is omitted, searches with reranking acquire 200 candidates and others acquire limit (core/server/src/search/retrieval-controls.ts). See retrieval controls.