LearnQuestion bank

How would you evaluate a retrieval-augmented assistant end to end, and how would you tell whether a bad answer came from retrieval or from generation?

Applied LLMTechnicalMedium

Theme reported publicly: Cohere, Spotify

Answer it yourself first, out loud or on paper, then compare.

Answer

Model answer, written in a candidate's voice

In short

  • Build a labelled eval set from real queries with reference answers, gold supporting documents, and unanswerable questions
  • Score retrieval with recall@k/hit rate, MRR, and nDCG against gold documents
  • Score generation with faithfulness, correctness, relevance, citation accuracy, and abstention using human labels plus validated LLM judges
  • Attribute failures by checking whether gold documents were retrieved; use oracle-context ablation to confirm
  • Monitor online feedback, escalations, and sampled human review segmented by query type

In full

I would evaluate it end to end, not just by final answer accuracy: start with a labelled set built from real production queries, each with a reference answer, gold supporting documents, and a deliberate set of unanswerable questions so abstention can be measured. For retrieval I would report recall@k/hit rate, MRR, and nDCG against those gold documents, segmented by query type and difficulty. For generation I would score faithfulness to the retrieved context, correctness against the reference, relevance, citation accuracy, and correct abstention, using human labels as the anchor and LLM judges only after validating them against human labels. To tell retrieval and generation failures apart, I would check whether the gold document was in the retrieved set: if it is missing, that is a retrieval failure; if it is present but the answer is wrong, that is a generation/context-use failure, and I would confirm with an oracle-context ablation by giving the model the gold context and seeing whether the answer becomes correct. I would also track online signals—user feedback, escalations, and sampled human review—segmented by query type, because a system can look good on average while failing on high-risk or ambiguous queries. The key is to keep the two failure modes separate so fixes go to the retriever, the prompt/context-use, or the abstention policy rather than to a single end-to-end score.

Corrected by an independent AI reviewer.

What a strong answer covers

  • Labelled set built from real queries with reference answers and gold supporting documents, including unanswerable questions
  • Retrieval metrics: recall@k / hit rate, MRR, nDCG against gold documents
  • Generation metrics: faithfulness to retrieved context, correctness vs reference, relevance, citation accuracy, correct abstention — human labels plus validated LLM judges
  • Attribution: gold document missing → retrieval failure; present but answer wrong → generation/context-use failure; oracle-context ablation confirms
  • Online signals: feedback, escalations, sampled human review, segmented by query type

Common mistakes

  • One blended score
  • trusting an LLM judge without checking agreement with humans