Chip Foundry Services Request Assessment

RAG Evaluation Frameworks

RAG evaluation frameworks measure a retrieval-augmented generation system along two independent axes — whether the retriever found the right passages, and whether the generator actually used them faithfully — because a RAG pipeline can fail at either stage in ways a single end-to-end accuracy score cannot distinguish. A RAG system that retrieves irrelevant passages but writes a confident, fluent, wrong answer looks identical from the outside to one that retrieves perfect passages and then ignores them in favor of its own memorized (and possibly outdated or hallucinated) knowledge; both produce a bad answer, but the fix for the first is better retrieval and the fix for the second is better prompting or a different generator, so any useful evaluation framework has to separate retrieval quality from generation faithfulness rather than scoring the pipeline as one opaque unit.

Build an evaluation set
Question, ground-truth answer, and (ideally) the known-correct supporting passages for each test case
Run the full RAG pipeline
Retriever returns top-k passages; generator produces an answer conditioned on them
Score retrieval and generation separatelyA single end-to-end score cannot tell you which stage to fix
Context precision / recall
Of the retrieved passages, how many are relevant? Of all relevant passages, how many were retrieved?
Faithfulness (groundedness)
Does every claim in the answer trace back to something actually present in the retrieved context?
Answer relevance
Does the generated answer actually address the question asked, independent of whether it's grounded?
LLM-as-judge scoring
A separate, usually stronger LLM scores faithfulness and relevance against the retrieved context and reference answer
Diagnose: retrieval bug vs generation bug
Low context recall → fix chunking/embedding/retriever; low faithfulness with good context → fix prompting/generator

Context precision and context recall are retrieval-only metrics, computed without the generator in the loop at all, which is exactly what makes them useful for isolating retrieval bugs. Context recall asks, of every passage that actually contains information needed to answer the question (established by a reference answer or human-labeled relevant passages), what fraction did the retriever actually return — a low score here means the retriever is missing relevant material entirely, a problem no amount of better prompting can fix downstream. Context precision asks the inverse: of the passages the retriever did return, what fraction were actually relevant — a low precision score with high recall means the retriever is burying good passages in noise, which can still hurt generation quality by diluting the context window and giving the generator more opportunity to latch onto irrelevant text.

RAG Failure Modes: Which Metric Catches Which Bug retrieval metrics and generation metrics diagnose different failures Retrieval metrics Context Recall ↓ relevant passage never retrieved Context Precision ↓ retrieved passages mostly irrelevant Generation metrics Faithfulness ↓ answer contains unsupported claims (hallucination despite good context) Answer Relevance ↓ answer is grounded but doesn't address the question Diagnosis table Low recall + low faithfulness → retriever never found it, model guessed High recall + low faithfulness → generator ignored good context, fix prompt High recall + high faithfulness + low relevance → answer is accurate but off-topic Each combination points to a different fix — one end-to-end score hides all of this

Faithfulness and answer relevance evaluate the generation stage, and because there is rarely a simple string-match way to check whether a claim is "supported" by a passage, these metrics are almost always computed by an LLM acting as judge rather than by exact-match scoring. To measure faithfulness, the generated answer is decomposed into individual factual claims, and a judge LLM checks each claim against the retrieved context to determine whether it is actually supported, directly contradicted, or simply absent — an answer can be perfectly fluent and still score poorly here if it adds details the retrieved passages never mentioned. Answer relevance works differently: it checks whether the answer addresses the original question at all, independent of whether it's grounded, by having a judge LLM generate plausible questions the answer could be responding to and measuring how well those match the actual question asked — catching the specific failure mode where a RAG system retrieves correctly, writes a well-grounded answer, and still misses the point of what was actually asked.

Using an LLM as the judge introduces its own evaluation risk, which is why RAG evaluation frameworks like RAGAS, TruLens, and DeepEval standardize the judge prompts and scoring rubrics rather than leaving each team to write ad hoc grading prompts. An LLM judge is itself a language model with its own biases, inconsistencies, and sensitivity to how a grading question is phrased, so two different ad hoc judge prompts can produce meaningfully different faithfulness scores for the identical RAG output. Standardized frameworks fix the judge prompt, the claim-decomposition method, and the scoring scale, which makes scores comparable across different RAG configurations, different embedding models, and different evaluation runs over time — without that standardization, "faithfulness improved from 0.6 to 0.8" is not a meaningful claim, because the two numbers might have come from two different, incompatible grading rubrics.

The practical value of separating these metrics is that it turns RAG debugging from guesswork into a directed search. A team that only measures end-to-end answer correctness, and sees that correctness drop after a system change, has to manually inspect failing examples to figure out whether the regression came from the retriever, the generator, or the chunking strategy; a team running context recall, context precision, faithfulness, and answer relevance as separate metrics can usually tell from the numbers alone which component regressed, often before reading a single failing example. This is precisely why RAG evaluation frameworks exist as their own tooling category, distinct from general LLM evaluation — retrieval-augmented systems have a retrieval failure surface that pure generation benchmarks were never built to measure.

RAG evaluation frameworks exist because a retrieval-augmented system has two places to fail, not one, and the entire discipline is built around metrics precise enough to tell you which of the two actually broke.