Generation metrics (Ragas)

Lesson 2.2 · 3 min read · by Vinay C

We'll cover the following

Three families: retrieval metrics, ranking metrics, and generation metrics. Generation ones are mostly LLM-as-judge.

MetricWhat it checks
FaithfulnessIs every claim in the answer backed by the retrieved context? Catches hallucination.
Answer relevancyDoes the answer address the question that was asked?
Answer correctnessDoes it match a reference answer? Needs ground truth.
Context precision / recallRagas scores retrieval too, using an LLM instead of labels.
CompletenessDoes it cover every part of the question?
Helpfulness, coherence, toneSubjective; custom rubrics judged by an LLM.
SafetyToxicity, PII leakage.

Read the two together

Recall@kFaithfulnessFix
LowanyRetrieval: chunking, hybrid search, reranker
HighLowGeneration: the prompt, context order, or model is ignoring or adding to the context
Check yourselfRecall@5 is 90% but faithfulness is 60%. Where is the problem?

Generation. The right context is being retrieved, but the model adds claims that the context does not support. Tighten the prompt, shorten and order the context, or change the model.

Summary: say it in the interview

  • "Low recall means fix retrieval. High recall with low faithfulness means the problem is the prompt or the model."