How do you evaluate the generation stage of a RAG pipeline, separately from retrieval?medium
Even with perfect retrieval, generation can still fail. Evaluate answer relevance (does it address the question), faithfulness/groundedness (does it stay supported by the retrieved context), citation accuracy (do citations actually back the claim), completeness, and hallucination rate.
Answer relevance checks whether the answer actually addresses what was asked — given "what is the refund timeline," a restated general policy is a worse answer than a specific "7-10 business days" even if both are grounded. Faithfulness/groundedness checks whether the answer stays inside what the retrieved context supports — if the context says refunds take 7 business days and the model says 24 hours, that's unfaithful regardless of how confident it sounds. Citation accuracy is a subtler failure: the answer can be correct while the citation points at the wrong document, which is still a RAG quality issue because it breaks the user's ability to verify the claim. Completeness and hallucination rate round this out — a technically-faithful answer that omits key retrieved information is incomplete, and hallucination rate tracks how often the model asserts something no retrieved chunk supports. The point of separating this from retrieval evaluation is diagnostic: if retrieval scores well but generation scores poorly, the fix is prompting or the generation model, not the retriever.