1
What is faithfulness vs relevance?
A useful answer can still be unsupported, and a supported answer can still miss the question.
Must-know
Interview question
What is faithfulness vs relevance?

Faithfulness and relevance are related, but they are not the same.

Relevance

Relevance means the answer is useful for the user’s question.

Example:

User: What is the refund period? Relevant answer: The refund period is 7 days. Irrelevant answer: Our company offers many customer support services.

A relevant answer addresses the question.

Faithfulness

Faithfulness means the answer is supported by the provided context or source.

Example source:

Refunds are available within 7 days of purchase.

Faithful answer:

Refunds are available within 7 days of purchase.

Unfaithful answer:

Refunds are available within 30 days of purchase.

The unfaithful answer may still sound relevant because it talks about refunds, but it is not supported by the source.

Four Possible Cases
Case 1: Relevant and faithful:

Best case.

Question: What is the refund period? Context: Refunds are available within 7 days. Answer: Refunds are available within 7 days.

This is both relevant and faithful.

Case 2: Relevant but unfaithful:

Dangerous case.

Question: What is the refund period? Context: Refunds are available within 7 days. Answer: Refunds are available within 30 days.

The answer addresses the question but gives unsupported information.

This is a hallucination or grounding failure.

Case 3: Faithful but not relevant:

The answer is supported by the document but does not answer the user’s question.

Question: What is the refund period? Context: Refunds are available within 7 days. Support is available by email. Answer: Support is available by email.

The answer is faithful to the document but irrelevant to the question.

Case 4: Neither relevant nor faithful:

Worst case.

Question: What is the refund period? Context: Refunds are available within 7 days. Answer: You can exchange products after 6 months.

This is both unsupported and not useful.

Why this distinction matters in RAG

In RAG systems, relevance alone is not enough.

An answer can sound useful but still be unsupported.

Example:

User asks about a legal clause. The answer sounds legally correct. But it is not present in the retrieved document.

That is risky.

Faithfulness ensures the model does not invent facts beyond the given context.

Interview-ready answer

Relevance measures whether the answer addresses the user’s question, while faithfulness measures whether the answer is supported by the provided context. In RAG, an answer can be relevant but unfaithful if it answers the question using unsupported or invented information. It can also be faithful but irrelevant if it quotes correct context but does not answer the question. A strong RAG system needs both: the answer should be useful to the user and grounded in the retrieved sources.

2
RAG Failure Modes
Where retrieval-augmented systems break in practice.
Must-know
Interview question
What are common failure modes of RAG systems?

RAG can reduce hallucination, but it can still fail.

Common RAG failure modes include:

1. Retrieval failure

The correct document exists, but the retriever does not fetch it.

Reasons:

- poor embeddings - bad query - wrong chunking - missing metadata - weak vector search
2. Bad chunking

If chunks are too small, they may miss context. If chunks are too large, they may add noise.

3. Irrelevant context

The retriever may return semantically similar but answer-irrelevant chunks.

Example:

Query: refund policy for enterprise customers Retrieved: general refund policy for free users
4. Lost answer in context

Even if the right chunk is retrieved, the model may ignore it due to long context or competing information.

5. Conflicting documents

Multiple documents may provide different answers.

Example:

Old policy says 15 days. New policy says 30 days.
6. Hallucinated synthesis

The model may combine retrieved facts incorrectly.

7. No citation grounding

The answer may be correct-looking but not traceable to sources.

8. Stale index

The vector database may contain outdated documents.

9. Permission leakage

The retriever may fetch documents the user should not access.

Interview closing line: RAG fails not only at generation time but also at retrieval, chunking, ranking, freshness, permissions, and grounding stages.
3
How do you evaluate a RAG pipeline?
Separate retrieval quality from generation quality, then test the full pipeline.
Must-know
Interview question
How do you evaluate a RAG pipeline?

A RAG pipeline should be evaluated in two parts:

1. Retrieval quality 2. Generation quality

Because a RAG system can fail even before the LLM generates anything. If the retriever brings the wrong chunks, the model may either answer incorrectly or hallucinate.

A. Retrieval Evaluation

Retrieval evaluation checks whether the system fetched the right documents or chunks.

Important metrics:

- Recall@k - Precision@k - MRR - Hit rate - Context relevance
Recall@k:

Recall@k checks whether the correct answer-containing chunk appears in the top-k retrieved results.

Example:

Question: What is the company leave policy? Top 5 retrieved chunks: [A, B, C, D, E] If the correct leave policy chunk is present in these 5, Recall@5 is successful.

This is important because if the correct chunk is not retrieved, the LLM has no reliable source to answer from.

Precision@k:

Precision@k checks how many of the retrieved chunks are actually relevant.

Example:

Top 5 chunks retrieved: 3 relevant, 2 irrelevant Precision@5 = 3/5

High precision means the context is clean and not noisy.

MRR:

MRR means Mean Reciprocal Rank. It checks how high the first correct result appears.

If the correct chunk appears at rank 1, that is better than rank 8.

Hit Rate:

Hit rate checks whether at least one relevant document was retrieved.

It is simpler than recall but useful for high-level monitoring.

B. Generation Evaluation

Generation evaluation checks whether the final answer is correct, relevant, complete, and grounded.

Important metrics:

- answer relevance - faithfulness - groundedness - citation accuracy - completeness - hallucination rate
Answer relevance:

Does the answer actually address the user’s question?

Example:

User asks: What is the refund timeline? Bad answer: Here is the general refund policy. Good answer: Refunds are processed within 7–10 business days.
Faithfulness / groundedness:

Does the answer stay supported by the retrieved context?

If the retrieved document says:

Refunds are processed within 7 business days.

But the model answers:

Refunds are processed within 24 hours.

That is unfaithful.

Citation accuracy:

If the system provides citations, the cited chunk should actually support the claim.

A common failure is:

The answer is correct, but the citation points to the wrong document.

That is still a RAG quality issue.

C. End-to-End Evaluation

A production RAG system should be evaluated end-to-end using a golden dataset.

A golden dataset contains:

- user questions - expected answers - relevant source documents/chunks - accepted variations - rejected answers

Then you test:

Question → retrieval → context → generation → final answer

You should evaluate both offline and online.

Offline evaluation:

Used before deployment.

- benchmark test set - regression tests - prompt comparison - retriever comparison - embedding model comparison
Online evaluation:

Used after deployment.

- user feedback - thumbs up/down - click-through - escalation rate - correction rate - production hallucination reports
D. Practical RAG Evaluation Checklist

A strong RAG evaluation should answer:

1. Did we retrieve the right chunks? 2. Were the chunks ranked correctly? 3. Were irrelevant chunks filtered out? 4. Did the model use the retrieved chunks? 5. Is the answer supported by the retrieved context? 6. Are citations correct? 7. Did the system avoid unsupported claims? 8. Is the answer useful to the user? 9. Is latency acceptable? 10. Is cost acceptable?
Interview-ready answer

A RAG pipeline should be evaluated at both retrieval and generation stages. For retrieval, I would measure whether the correct chunks are retrieved and ranked well using metrics like recall@k, precision@k, MRR, hit rate, and context relevance. For generation, I would evaluate answer relevance, faithfulness, groundedness, citation accuracy, completeness, and hallucination rate. I would use a golden dataset containing user questions, expected answers, and relevant source chunks for offline evaluation, and then monitor production feedback, latency, cost, and failure cases online. The key point is that RAG can fail at retrieval, ranking, context construction, or generation, so evaluation must cover the full pipeline.