RAG & Retrieval·Question 44 of 100Advanced

How do you evaluate the generation side of RAG - faithfulness, relevance, and citation quality?

Type it the way you would explain it to an interviewer. A few sentences is enough; you can't break anything.

Model answer: the part to lead with

Retrieval metrics stop at "the right chunks were in the prompt"; generation evaluation asks what the model did with them. The core measures, RAGAS-style:

Faithfulness/groundedness - is every claim in the answer supported by the retrieved context? Measured by decomposing the answer into atomic claims (an LLM does this) and checking each against the provided chunks via an entailment judgment (NLI model or LLM-as-judge). This is the metric for hallucination-in-spite-of-context, and it's the one enterprises care most about. Crucially, it's judged against the retrieved context, not world truth - an answer can be faithful to wrong chunks.

Full worked answer

Retrieval metrics stop at "the right chunks were in the prompt"; generation evaluation asks what the model did with them. The core measures, RAGAS-style:

Faithfulness/groundedness - is every claim in the answer supported by the retrieved context? Measured by decomposing the answer into atomic claims (an LLM does this) and checking each against the provided chunks via an entailment judgment (NLI model or LLM-as-judge). This is the metric for hallucination-in-spite-of-context, and it's the one enterprises care most about. Crucially, it's judged against the retrieved context, not world truth - an answer can be faithful to wrong chunks.

Answer relevance - does the answer actually address the question (not a fluent tangent)? Judged directly by an LLM, or via the reverse-generation trick: generate questions the answer would answer, compare their embeddings to the real question.

Citation quality - citation precision (does each cited chunk support the claim it's attached to?) and citation recall (what fraction of claims carry citations?). Mechanical checks catch fabricated IDs for free; entailment checks catch mis-attribution.

Also worth tracking: answer completeness vs the gold answer when you have reference answers, and appropriate refusal - a metric candidates forget: on questions whose answer is not in the corpus, does the system say "I don't know" instead of confabulating? Seed the eval set with such questions deliberately.

Since most of these use LLM-as-judge, say how you keep the judge honest: a strong model distinct from the generator, rubric-based prompts with few-shot anchors, periodic human calibration on a sample (measure judge-human agreement, e.g., Cohen's kappa), and watch for judge biases (verbosity preference, self-preference). Keep the judge version pinned so metric drift means the system changed, not the judge.

Operationally: this suite is slower and costlier than retrieval metrics, so run retrieval metrics on every commit and generation evals nightly/on-release over a few hundred queries, plus continuous sampled scoring of production traffic for drift detection.

What a good answer covers

  • Retrieval metrics stop at "the right chunks were in the prompt"; generation evaluation asks what the…
  • Faithfulness/groundedness - is every claim in the answer supported by the retrieved context?
  • Measured by decomposing the answer into atomic claims (an LLM does this) and checking each against the…
  • This is the metric for hallucination-in-spite-of-context, and it's the one enterprises care most about
  • Crucially, it's judged against the retrieved context, not world truth - an answer can be faithful to…

Key terms: Faithfulness/groundedness · Answer relevance · Citation quality · answer completeness · appropriate refusal · LLM-as-judge

Interviewer follow-ups to expect

  1. Faithfulness is high but users say answers are wrong - what's happening?

  2. How do you validate your LLM judge against humans, and what agreement is good enough?

  3. Design the eval for appropriate refusals without contaminating the corpus.

Worked answer from AI-Engineer-Interview-Questions by Om (MIT), reformatted for LLM Prep · answer text last updated 6 November 2026 · scoring and review schedule by LLM Prep