How do top-k retrieval and relevance thresholds differ?
Understand the idea, explain it in your own words and use the rubric to find your next learning gap.
The idea behind the question
Top-k limits how many results are returned. A threshold can reject weak matches, but similarity scores require calibration for the model, corpus and task.
A query unrelated to every indexed policy still has a nearest vector.
A practical way to learn it
Ask the RAG lab an unrelated question and observe why a nearest match is insufficient evidence.
Open RAG playgroundThe related tool opens separately; your interview answer stays here. Written practice is self-guided, without automatic code grading.
Build an explanation you understand
- State what the concept does in plain language.
- Apply it to the example and make your assumptions explicit.
- Explain a trade-off, failure case and how you would test it.
- Distinguish your actual experience from a proposed approach.
How would you explain it?
Single-question timers reset on refresh. Full mock sessions can resume from this browser.
Strengthen your explanation
Compare reasoning, not identical wording. Reference answers describe a possible approach; replace hypothetical statements with truthful details from your own work.
One way to answer
I would retrieve candidates with a bounded top-k and evaluate which passages contain useful evidence. I would distinguish candidate recall from the quality of the final context. A threshold can support abstention, but I would tune it on held-out answerable and unanswerable questions instead of treating a similarity score as confidence. Metadata filters and a reranker can improve relevance. I would also measure whether increasing k adds useful evidence or only noise, latency and token cost.
What a strong explanation should cover
Tick only the points your own answer addresses. This is self-assessment, not AI scoring.
0 / 3 points self-reportedWatch out for
- Calling cosine similarity a calibrated correctness probability.
Now go one level deeper
- What if useful evidence ranks just below k?
- How would a reranker change the pipeline?
Further reading
Further-reading links support learning; the reference is Sukoaa-authored, not an official employer answer key.