# Faithfulness and Answer Relevance in RAG?

> How RAG answers are scored for faithfulness and answer relevance, what each one misses, and how to explain both for your AI interview.

**In short:** Faithfulness checks that every claim in a RAG answer is supported by the retrieved text. Answer relevance checks that the answer addresses the question asked. Teams can score both with a judge model, then check that judge against people.

AI and LLM interview question Q132, Retrieval-augmented generation (RAG). Intermediate, very common (our estimate). From Venkat R. Murty's free Interview Kit: https://designervenkat.online/interview/ai/rag-generation-metrics-faithfulness-answer-relevance

## Say it in 30 seconds

RAG means the app searches documents first, then the model answers from what it found. I measure two things. Faithfulness asks whether every claim in the answer is supported by the retrieved text. Answer relevance asks whether the answer addresses what the user asked. A judge model can score both, and I check the judge against people before I trust the numbers.

## Say it in 2 minutes

Retrieval-augmented generation, or RAG, has two steps. First the app searches your documents and picks the passages that look useful. Then a language model writes the answer using those passages. Each step can fail, so testing the final answer needs two separate questions.

The first question is faithfulness. Is every claim in the answer supported by the passages we gave the model? The second is answer relevance. Does the answer address what the user asked? An answer can pass one and fail the other, so I score both. A fee bot can quote a correct fee for the wrong card, which is a relevance failure. A bot that invents a waiver fails faithfulness, even when its reply sounds helpful.

Scoring needs a judge. Usually that is a second language model, as in the RAGAS framework, which splits the answer into statements and checks each one against the context. A judge scores answers without a person reading each one, but it can be wrong. So I sample answers, have people grade them, and compare the two. If they disagree a lot, I fix the judge before I trust any score.

In the interview I say two things: what each score means, and what it misses. Faithfulness says nothing about whether the retrieved passages were the right ones, and relevance says nothing about whether the answer is true. That is why I track retrieval quality too.

## What are faithfulness and answer relevance, in plain words?

A RAG app searches your documents first, then asks a language model to write the answer from the passages it found. Both steps can go wrong. This page is about the last one: the written answer.

Picture a new hire at a mid-size bank who answers calls from the policy binder on the desk. A good hire says only what the binder says. That is faithfulness. A good hire also answers the caller's actual question. That is answer relevance.

In a RAG app for a bank's card support, the retrieved passages are the binder, and the model's written reply is what the customer hears.

- **RAG:** Retrieval-augmented generation: search your documents first, then answer from what was found.
- **Context:** The passages the search returned and gave the model to read.
- **Faithfulness:** Every claim in the answer can be backed by the context.
- **Answer relevance:** The answer addresses what the user actually asked.
- **LLM judge:** A second language model that grades an answer against a rule.

RAGAS, a framework from a 2023 paper, defines both scores so they can run without ground truth human annotations. The authors call it a framework for reference-free evaluation of RAG pipelines.

## How is faithfulness measured?

Faithfulness is judged against the context only. An answer can be true in the real world and still score low if the passages do not back it up. RAGAS calls an answer faithful when the claims it makes can be inferred from the context.

1. **Split the answer into statements:** A model breaks the answer into short statements, so each one can be checked alone.
2. **Check each statement against the context:** A judge marks each statement as supported or not supported by the retrieved passages.
3. **Divide:** The score is the supported statements divided by all the statements.

Here is a worked example with made-up numbers. A customer asks about the Platinum card. The policy passage says the annual fee of $95 is waived in the first year. The bot's answer makes three claims. The fee is waived in year one: the policy backs it. After that it costs $95 a year: the policy backs that too. You get a waiver with $10,000 spent in a year: the policy says nothing like that, so the claim is not supported.

Two of three claims are backed, so the score is 0.67. The invented waiver rule is exactly the failure faithfulness exists to catch. Here is the same sum in plain Python, with the judge's verdicts typed in by hand:

```python
# A made-up judge's verdicts on one fee answer. A real judge is a language model; the counting is the same.
CLAIMS = [
    ("The annual fee is waived in the first year.", True),
    ("After that, the fee is $95 a year.", True),
    ("A waiver is granted if you spend $10,000 in a year.", False),
]

def faithfulness(claims):
    supported = sum(1 for _, ok in claims if ok)
    return supported / len(claims)

for text, ok in CLAIMS:
    print(("supported:     " if ok else "not in policy: ") + text)
print("faithfulness =", round(faithfulness(CLAIMS), 2))
```

Output:

```text
supported:     The annual fee is waived in the first year.
supported:     After that, the fee is $95 a year.
not in policy: A waiver is granted if you spend $10,000 in a year.
faithfulness = 0.67
```

## How is answer relevance measured?

Answer relevance asks whether the answer addresses the question. RAGAS does this by asking a model to write questions based on the answer, then compares those questions with the user's real question. The comparison uses embeddings, which are lists of numbers that stand for meaning. The closer they are, the more relevant the answer.

The RAGAS paper says the check does not look at factuality, but it does penalise answers that are incomplete or contain redundant information. So an answer can be relevant and still wrong, which is why relevance and faithfulness are scored apart.

Worked example. A customer asks whether the Platinum fee can be waived after year one. The bot answers how to open a Platinum account. The text is fluent and faithful to the policy about accounts, yet its implied questions are about opening, not waivers, so the relevance score is low.

> **Tip:** Definitions differ between vendors. Microsoft's relevance check also measures accuracy, while RAGAS leaves factuality out. Name the definition you use before you compare two scores.

## Why measure both, and what do they miss?

- **Faithful, not relevant: Accurate but off topic.** Every claim is backed, but the answer describes the wrong product. Relevance catches it.
- **Relevant, not faithful: On topic but invented.** The answer addresses the question, then makes up a waiver rule. Faithfulness catches it.
- **Both pass: Still check retrieval.** A faithful, relevant answer built on the wrong passage is still wrong. Test retrieval on its own.

*Diagram, Two checks on one answer: One answer, two checks. Faithfulness compares the answer's claims with the retrieved policy. Relevance compares the answer with the customer's question. The two scores are reported together, so a fluent but wrong answer cannot hide behind one good number.*
1. The bot writes its answer from the retrieved policy passages.
2. Each claim in the answer is pulled out and tested against the policy.
3. The customer's question is checked against what the answer covers.
4. The answer is also set beside the question, to see how closely it fits.
5. The share of claims the policy backs becomes the faithfulness score.
6. How closely the answer fits the question becomes the relevance score.

> "Groundedness focuses on the precision aspect of the response. It doesn't contain content outside of the grounding context." (Microsoft, RAG evaluators)
>
> "does not take into account factuality, but penalises cases where the answer is incomplete or where it contains redundant information" (RAGAS paper)
>
> "Combine metrics with human judgment to ensure you're answering the right questions" (OpenAI, evaluation guide)

Human judgement is the last check. OpenAI's evaluation guide warns against leaning on generic academic scores alone, and says to calibrate automated scoring with human feedback. So I grade a sample by hand and compare my grades with the judge's.

I report both scores for each question type, because one average can hide a weak topic. A bot can be strong on account questions and weak on fees, and only the split shows it.

## What does the interviewer want to hear?

**A strong answer covers**

- [ ] A plain definition of each: faithfulness is support from the context, relevance is addressing the question.
- [ ] How faithfulness is scored: supported statements divided by all the statements.
- [ ] Why the two can disagree, with a fluent but invented example.
- [ ] That the judge is itself checked against people.
- [ ] That retrieval is tested separately, so a bad search is not blamed on the model.
- [ ] Honest limits: scores depend on the judge and the definition used.

**Common traps**

- Trap: "Faithfulness means the answer is true." Better: It means every claim is backed by the retrieved context. A true claim the passages don't back still counts as unsupported.
- Trap: "BLEU will tell us the answer is good." Better: OpenAI's evaluation guide lists relying solely on academic metrics like BLEU as an anti-pattern. A RAG answer can read well and still invent a rule.
- Trap: "A high faithfulness score means the system works." Better: It only means the answer sticks to the context. Check relevance and retrieval too.

## Can you spot the weak score?

**Spot the weak score:** Before Monday's review, which result should you look at first?

A. Faithfulness 0.94, answer relevance 0.91, judge agreed with people on 92 of 100 sampled answers.
B. Faithfulness 0.58, answer relevance 0.93, the fee bot quotes waiver rules that are not in the policy.
C. Latency 1.2 seconds, cost per answer steady, no failed calls this week.
D. Faithfulness 0.91, answer relevance 0.89, same 100 sampled answers scored each week.

**Answer:** B. A faithfulness of 0.58 means many claims are not backed by the policy, and a made-up waiver rule is a serious error for a bank. Fix the retrieval or the prompt before the next release.

**Quick check:** The bot quotes the right fee, but for the wrong card. Which score should drop?

A. Faithfulness, because the fee figure is wrong for this card
B. Both scores, because any fee answer fails both checks
C. Answer relevance, because the answer is about the wrong card
D. Neither, because the fee number matches a policy passage

**Answer:** C. The fee does come from a passage, so the claim is faithful. The answer does not address the card the customer asked about, so relevance drops.

## Can you answer these from memory?

**Flash cards**

- **What is faithfulness?** Every claim in the answer can be backed by the retrieved context.
- **What is answer relevance?** Whether the answer addresses the question the user actually asked.
- **Does faithfulness check truth?** No. It checks support. A true claim the passages don't back is unsupported.
- **How does RAGAS score faithfulness?** Supported statements divided by the total number of statements in the answer.
- **Does RAGAS relevance check accuracy?** No, it leaves factuality out. Microsoft's relevance check also measures accuracy.
- **How do you trust the judge?** Grade a sample by hand and check the judge's scores against your grades.

## Likely follow-up questions

- Q131 Retrieval metrics: recall@k, MRR, nDCG? https://designervenkat.online/interview/ai/retrieval-metrics-recall-at-k-mrr-ndcg
- Q133 What are common RAG failure modes? https://designervenkat.online/interview/ai/common-rag-failure-modes
- Q134 How do you reduce hallucinations in RAG? https://designervenkat.online/interview/ai/how-to-reduce-hallucinations-in-rag
- Q135 How do you add citations? https://designervenkat.online/interview/ai/how-do-you-add-citations
- Q138 RAG vs long context: which to use? https://designervenkat.online/interview/ai/rag-vs-long-context

## Learn it in depth

- [Evaluation Metrics](https://designervenkat.online/learn/ai-engineering/evaluation-metrics)
- [A model as the judge](https://designervenkat.online/learn/ai-engineering/model-based-evals)
- [People as the judges](https://designervenkat.online/learn/ai-engineering/human-evals)
