yoklainterview sim

AI Engineer Rag Evaluation Interview Questions

75 verified AI Engineer Rag Evaluation interview questions — solve with answers, learn from explanations, test yourself in a real simulation.

Try the real simulation →

Sample questions

Rag EvaluationDifficulty 1
In RAG retrieval evaluation, what does recall@k measure?
  • aFraction of the top-k retrieved chunks that are relevant
  • bFraction of relevant chunks appearing in the top-k results
  • cWhether the single highest-ranked chunk is relevant
  • dThe rank position of the first relevant chunk
Explanation:Recall@k = (relevant chunks found in top-k) / (total relevant chunks that exist), so it measures coverage of the full relevant set (b). Fraction of top-k that are relevant is precision@k, not recall@k (a is wrong). Checking only the top-1 chunk describes hit@1, a different metric (c is wrong). The rank of the first relevant chunk is the basis of MRR, not recall@k (d is wrong).
Rag EvaluationDifficulty 1
In RAG retrieval evaluation, what does precision@k measure?
  • aFraction of the k retrieved chunks that are relevant
  • bFraction of all relevant chunks retrieved in the top-k
  • cReciprocal of the rank of the first relevant chunk
  • dWhether any relevant chunk appears in the top-k
Explanation:Precision@k = (relevant chunks among the retrieved k) / k, so it measures how 'clean' the retrieved set is (a). Coverage of all relevant chunks in the top-k describes recall@k, not precision@k (b is wrong). Reciprocal rank of the first relevant chunk is MRR's building block (c is wrong). A binary yes/no on whether any relevant chunk appears describes hit@k (d is wrong).
Rag EvaluationDifficulty 2
A vector search returns this ranked list of chunk IDs for a query:
retrieved = ["d3", "d1", "d7", "d2", "d9"]
relevant = {"d1", "d2", "d5"}  # ground-truth relevant set, size 3

What is recall@2 (using only the top 2 retrieved items)?
  • a0.33
  • b0.67
  • c0.50
  • d1.00
Explanation:Top-2 = ["d3","d1"]. Only d1 is in the relevant set, so hits = 1. recall@2 = hits / |relevant| = 1/3 ≈ 0.33 (a). d2 only appears at rank 4, outside the top 2, so 2/3 overcounts (b is wrong). 0.50 divides by k instead of by the relevant-set size, which is the precision@k formula, not recall (c is wrong). d5 never appears in the retrieved list at all, so recall never reaches 1.00 (d is wrong).
Rag EvaluationDifficulty 2
Using the same setup:
retrieved = ["d3", "d1", "d7", "d2", "d9"]
relevant = {"d1", "d2", "d5"}

What is precision@2?
  • a0.33
  • b0.50
  • c1.00
  • d0.20
Explanation:Top-2 = ["d3","d1"]; 1 of these 2 items is relevant, so precision@2 = 1/2 = 0.50 (b). Dividing by 3 (the relevant-set size) instead of by k=2 gives recall@2, not precision (a is wrong). Precision isn't inherently 1.00 just because a chunk found so far is correct — it's still 1 relevant out of 2 retrieved (c is wrong). Dividing by 5 mixes in items outside the k=2 window being evaluated (d is wrong).
Rag EvaluationDifficulty 2
Same retrieved list and relevant set:
retrieved = ["d3", "d1", "d7", "d2", "d9"]
relevant = {"d1", "d2", "d5"}

What is hit@1 (1 if at least one relevant chunk is in the top 1, else 0)?
  • a1
  • b0.33
  • c0.2
  • d0
Explanation:Top-1 = ["d3"]. d3 is not in {"d1","d2","d5"}, so hit@1 = 0 (d). hit@k is a binary indicator per query, not a fraction, so it can't equal 0.33 (b is wrong). hit@1 only looks at the top-1 item, not the whole ranking, so appearing later doesn't count (c is wrong), and there's no notion of a 'document family' bonus in this metric (a is wrong).
Rag EvaluationDifficulty 1
How does hit@k fundamentally differ from recall@k?
  • ahit@k is always numerically larger than recall@k
  • bhit@k needs a labeled relevant set, recall@k does not
  • chit@k is binary per query; recall@k is a coverage fraction
  • dhit@k is computed after generation; recall@k before retrieval
Explanation:hit@k answers 'was at least one relevant chunk retrieved?' (0 or 1), while recall@k answers 'what fraction of all relevant chunks was retrieved?' — a continuous coverage measure (c). Neither metric is systematically larger than the other; it depends on the data (a is wrong). Both metrics require the same labeled relevant set to compute (b is wrong). Both are retrieval-stage metrics computed from the ranked list alone, before any generation happens (d is wrong).

Test yourself against the 2025-question AI Engineer bank.

Start interview