Fetching latest headlinesโ€ฆ
A RAG evaluator that admits what it can't judge
NORTH AMERICA
๐Ÿ‡บ๐Ÿ‡ธ United Statesโ€ขJuly 3, 2026

A RAG evaluator that admits what it can't judge

0 views0 likes0 comments
Originally published byDev.to

Fail-closed groundedness, deterministic corroborators, and a self-test โ€” because an evaluator should be more trustworthy than the thing it grades.

The quiet flaw in "LLM-as-judge" evals

Most tools that score AI output are an LLM grading an LLM, and they report every number in the same confident voice โ€” the verified ones and the guessed ones alike. For evaluation that's backwards. An evaluator's whole job is to be more trustworthy than the model it grades, not equally credulous.

rag-triad is a small local evaluator for retrieval-augmented answers built on one rule: lean on a deterministic check wherever one exists, and abstain โ€” out loud โ€” wherever one doesn't.

Localizing the failure, not just scoring it

A RAG answer fails in three different places โ€” bad retrieval, hallucinated generation, or an off-topic reply โ€” and each needs a different fix. A single quality score can't tell them apart. The triad can:

  • context relevance โœ— โ†’ retrieval miss (fix chunking / embeddings / top-k)
  • groundedness โœ— โ†’ hallucination (fix generation, or enforce cite-and-verify)
  • answer relevance โœ— โ†’ off-topic (fix the prompt)

The discipline (this is the actual contribution)

The triad framing is standard (TruLens, RAGAS). What's different:

  1. Fail-closed groundedness โ€” the judge must cite a quote; code verifies it's in the context, so a fabricated citation can't pass. Worst case is an honest DEFER.
  2. A deterministic corroborator matched to each leg's failure mode โ€” an embedding-similarity floor for context relevance; an answer-type gate for answer relevance (reusing the embedding trick on the answer leg would backfire โ€” cosine rewards topical-but-evasive answers). The signal has to fit the failure.
  3. Judges abstain instead of bluffing โ€” sample N times; disagreement โ†’ ABSTAIN, not a fake score.
  4. Validate the validator โ€” --selftest runs planted failures it must catch before you trust it.

Why calibration is the point

The property that makes downstream AI safe isn't raw capability โ€” it's calibration. A more capable model that's confidently wrong is more dangerous than a weaker one that abstains. (I've watched a newer model generation shift on hard computational questions from confident-wrong to honestly-inconclusive โ€” exactly the move an evaluator should reward and a naive scorer misses.) So rag-triad prizes the honest "I can't tell" over the confident guess.

Code + a one-command demo: github.com/MonongahelaHellbender/rag-triad. Runs locally on Ollama, MIT.

Comments (0)

Sign in to join the discussion

Be the first to comment!