Our RAG Tests Passed—Then Failed: Lessons from LLM Judges and Normalization

RAG tests changing from pass to fail, with a magnifying glass highlighting a conflicting judge response and a missing claim.
ChatGPT Image Nov 19 2026 03 13 55 PM

Our RAG evaluation tests passed. Later runs exposed failures in the evaluation pipeline itself.

In one case, a language-model judge returned “Entailed”, but its attribution fields conflicted with its explanation. In another, claim normalization removed a distinct requirement that should have remained available for evaluation.

Neither failure was obvious from an answer that merely “looked right.”

The lesson for RAG testing is practical: model-based evaluation needs its own tests, diagnostics, and review. Valid output structure and a favorable verdict do not establish semantic correctness.

These examples come from developer-reported test output preserved during the AInDotNet RAG-Phase-4 engineering work. They are individual observations, not a controlled failure-rate study.

What changed when the tests failed?

The project separates repeatable code checks from evaluations that call live models.

Earlier project checkpoints included a reported pass of all 52 live-evaluation tests. Subsequent developer-reported runs exposed the attribution and normalization failures discussed below.

On November 16, 2026, a fresh run passed 213 deterministic tests and 52 live-evaluation tests. That later success remains part of the evidence, alongside the earlier failures.

These checkpoints were not established as repeated measurements of an identical suite, code version, and configuration. We should not combine their totals or calculate a reliability percentage from them.

What the saved diagnostics do provide is a way to examine how the evaluator failed.

Failure 1: the LLM judge said “Entailed,” but attribution failed

One regression test checked whether claim extraction preserved the original answer passage’s attribution and scope.

The passage combined two ideas: sources indicating that enterprise RAG systems must enforce authorization, and narrator commentary that implementation status was not established.

The extracted claim under examination was:

There is no explicit evidence describing the implementation status of such controls in your demonstration.

The judge returned this combination of diagnostic fields:

SOURCE ATTRIBUTION REQUIRED: True
PASSAGE SOURCE SUBJECT: they
CLAIM SOURCE SUBJECT:
SAME SOURCE SUBJECT: False
VERIFIER OUTCOME: Entailed

The empty claim-source field is significant. The judge marked source attribution as required while identifying no source subject in the claim.

Its explanation also described the assertion as being stated impersonally as narrator commentary. It nevertheless retained the attribution requirement.

The response contained conflicting signals about how the assertion should be interpreted.

Why the validator rejected the result

The validator required more than a favorable entailment verdict.

When source attribution was required, it checked that the relevant source subjects were present, grounded in the supplied text, and matched. The reported response did not satisfy those conditions.

The diagnostic ended with:

Source subjects are missing, ungrounded,
or identify different sources.

The validator returned NotEstablished, and the test failed. The relevant checks are visible in the claim entailment verifier.

This did not establish that the application’s answer was factually wrong. It exposed an inconsistent evaluation response that the validator could not accept.

The engineering lesson is to retain the verdict, explanation, structured fields, extracted claim, and original passage together. Looking only at “Entailed” would conceal why the test rejected the result.

Failure 2: normalization dropped a distinct requirement

A separate test exercised extraction followed by semantic deduplication.

The reported extraction produced three claims:

Input claimMeaning
“The retrieved sources do not establish which, if any, authorization controls are currently implemented in your RAG demonstration application.”Missing implementation evidence
“One source recommends that enterprise RAG systems must enforce authorization among other controls.”Attributed architectural requirement
“No source explicitly confirms the actual implementation of authorization controls in the specific RAG demonstration application.”Missing implementation evidence

The first and third claims expressed equivalent evidence limitations. Deduplication was expected to retain one of them.

The requirement was a distinct assertion. It needed to remain.

Expected result: two claims.

The reported normalized output contained only the first evidence limitation. The requirement disappeared.

Actual result: one claim.

The strict test failed because normalization had removed a meaning that the pipeline was supposed to preserve.

Why valid JSON does not guarantee semantic correctness

The normalizer has useful structural safeguards. It checks that its response can be parsed, contains no empty claims, does not remove every input claim, and returns only strings present in the input. Claim normalizer.

The one-claim output could satisfy those checks.

It was nonempty. Its wording came directly from the input. It could be represented as a valid JSON array.

Yet the selection was semantically incomplete.

Structural checks establish properties of the response’s form and membership. They cannot, by themselves, establish that every distinct assertion survived.

Requiring verbatim output helps detect invented or rewritten claims. It does not prevent the model from selecting an incomplete subset.

How omitted claims distort RAG evaluation

Verification evaluates the claims it receives. An assertion removed upstream may never reach that step.

This changes the scope of evaluation and can change the denominator used to calculate a score.

Consider a separate arithmetic illustration: two of three claims are supported. The faithfulness score is approximately 67%. If preprocessing silently removes the unsupported claim, the remaining two produce a score of 100%.

That is a hypothetical explanation of the risk—not a score measured in the saved normalization failure.

The effect can also go in the other direction. Removing a supported claim may lower the score. Either way, the result describes a changed claim set.

In this implementation, faithfulness is supported claims divided by evaluated claims. Preserving the evaluated assertions is therefore part of preserving the score’s meaning. Faithfulness result calculation.

Report deterministic and live tests separately

Deterministic tests use fixed inputs, fakes, or local files to check defined code behavior. They can verify calculations, orchestration, parsing, and handling of known responses without requiring a model to reproduce a judgment.

Live evaluations examine behavior involving external models and, for some cases, the prepared database corpus.

These groups establish different things.

November 16 test groupPassedFailedSkipped
Deterministic21300
LiveEvaluation5200

The live tests used the configured gpt-4.1-mini model. The saved reports document one passing run, without retries to obtain a pass. Separate database-integration and performance test categories were not run as part of those two groups. November 16 evidence.

The accurate conclusion is that those selected groups passed on that run.

It is insufficient evidence for claiming that every project test passed, every evaluated answer was correct, or the model judge had become consistently reliable.

Preserve failures instead of testing until green

A rerun can provide additional evidence. It should not replace the preceding failure in the record.

If a failing live evaluation passes later, the changed outcome is itself worth examining. Possible explanations include model variability, configuration changes, different inputs, infrastructure problems, or a code change.

The saved cases do not isolate every possible cause or establish their frequency.

For each investigated failure, preserve:

  • The question, answer, and retrieved evidence.
  • Original passages, extracted claims, and normalized claims.
  • Judge fields, verdicts, and explanations.
  • Code version, model configuration, prompt version, and timestamp where available.
  • The assertion that failed and the reason it exists.

Use a predefined, bounded set of repeated evaluations when investigating variability. Report all outcomes. Keep assertions strict while reviewing whether the test contract correctly represents the intended behavior. Testing guidance.

What these failures mean for production decisions

The evaluation library remains an experimental reference implementation requiring adaptation and review.

Its interfaces and deterministic tests provide useful engineering boundaries. Its live components still depend on extraction, normalization, classification, and model judgments that can be wrong or inconsistent.

Our reported cases support keeping attribution checks and semantic-preservation tests visible. They do not establish that automated evaluation is useless, or that another prompt adjustment would make it dependable.

The practical recommendation is to use evaluation outputs as inspectable evidence. Review important cases, preserve intermediate transformations, and avoid making an uncertain model judgment the sole approval mechanism for release.

RAG testing becomes more useful when a passing score comes with an explanation of what was evaluated, which evidence supported it, and what remains uncertain.

Download the code and run it

Explore the RAG-Phase-4 repository for the implementation and tests. At AInDotNet, we place this work within the AI Engineering Discipline and Delivery Lifecycle: build the application, evaluate its outputs, and examine the evaluator with the same care.

Frequently Asked Questions

Why can RAG tests pass and then fail on a later run?

Live RAG evaluations depend on model responses that can vary. Changes in code, prompts, configuration, retrieved evidence, or external services can also affect results.

A later failure requires investigation. Preserve each run’s inputs, outputs, and configuration rather than assuming that either the passing or failing result tells the whole story.

What is an LLM judge in RAG evaluation?

An LLM judge uses a language model to assess an answer or extracted claim against supplied evidence and evaluation instructions.

It can help examine support, attribution, and meaning. Its judgment remains another model output that requires validation; it is not an independent guarantee of correctness.

Why did the test fail when the judge returned “Entailed”?

In the saved diagnostic, the judge returned “Entailed” while also marking source attribution as required. The claim-source field was empty, and the response indicated that the source subjects did not match.

The validator required those attribution conditions to be satisfied. It therefore rejected the result despite the favorable verdict. The failure exposed conflicting evaluation signals.

Does that failed test prove the RAG answer was wrong?

No. This test examined whether an extracted claim preserved its original answer passage’s meaning and attribution.

The reported failure concerned an inconsistent judge response. Establishing whether the answer itself was supported by external evidence is a separate evaluation question.

What is claim normalization?

Claim normalization prepares extracted assertions for evaluation, including removing semantic duplicates.

In this reference implementation, the normalizer is instructed to select existing claims verbatim while preserving distinct meanings. Requirements, implementation assertions, contradictions, and missing evidence should remain separate when they express different facts.

What went wrong in the reported normalization failure?

Extraction produced three claims: two equivalent statements about missing implementation evidence and one attributed authorization requirement.

Normalization was expected to retain two claims. Instead, it returned only an evidence limitation, dropping the distinct requirement. The test failed because a meaning that still needed evaluation had disappeared.

Why doesn’t valid JSON prove that an evaluation response is correct?

Valid JSON establishes that a response has a parseable structure. Additional checks can establish that fields exist or output strings came from the input.

Those checks do not establish that the response preserves meaning, selects every distinct claim, or reaches a justified conclusion. A structurally valid response can still be semantically incomplete or inconsistent.

How can a dropped claim affect a faithfulness score?

A dropped claim may never reach evidence verification. That changes what the evaluator measures and can change the score’s denominator.

Removing an unsupported claim can inflate a score; removing a supported claim can lower it. The saved normalization failure demonstrated claim loss, but it did not establish a measured amount of score distortion.

What is the difference between deterministic tests and live evaluations?

Deterministic tests use fixed inputs, fakes, or local files to check defined code behavior, such as calculations, orchestration, and handling of known responses.

Live evaluations involve external models and sometimes a prepared database corpus. They provide evidence about observed model behavior under particular conditions. Passing one group does not establish that the other group is reliable.

What did the November 16 test results establish?

The selected groups passed: 213 deterministic tests and 52 live-evaluation tests, with no failures or skipped tests in those groups.

That documents one successful run. It does not erase earlier failures, establish consistent judge reliability, or mean every project test category was executed. Saved test evidence.

Should we rerun a failed live evaluation until it passes?

A rerun can provide additional evidence, but preceding failures should remain in the record.

For a variability investigation, define a bounded set of runs and report all outcomes. Repeating a test until it passes and retaining only that result conceals behavior that may matter in production.

Can these examples tell us how often LLM judges fail?

No. They are individual reported observations, not a controlled failure-rate study.

Estimating reliability requires a defined evaluation population, consistent conditions, documented versions, and a planned measurement method. Totals from different project checkpoints should not be combined into a reliability percentage.

Should automated RAG evaluation approve production releases?

This project does not establish that its live evaluator is dependable enough to serve as the sole release approval mechanism.

Use its outputs as inspectable evidence, retain deterministic checks, and review important cases. The library is an experimental reference implementation requiring adaptation and validation against your application’s requirements.

What should we preserve when an evaluation fails?

Save the question, answer, retrieved evidence, original passages, extracted claims, normalized claims, judge fields, verdicts, and explanations.

Also retain the failed assertion and available code, model, prompt, configuration, and timestamp information. These records help distinguish application defects, lost meaning, judge inconsistencies, and unsuitable test expectations.

author avatar
Keith Baldwin

Leave a Reply

Your email address will not be published. Required fields are marked *