<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Evals on lo0 — Tech Blog</title><link>https://blog.lo0.es/en/tags/evals/</link><description>Recent content in Evals on lo0 — Tech Blog</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Wed, 27 May 2026 08:30:00 +0200</lastBuildDate><atom:link href="https://blog.lo0.es/en/tags/evals/index.xml" rel="self" type="application/rss+xml"/><item><title>LLM-as-judge: the exam marker who grades other models without turning into an oracle</title><link>https://blog.lo0.es/en/posts/llm-as-judge-exam-marker-not-oracle/</link><pubDate>Wed, 27 May 2026 08:30:00 +0200</pubDate><guid>https://blog.lo0.es/en/posts/llm-as-judge-exam-marker-not-oracle/</guid><description>&lt;blockquote>
&lt;p>This post goes deeper into the judges section of &lt;a href="https://blog.lo0.es/en/posts/evals-llm-layer-after-tracing/">Evals for LLMs&lt;/a>. There it was one piece of the mixed panel; here we get into why it works, where it breaks and how its calibration is measured before accepting it in CI.&lt;/p>
&lt;/blockquote>
&lt;h2 id="tldr">TL;DR&lt;/h2>
&lt;p>An LLM judge is not &amp;ldquo;a GPT-4 you ask whether the answer is any good&amp;rdquo;. It is a &lt;strong>trained marker&lt;/strong>: it has a rubric written in advance, it is asked for explicit reasoning before the verdict, its score is computed as an expectation weighted by token probabilities (not as the first token it spits out), and before being accepted in production it is calibrated against a sample of ~50 human-annotated examples until it reaches &lt;strong>κ ≥ 0.5&lt;/strong> (Cohen&amp;rsquo;s kappa). The state of the art in May 2026 is three patterns, &lt;strong>G-Eval&lt;/strong>, &lt;strong>Prometheus 2&lt;/strong> and &lt;strong>panel of judges&lt;/strong>, each answering a different trade-off between cost, quality and reproducibility. All of them share four documented biases: position, verbosity, self-preference and narcissism. This post explains how a real judge is built, how to measure whether it lies, and when each pattern is appropriate.&lt;/p>
&lt;h2 id="you-are-here-eval">You are here: EVAL&lt;/h2>
&lt;div class="diagram" style="max-width:780px;margin:1rem auto;">
&lt;svg viewBox="0 0 780 90" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="you are here: Eval">
&lt;style>.box{stroke:#444;stroke-width:1.4;rx:6}.active{fill:#7aafff;stroke-width:3}.idle{fill:#f4f4f4}.lbl{font:600 12px sans-serif;fill:#222}.arr{stroke:#666;stroke-width:1.4;fill:none;marker-end:url(#jdm)}.cyc{stroke:#888;stroke-width:1.2;fill:none;stroke-dasharray:4 2;marker-end:url(#jdm)}&lt;/style>
&lt;defs>&lt;marker id="jdm" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6" markerHeight="6" orient="auto">&lt;path d="M0,0 L10,5 L0,10 z" fill="#666"/>&lt;/marker>&lt;/defs>
&lt;text x="390" y="20" text-anchor="middle" class="lbl">You are here: EVAL · the judge piece inside the mixed panel&lt;/text>
&lt;rect x="30" y="35" width="110" height="35" class="box idle"/>&lt;text x="85" y="58" text-anchor="middle" class="lbl">1 · Data&lt;/text>
&lt;rect x="155" y="35" width="110" height="35" class="box idle"/>&lt;text x="210" y="58" text-anchor="middle" class="lbl">2 · Tune&lt;/text>
&lt;rect x="280" y="35" width="110" height="35" class="box active"/>&lt;text x="335" y="58" text-anchor="middle" class="lbl">3 · Eval&lt;/text>
&lt;rect x="405" y="35" width="110" height="35" class="box idle"/>&lt;text x="460" y="58" text-anchor="middle" class="lbl">4 · Deploy&lt;/text>
&lt;rect x="530" y="35" width="110" height="35" class="box idle"/>&lt;text x="585" y="58" text-anchor="middle" class="lbl">5 · Observe&lt;/text>
&lt;rect x="655" y="35" width="110" height="35" class="box idle"/>&lt;text x="710" y="58" text-anchor="middle" class="lbl">6 · Retrain&lt;/text>
&lt;path class="arr" d="M140,52 L155,52"/>&lt;path class="arr" d="M265,52 L280,52"/>&lt;path class="arr" d="M390,52 L405,52"/>&lt;path class="arr" d="M515,52 L530,52"/>&lt;path class="arr" d="M640,52 L655,52"/>
&lt;path class="cyc" d="M710,72 L710,82 L85,82 L85,72"/>
&lt;/svg>
&lt;/div>
&lt;h2 id="the-analogy-the-civil-service-exam-marker">The analogy: the civil service exam marker&lt;/h2>
&lt;p>A public competitive exam has thousands of papers. There is no way the senior board can mark them all. The Spanish system&amp;rsquo;s answer has been the same for decades: &lt;strong>trained markers&lt;/strong>. People who are not professors, but who are given:&lt;/p>
&lt;ol>
&lt;li>A &lt;strong>marking template&lt;/strong> written in advance: what is valued, how many points each section is worth, what gets deducted.&lt;/li>
&lt;li>&lt;strong>Prior training&lt;/strong> with a sample of papers already marked by the senior board, until their marks agree reasonably well.&lt;/li>
&lt;li>&lt;strong>Continuous auditing&lt;/strong>: a fraction of their marking is re-marked by the senior board to verify that the marker is not drifting.&lt;/li>
&lt;/ol>
&lt;p>A well-built LLM judge is exactly that. &lt;strong>It is not an oracle, it is a trained marker&lt;/strong>:&lt;/p>
&lt;ul>
&lt;li>The rubric is the explicit criteria in the prompt (what faithfulness is, what relevancy is, and so on).&lt;/li>
&lt;li>The training is the calibration against ~50 human-annotated examples.&lt;/li>
&lt;li>The continuous auditing is the weekly sampling where a human re-evaluates a fraction of the traffic the judge has judged.&lt;/li>
&lt;/ul>
&lt;p>And, as with the human marker, &lt;strong>the judge has systematic biases&lt;/strong> that the public exam system has learned to watch for: markers prefer certain handwriting styles, certain lengths, certain structures. The same happens to the judge. The rest of this post takes apart exactly which ones and how they are measured.&lt;/p>
&lt;h2 id="why-llm-as-judge-exists">Why LLM-as-judge exists&lt;/h2>
&lt;p>The direct reason: money and time. A professional human annotation costs on the order of 0.50 € to 5 € per example (depending on complexity and domain), and takes 30 seconds to several minutes. A GPT-4 judgement costs ~0.01-0.05 € and takes ~2 seconds. For a golden dataset of 500 examples evaluated continuously over 10 candidates a day, &lt;strong>the difference is between 2,500 € a day and 50 € a day&lt;/strong>. And the wall-clock difference is between days and minutes.&lt;/p>
&lt;p>The less direct but more relevant reason: methodological scalability. A golden dataset of 500 examples is relatively easy to annotate once. What happens afterwards is the hard part:&lt;/p>
&lt;ul>
&lt;li>Every time a candidate adapter appears, all 500 have to be re-evaluated.&lt;/li>
&lt;li>Every time the dataset is updated (because a new incident came in) it has to be re-evaluated.&lt;/li>
&lt;li>Every time the system prompt changes it has to be re-evaluated.&lt;/li>
&lt;/ul>
&lt;p>Without an automatable, cheap judge, the eval battery stops running and the system goes blind between releases. That is what really justifies the pattern.&lt;/p>
&lt;h2 id="the-three-canonical-patterns-in-2026">The three canonical patterns in 2026&lt;/h2>
&lt;div class="diagram" style="max-width:760px;margin:1.5rem auto;">
&lt;svg viewBox="0 0 760 320" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Three LLM-as-judge patterns">
&lt;style>
.bx{fill:#f8f8f8;stroke:#444;stroke-width:1.4;rx:8}
.b1{fill:#ffe6d6}
.b2{fill:#d6eaff}
.b3{fill:#d9f5d6}
.bh{fill:#fff5b0;stroke:#444;stroke-width:1.4;rx:6}
.t{font:700 13px sans-serif;fill:#222}
.s{font:400 11px sans-serif;fill:#555}
.h{font:700 14px sans-serif;fill:#222}
.ar{stroke:#666;stroke-width:1.5;fill:none;marker-end:url(#mjj)}
&lt;/style>
&lt;defs>&lt;marker id="mjj" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6" markerHeight="6" orient="auto">&lt;path d="M0,0 L10,5 L0,10 z" fill="#666"/>&lt;/marker>&lt;/defs>
&lt;text x="380" y="22" text-anchor="middle" class="h">Three canonical patterns for building a judge&lt;/text>
&lt;rect x="30" y="45" width="220" height="240" class="bx b1"/>
&lt;text x="140" y="68" text-anchor="middle" class="t">1 · G-Eval&lt;/text>
&lt;text x="140" y="86" text-anchor="middle" class="s">(Liu et al. 2023)&lt;/text>
&lt;rect x="50" y="100" width="180" height="40" class="bh"/>
&lt;text x="140" y="118" text-anchor="middle" class="s">Strong judge (GPT-4o, Claude)&lt;/text>
&lt;text x="140" y="132" text-anchor="middle" class="s">+ rubric + CoT + form-filling&lt;/text>
&lt;text x="50" y="158" class="s">• score = E[i · P(token=i)]&lt;/text>
&lt;text x="50" y="174" class="s">• prompt with criterion + examples&lt;/text>
&lt;text x="50" y="190" class="s">• structured output (JSON)&lt;/text>
&lt;text x="50" y="206" class="s">• high cost, high quality&lt;/text>
&lt;text x="50" y="226" class="s">↗ cases:&lt;/text>
&lt;text x="50" y="242" class="s"> small golden set + domain&lt;/text>
&lt;text x="50" y="258" class="s"> where quality matters more&lt;/text>
&lt;text x="50" y="274" class="s"> than cost per judgement&lt;/text>
&lt;rect x="270" y="45" width="220" height="240" class="bx b2"/>
&lt;text x="380" y="68" text-anchor="middle" class="t">2 · Prometheus 2&lt;/text>
&lt;text x="380" y="86" text-anchor="middle" class="s">(Kim et al. 2024)&lt;/text>
&lt;rect x="290" y="100" width="180" height="40" class="bh"/>
&lt;text x="380" y="118" text-anchor="middle" class="s">Specialised open source judge&lt;/text>
&lt;text x="380" y="132" text-anchor="middle" class="s">Mistral 8×7B fine-tuned&lt;/text>
&lt;text x="290" y="158" class="s">• score 1-5 on a custom rubric&lt;/text>
&lt;text x="290" y="174" class="s">• 0.897 correlation with GPT-4&lt;/text>
&lt;text x="290" y="190" class="s">• runs on-premise (~32 GB VRAM)&lt;/text>
&lt;text x="290" y="206" class="s">• no external cost per judgement&lt;/text>
&lt;text x="290" y="226" class="s">↗ cases:&lt;/text>
&lt;text x="290" y="242" class="s"> mass on-prem evaluation,&lt;/text>
&lt;text x="290" y="258" class="s"> data stays inside the perimeter,&lt;/text>
&lt;text x="290" y="274" class="s"> strict ENS/NIS2&lt;/text>
&lt;rect x="510" y="45" width="220" height="240" class="bx b3"/>
&lt;text x="620" y="68" text-anchor="middle" class="t">3 · Panel of Judges&lt;/text>
&lt;text x="620" y="86" text-anchor="middle" class="s">(Verga et al. 2024)&lt;/text>
&lt;rect x="530" y="100" width="180" height="40" class="bh"/>
&lt;text x="620" y="118" text-anchor="middle" class="s">3-5 heterogeneous judges&lt;/text>
&lt;text x="620" y="132" text-anchor="middle" class="s">+ aggregation (median/vote)&lt;/text>
&lt;text x="530" y="158" class="s">• reduces self-preference bias&lt;/text>
&lt;text x="530" y="174" class="s">• lower variance than single&lt;/text>
&lt;text x="530" y="190" class="s">• 3-5× higher cost&lt;/text>
&lt;text x="530" y="206" class="s">• flags disputed cases&lt;/text>
&lt;text x="530" y="226" class="s">↗ cases:&lt;/text>
&lt;text x="530" y="242" class="s"> critical gate decisions,&lt;/text>
&lt;text x="530" y="258" class="s"> evaluating models from the&lt;/text>
&lt;text x="530" y="274" class="s"> same vendor (self-judging)&lt;/text>
&lt;/svg>
&lt;/div>
&lt;h3 id="1--g-eval">1 · G-Eval&lt;/h3>
&lt;p>Published by Liu et al. (2023). The base idea is so simple it fits in one sentence: &lt;strong>give the judge a detailed rubric, ask it to reason before scoring, and read the result as a weighted expectation instead of as the first token&lt;/strong>. The three levers:&lt;/p>
&lt;p>&lt;strong>Rubric:&lt;/strong> a prompt with an explicit criterion (e.g. &amp;ldquo;Faithfulness: the degree to which the answer relies only on the context, without inventing data. Score 1 = invents everything, 5 = everything supported by the context&amp;rdquo;), ideally with one or two examples per extreme value.&lt;/p>
&lt;p>&lt;strong>Chain-of-thought + form-filling:&lt;/strong> the model is first asked to &amp;ldquo;reason briefly about each criterion&amp;rdquo; and then to &amp;ldquo;fill in this JSON form&amp;rdquo;. That forces it not to spit out an arbitrary number.&lt;/p>
&lt;p>&lt;strong>Probability-weighted scoring:&lt;/strong> instead of reading the first token after the &lt;code>score:&lt;/code> field, you look at the model&amp;rsquo;s probability distribution over the tokens &lt;code>1, 2, 3, 4, 5&lt;/code> and compute:&lt;/p>
$$\hat{s} = \sum_{i=1}^{5} i \cdot \frac{p(\text{token}=i)}{\sum_{j=1}^{5} p(\text{token}=j)}$$
&lt;p>This turns a discrete score into a continuous one. The justification: if the judge was &amp;ldquo;torn&amp;rdquo; between 4 and 5 (probabilities 0.4 and 0.5 on &lt;code>4&lt;/code> and &lt;code>5&lt;/code>), the real score is 4.55, not &lt;code>5&lt;/code>. This sharply reduces variance across runs of the same prompt, and captures information that greedy decoding throws away.&lt;/p>
&lt;p>Limitations of G-Eval: &lt;strong>it needs access to the model&amp;rsquo;s logprobs&lt;/strong>. Closed-source models have been restricting that access (Claude does not expose it, GPT-4 does but only top-5). In 2026 G-Eval with strict probability weighting is only practical against open source models you serve yourself (vLLM exposes them) or against GPT-4 with &lt;code>logprobs=true&lt;/code>.&lt;/p>
&lt;h3 id="2--prometheus-2">2 · Prometheus 2&lt;/h3>
&lt;p>Published by Kim et al. (KAIST, 2024). The insight is complementary to G-Eval: &lt;strong>what if, instead of asking a generalist judge to evaluate, we fine-tune a specific judge?&lt;/strong>&lt;/p>
&lt;p>Prometheus 2 is a Mistral 8×7B (MoE, ~47 GB in BF16, ~24 GB in INT4) fine-tuned on 100k+ evaluation examples with varied rubrics. The metric published in the paper: &lt;strong>0.897 Pearson correlation with GPT-4-as-judge&lt;/strong> on the Vicuna Bench and similar. That matters because it means GPT-4 can be replaced as a judge at the cost of local inference without losing almost any quality.&lt;/p>
&lt;p>Why it matters in on-premise production:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>No data leaves the perimeter&lt;/strong>. For strict ENS/NIS2 customers this is not a preference, it is a requirement. A judge that travels over an external API is not an option there.&lt;/li>
&lt;li>&lt;strong>Zero marginal cost&lt;/strong>. When the judge runs on-prem, evaluating 50,000 cases a day adds no external bill.&lt;/li>
&lt;li>&lt;strong>Controlled latency&lt;/strong>. Continuous eval over real traffic can run in parallel without saturating an external provider&amp;rsquo;s rate limits.&lt;/li>
&lt;/ul>
&lt;p>The price: you have to maintain one more inference service (Prometheus 2 running in its own vLLM), and the judge does not &amp;ldquo;update&amp;rdquo; unless it is re-fine-tuned.&lt;/p>
&lt;h3 id="3--panel-of-judges">3 · Panel of Judges&lt;/h3>
&lt;p>Verga et al. (Cohere, 2024) formalised it: instead of a single judge, use &lt;strong>3-5 heterogeneous judges&lt;/strong>, different models, different prompts, different temperatures, and aggregate their judgements.&lt;/p>
&lt;p>Common aggregation mechanisms:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Median&lt;/strong> for continuous scores. Robust to outliers.&lt;/li>
&lt;li>&lt;strong>Majority vote&lt;/strong> for pairwise judgements (chosen vs rejected). If 3 of 5 prefer A, the winner is A.&lt;/li>
&lt;li>&lt;strong>Calibration-weighted mean&lt;/strong>: weight each judge by its κ against humans in calibration. The more reliable judges vote more.&lt;/li>
&lt;/ul>
&lt;p>What a panel gives that a single judge does not:&lt;/p>
&lt;ol>
&lt;li>&lt;strong>Reduction of self-preference&lt;/strong> (a judge&amp;rsquo;s bias towards outputs stylistically similar to its own): if the judges come from different vendors, the sum cancels out.&lt;/li>
&lt;li>&lt;strong>A measure of case difficulty&lt;/strong>: if all 5 judges agree, the case is easy; if they are split, the case is ambiguous and should be escalated to a human. That turns the panel into an automatic triaging system for human annotation.&lt;/li>
&lt;li>&lt;strong>Lower variance&lt;/strong>: each judge&amp;rsquo;s noise is averaged out.&lt;/li>
&lt;/ol>
&lt;p>The cost: 3-5× the bill of a single judge. That is why the panel is usually reserved for &lt;strong>critical eval gates&lt;/strong> (does this adapter get promoted or not?), not for continuous eval over traffic.&lt;/p>
&lt;h2 id="how-to-measure-whether-the-judge-lies-cohens-kappa">How to measure whether the judge lies: Cohen&amp;rsquo;s kappa&lt;/h2>
&lt;p>Accepting the judge in production without measuring its agreement with humans is the same as accepting an uncalibrated thermometer. The standard metric for inter-rater agreement with discrete or ordinal scales is &lt;strong>Cohen&amp;rsquo;s kappa&lt;/strong>:&lt;/p>
$$\kappa = \frac{p_o - p_e}{1 - p_e}$$
&lt;p>Where &lt;code>p_o&lt;/code> is the &lt;strong>observed agreement proportion&lt;/strong> (what percentage of examples judge and human agree on) and &lt;code>p_e&lt;/code> is the &lt;strong>agreement proportion expected by chance&lt;/strong> (what you would expect if both scored at random respecting each one&amp;rsquo;s marginals).&lt;/p>
&lt;p>The intuition: if &lt;code>p_o = 0.9&lt;/code> but &lt;code>p_e = 0.85&lt;/code> (because both nearly always score &amp;ldquo;4 or 5&amp;rdquo;), agreement is 90 % in raw terms but κ = 0.33: most of the agreement comes from both scoring high, not from them understanding each other. κ corrects for that baseline.&lt;/p>
&lt;p>The usual interpretive scale (Landis and Koch 1977, still the reference):&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>κ&lt;/th>
&lt;th>Interpretation&lt;/th>
&lt;th>Production threshold&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&amp;lt; 0.20&lt;/td>
&lt;td>Poor&lt;/td>
&lt;td>Useless&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>0.21–0.40&lt;/td>
&lt;td>Fair&lt;/td>
&lt;td>Weak signal only&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>0.41–0.60&lt;/td>
&lt;td>Moderate&lt;/td>
&lt;td>&lt;strong>Minimum acceptable in 2026&lt;/strong>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>0.61–0.80&lt;/td>
&lt;td>Substantial&lt;/td>
&lt;td>State of the art for open source judges&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>0.81–1.00&lt;/td>
&lt;td>Almost perfect&lt;/td>
&lt;td>Human judges rarely reach it between themselves&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>An important point the field learned the hard way: &lt;strong>humans between themselves rarely exceed κ = 0.70&lt;/strong> on LLM tasks (faithfulness, relevancy). That is the realistic ceiling for an LLM judge. Chasing κ = 0.9 against humans is chasing a ghost: not even two human annotators get there.&lt;/p>
&lt;h3 id="weighted-kappa-for-ordinal-scales">Weighted kappa for ordinal scales&lt;/h3>
&lt;p>For 1-5 scores, the disagreement &amp;ldquo;judge says 4, human says 5&amp;rdquo; is not the same as &amp;ldquo;judge says 1, human says 5&amp;rdquo;. Standard kappa treats both as an identical failure. &lt;strong>Linear or quadratic weighted kappa&lt;/strong> assigns weight to the magnitude of the disagreement:&lt;/p>
$$\kappa_w = 1 - \frac{\sum_{i,j} w_{ij} \, o_{ij}}{\sum_{i,j} w_{ij} \, e_{ij}}, \quad w_{ij}^{(\text{lin})} = \frac{|i-j|}{k-1}, \quad w_{ij}^{(\text{quad})} = \frac{(i-j)^2}{(k-1)^2}.$$
&lt;p>In G-Eval with 1-5 scores, the usual practice is to publish &lt;code>κ_quad&lt;/code> because it penalises large disagreements more and comes closer to human intuition.&lt;/p>
&lt;h3 id="numerical-calibration-example">Numerical calibration example&lt;/h3>
&lt;p>Imagine a golden set of 50 examples scored by a human and by the judge, both on a 1-5 scale. The confusion matrix:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>&lt;/th>
&lt;th>Hum 1&lt;/th>
&lt;th>Hum 2&lt;/th>
&lt;th>Hum 3&lt;/th>
&lt;th>Hum 4&lt;/th>
&lt;th>Hum 5&lt;/th>
&lt;th>Judge total&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;strong>Judge 1&lt;/strong>&lt;/td>
&lt;td>3&lt;/td>
&lt;td>1&lt;/td>
&lt;td>0&lt;/td>
&lt;td>0&lt;/td>
&lt;td>0&lt;/td>
&lt;td>4&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Judge 2&lt;/strong>&lt;/td>
&lt;td>1&lt;/td>
&lt;td>4&lt;/td>
&lt;td>2&lt;/td>
&lt;td>0&lt;/td>
&lt;td>0&lt;/td>
&lt;td>7&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Judge 3&lt;/strong>&lt;/td>
&lt;td>0&lt;/td>
&lt;td>1&lt;/td>
&lt;td>6&lt;/td>
&lt;td>2&lt;/td>
&lt;td>0&lt;/td>
&lt;td>9&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Judge 4&lt;/strong>&lt;/td>
&lt;td>0&lt;/td>
&lt;td>0&lt;/td>
&lt;td>1&lt;/td>
&lt;td>12&lt;/td>
&lt;td>3&lt;/td>
&lt;td>16&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Judge 5&lt;/strong>&lt;/td>
&lt;td>0&lt;/td>
&lt;td>0&lt;/td>
&lt;td>0&lt;/td>
&lt;td>2&lt;/td>
&lt;td>12&lt;/td>
&lt;td>14&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Human total&lt;/strong>&lt;/td>
&lt;td>4&lt;/td>
&lt;td>6&lt;/td>
&lt;td>9&lt;/td>
&lt;td>16&lt;/td>
&lt;td>15&lt;/td>
&lt;td>50&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Diagonal (exact agreements): 3+4+6+12+12 = 37 → p_o = 0.74.&lt;/p>
&lt;p>&lt;code>p_e&lt;/code> is computed as Σ_i (n_judge_i · n_hum_i) / n² = (4·4 + 7·6 + 9·9 + 16·16 + 14·15) / 50² = (16+42+81+256+210) / 2500 = 605/2500 ≈ 0.242.&lt;/p>
$$\kappa = \frac{0.74 - 0.242}{1 - 0.242} = \frac{0.498}{0.758} \approx 0.66$$
&lt;p>Substantial. Acceptable. If we wanted quadratic weighted κ, near disagreements (Judge 4 vs Hum 5) weigh less than distant ones (Judge 2 vs Hum 4), and κ_quad typically comes out 0.05-0.10 above the linear one.&lt;/p>
&lt;h2 id="the-four-biases-of-the-judge">The four biases of the judge&lt;/h2>
&lt;div class="diagram" style="max-width:760px;margin:1.5rem auto;">
&lt;svg viewBox="0 0 760 220" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Four biases of the LLM judge">
&lt;style>
.bx{fill:#f8f8f8;stroke:#444;stroke-width:1.4;rx:8}
.b1{fill:#ffe9d6}
.b2{fill:#d6eaff}
.b3{fill:#d9f5d6}
.b4{fill:#fff5b0}
.t{font:700 13px sans-serif;fill:#222}
.s{font:400 11px sans-serif;fill:#555}
.m{font:600 11px sans-serif;fill:#2c3e50}
.h{font:700 14px sans-serif;fill:#222}
&lt;/style>
&lt;text x="380" y="22" text-anchor="middle" class="h">Four documented biases of the LLM judge&lt;/text>
&lt;rect x="20" y="40" width="170" height="160" class="bx b1"/>
&lt;text x="105" y="62" text-anchor="middle" class="t">Position bias&lt;/text>
&lt;text x="30" y="84" class="s">Prefers the first answer&lt;/text>
&lt;text x="30" y="100" class="s">when both are comparable.&lt;/text>
&lt;text x="30" y="124" class="m">Measurement:&lt;/text>
&lt;text x="30" y="140" class="s">swap the order → fraction&lt;/text>
&lt;text x="30" y="156" class="s">of flips. &amp;lt;10% acceptable.&lt;/text>
&lt;text x="30" y="180" class="m">Fix: 2 swapped passes&lt;/text>
&lt;rect x="200" y="40" width="170" height="160" class="bx b2"/>
&lt;text x="285" y="62" text-anchor="middle" class="t">Verbosity bias&lt;/text>
&lt;text x="210" y="84" class="s">Rewards longer answers,&lt;/text>
&lt;text x="210" y="100" class="s">regardless of content.&lt;/text>
&lt;text x="210" y="124" class="m">Measurement:&lt;/text>
&lt;text x="210" y="140" class="s">Pearson corr score vs length&lt;/text>
&lt;text x="210" y="156" class="s">on golden. |r| &amp;lt; 0.3 acceptable.&lt;/text>
&lt;text x="210" y="180" class="m">Fix: explicit rubric&lt;/text>
&lt;rect x="380" y="40" width="170" height="160" class="bx b3"/>
&lt;text x="465" y="62" text-anchor="middle" class="t">Self-preference&lt;/text>
&lt;text x="390" y="84" class="s">A GPT-4 judge prefers&lt;/text>
&lt;text x="390" y="100" class="s">GPT-4-style outputs.&lt;/text>
&lt;text x="390" y="124" class="m">Measurement:&lt;/text>
&lt;text x="390" y="140" class="s">compare same dataset with&lt;/text>
&lt;text x="390" y="156" class="s">3 judges; divergence &amp;lt; 15%.&lt;/text>
&lt;text x="390" y="180" class="m">Fix: heterogeneous panel&lt;/text>
&lt;rect x="560" y="40" width="180" height="160" class="bx b4"/>
&lt;text x="650" y="62" text-anchor="middle" class="t">Narcissism&lt;/text>
&lt;text x="570" y="84" class="s">Evaluated model and judge&lt;/text>
&lt;text x="570" y="100" class="s">share architecture/vendor.&lt;/text>
&lt;text x="570" y="124" class="m">Measurement:&lt;/text>
&lt;text x="570" y="140" class="s">δ human vs judge score when&lt;/text>
&lt;text x="570" y="156" class="s">candidate and judge match.&lt;/text>
&lt;text x="570" y="180" class="m">Fix: external judge&lt;/text>
&lt;/svg>
&lt;/div>
&lt;h3 id="position-bias">Position bias&lt;/h3>
&lt;p>First documented by Wang et al. (2023). If you present two answers A and B to the judge in a pairwise setting, &lt;strong>it prefers A more often than B&lt;/strong>, on the order of 55-65 % when A and B are objectively equivalent, with typical 2023-2024 judges. In 2026 frontier judges (GPT-5, Claude 4.5, Llama 4 Judge) have it fairly well mitigated, but &lt;strong>it is still measurable&lt;/strong>.&lt;/p>
&lt;p>&lt;strong>How to measure it formally:&lt;/strong> run the dataset twice, once with &lt;code>(A, B)&lt;/code> and once with &lt;code>(B, A)&lt;/code>. If the judge is consistent, the two passes should agree. The fraction of cases where the verdict flips is the position-bias rate. Accepted threshold in 2026: &amp;lt; 10 %.&lt;/p>
&lt;p>&lt;strong>Canonical mitigation:&lt;/strong> always run two passes with the order reversed and average. Frameworks such as Promptfoo and Inspect AI do it by default.&lt;/p>
&lt;h3 id="verbosity-bias">Verbosity bias&lt;/h3>
&lt;p>Documented by Saito et al. and Dubois et al. in 2024. For open-ended tasks (faithfulness, helpfulness), the judge tends to give a higher score to longer answers. The typical Pearson correlation between score and length on answers of equivalent human-rated quality can rise to 0.4-0.5 without mitigation.&lt;/p>
&lt;p>&lt;strong>How to measure it:&lt;/strong> Pearson correlation between the judge&amp;rsquo;s score and the length of the answer, &lt;strong>computed over a subset where humans have confirmed equivalent quality&lt;/strong>. If the correlation is &amp;gt; 0.3 on that controlled subset, there is significant verbosity bias.&lt;/p>
&lt;p>&lt;strong>Mitigation:&lt;/strong> a rubric explicitly neutral on length (&amp;ldquo;the answer should be appropriately concise for the question; length is not a criterion&amp;rdquo;) and few-shot examples where a short answer beats a long one. AlpacaEval 2.0 builds a length correction directly into the metric.&lt;/p>
&lt;h3 id="self-preference-bias">Self-preference bias&lt;/h3>
&lt;p>Documented by Panickssery et al. (Anthropic, 2024). &lt;strong>A GPT-4 judge prefers GPT-4 outputs. A Claude judge prefers Claude outputs.&lt;/strong> Not out of conspiracy, but because models share stylistic patterns with their close relatives (paragraph structure, use of bullet points, tone).&lt;/p>
&lt;p>&lt;strong>How to measure it:&lt;/strong> over a golden set, compare the scores of 3 different judges (e.g. GPT-4, Claude, Llama 4 Judge). If for the same candidate there is &amp;gt; 15 % systematic divergence attributable to the candidate&amp;rsquo;s identity, there is self-preference.&lt;/p>
&lt;p>&lt;strong>Mitigation:&lt;/strong> a panel of judges with heterogeneous vendors. If a single judge is going to be used, &lt;strong>it must not come from the same vendor as the model being evaluated&lt;/strong>.&lt;/p>
&lt;h3 id="narcissism">Narcissism&lt;/h3>
&lt;p>The extreme case of self-preference: the judge &lt;strong>is exactly the same model&lt;/strong> as the candidate. This happens more than it seems: a team trains a Llama 3 8B with LoRA and evaluates it with Llama 3 8B as the judge because &amp;ldquo;it is what they have on-prem&amp;rdquo;. It is methodologically invalid. The delta between human score and judge score grows measurably.&lt;/p>
&lt;p>&lt;strong>Mitigation:&lt;/strong> a judge of a &lt;strong>different architecture&lt;/strong> from the candidate. If your candidate is Llama 3, your judge should be Mistral, Qwen or a Prometheus 2 (which, although based on Mistral, was fine-tuned specifically for evaluation).&lt;/p>
&lt;h2 id="the-judge-as-the-pipelines-hinge">The judge as the pipeline&amp;rsquo;s hinge&lt;/h2>
&lt;p>The judge is not just &amp;ldquo;the eval piece&amp;rdquo;. It is &lt;strong>the hinge&lt;/strong> that connects three stages of the pipeline:&lt;/p>
&lt;div class="diagram" style="max-width:760px;margin:1.5rem auto;">
&lt;svg viewBox="0 0 760 280" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="The judge as a hinge between Eval, Tune and Retrain">
&lt;style>
.bx{fill:#f8f8f8;stroke:#444;stroke-width:1.4;rx:8}
.bt{fill:#ffd6d6}
.be{fill:#d6eaff}
.br{fill:#fff5b0}
.bj{fill:#d9f5d6;stroke:#444;stroke-width:2;rx:8}
.t{font:700 13px sans-serif;fill:#222}
.s{font:400 11px sans-serif;fill:#555}
.h{font:700 14px sans-serif;fill:#222}
.ar{stroke:#666;stroke-width:1.6;fill:none;marker-end:url(#mjbi)}
.ag{stroke:#27ae60;stroke-width:1.8;fill:none;marker-end:url(#mjbig)}
&lt;/style>
&lt;defs>
&lt;marker id="mjbi" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6" markerHeight="6" orient="auto">&lt;path d="M0,0 L10,5 L0,10 z" fill="#666"/>&lt;/marker>
&lt;marker id="mjbig" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6" markerHeight="6" orient="auto">&lt;path d="M0,0 L10,5 L0,10 z" fill="#27ae60"/>&lt;/marker>
&lt;/defs>
&lt;text x="380" y="22" text-anchor="middle" class="h">The judge as a hinge: produces preference pairs, decides gates, triggers retrain&lt;/text>
&lt;rect x="290" y="100" width="180" height="80" class="bj"/>
&lt;text x="380" y="130" text-anchor="middle" class="t">LLM judge&lt;/text>
&lt;text x="380" y="150" text-anchor="middle" class="s">G-Eval / Prometheus 2 /&lt;/text>
&lt;text x="380" y="166" text-anchor="middle" class="s">Panel of Judges&lt;/text>
&lt;rect x="30" y="60" width="170" height="60" class="bx bt"/>
&lt;text x="115" y="82" text-anchor="middle" class="t">TUNE&lt;/text>
&lt;text x="115" y="102" text-anchor="middle" class="s">DPO / KTO / ORPO / SimPO&lt;/text>
&lt;text x="115" y="116" text-anchor="middle" class="s">needs chosen/rejected pairs&lt;/text>
&lt;rect x="30" y="160" width="170" height="60" class="bx be"/>
&lt;text x="115" y="182" text-anchor="middle" class="t">EVAL gate (CI)&lt;/text>
&lt;text x="115" y="202" text-anchor="middle" class="s">does the adapter promote?&lt;/text>
&lt;text x="115" y="216" text-anchor="middle" class="s">faithfulness ≥ 0.85, regr &amp;lt; 2pp&lt;/text>
&lt;rect x="560" y="60" width="170" height="60" class="bx be"/>
&lt;text x="645" y="82" text-anchor="middle" class="t">Continuous EVAL&lt;/text>
&lt;text x="645" y="102" text-anchor="middle" class="s">sampling over real traffic,&lt;/text>
&lt;text x="645" y="116" text-anchor="middle" class="s">drift and regression detection&lt;/text>
&lt;rect x="560" y="160" width="170" height="60" class="bx br"/>
&lt;text x="645" y="182" text-anchor="middle" class="t">RETRAIN&lt;/text>
&lt;text x="645" y="202" text-anchor="middle" class="s">incidents → dataset enrichment&lt;/text>
&lt;text x="645" y="216" text-anchor="middle" class="s">judge classifies + triages&lt;/text>
&lt;path class="ag" d="M290,135 L200,85"/>
&lt;text x="220" y="115" class="s" fill="#27ae60">pairs&lt;/text>
&lt;path class="ag" d="M290,150 L200,180"/>
&lt;text x="220" y="160" class="s" fill="#27ae60">gate&lt;/text>
&lt;path class="ar" d="M470,135 L560,85"/>
&lt;text x="520" y="100" class="s">scores&lt;/text>
&lt;path class="ar" d="M470,150 L560,180"/>
&lt;text x="525" y="160" class="s">triage&lt;/text>
&lt;/svg>
&lt;/div>
&lt;p>&lt;strong>Towards TUNE:&lt;/strong> the judge generates the &lt;code>(chosen, rejected)&lt;/code> pairs for DPO without needing human labellers. That chain is what makes &lt;a href="https://blog.lo0.es/en/posts/continuous-fine-tuning-production-real-traffic-deployed-adapter/">continuous fine-tuning&lt;/a> work without a dedicated annotation team.&lt;/p>
&lt;p>&lt;strong>Towards the EVAL gate:&lt;/strong> the judge gives the score that is compared against the CI threshold. If the adapter does not clear 0.85 on faithfulness, no merge.&lt;/p>
&lt;p>&lt;strong>Towards continuous EVAL:&lt;/strong> over a sample of real traffic (1-5 %), the judge computes scores and persists them. That makes it possible to detect regressions that appear days after deployment and that CI did not see because its golden set did not cover them.&lt;/p>
&lt;p>&lt;strong>Towards RETRAIN:&lt;/strong> the cases where the judge gives a low score are automatic candidates for the next retraining dataset. The judge acts as the triage of the incident flow.&lt;/p>
&lt;h2 id="implications-for-on-premise-hardware">Implications for on-premise hardware&lt;/h2>
&lt;p>The numbers below are indicative for typical scenarios in May 2026.&lt;/p>
&lt;h3 id="on-an-rtx-4090-24-gb">On an RTX 4090 (24 GB)&lt;/h3>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Judge&lt;/th>
&lt;th>Does it fit?&lt;/th>
&lt;th>Approximate throughput&lt;/th>
&lt;th>Notes&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>GPT-4o (API)&lt;/td>
&lt;td>n/a&lt;/td>
&lt;td>~50-100 judgements/min&lt;/td>
&lt;td>External cost, not local&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Prometheus 2 (8×7B INT4)&lt;/td>
&lt;td>Yes, just about&lt;/td>
&lt;td>~40-80 judgements/min&lt;/td>
&lt;td>Q4_K_M GGUF, llama.cpp&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Llama 3.1 8B fine-tuned judge&lt;/td>
&lt;td>Yes, comfortably&lt;/td>
&lt;td>~150-250 judgements/min&lt;/td>
&lt;td>Reasonable on-prem default&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Mistral Small Judge 22B&lt;/td>
&lt;td>Not directly, requires offload&lt;/td>
&lt;td>~10-20 judgements/min&lt;/td>
&lt;td>Too much for 24 GB in BF16&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Conclusion: on a single 4090, an open source 8B judge fine-tuned for evaluation (or a quantised Prometheus 2) is the sweet spot.&lt;/p>
&lt;h3 id="on-a-generic-4h100-sxm-cluster-320-gb-nvlink">On a generic 4×H100 SXM cluster (320 GB, NVLink)&lt;/h3>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Judge&lt;/th>
&lt;th>Configuration&lt;/th>
&lt;th>Approximate throughput&lt;/th>
&lt;th>Notes&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Prometheus 2 BF16&lt;/td>
&lt;td>TP=2&lt;/td>
&lt;td>~400-700 judgements/min&lt;/td>
&lt;td>Fits comfortably, low latency&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Llama 3.3 70B Instruct&lt;/td>
&lt;td>TP=4&lt;/td>
&lt;td>~150-300 judgements/min&lt;/td>
&lt;td>If used as a generalist judge&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Panel of 3 judges in parallel&lt;/td>
&lt;td>TP=1-2 each&lt;/td>
&lt;td>~600-1200 judgements/min combined&lt;/td>
&lt;td>Natural pattern in a cluster&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>On an NVLink cluster the natural approach is to &lt;strong>run a panel of judges&lt;/strong> in parallel (each judge taking 1-2 GPUs) with a LiteLLM router in front. That removes the cognitive cost of &amp;ldquo;which judge do we use&amp;rdquo; because all three are used and the result is aggregated.&lt;/p>
&lt;h2 id="what-we-have-not-covered-upcoming-articles">What we have not covered (upcoming articles)&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>Red teaming and safety eval&lt;/strong>: how robustness against adversarial prompts is evaluated. It is a different pattern from the ordinal judge.&lt;/li>
&lt;li>&lt;strong>Multistep agent eval&lt;/strong>: AgentBench, TauBench, evaluating trajectories instead of individual outputs.&lt;/li>
&lt;li>&lt;strong>Benchmark contamination&lt;/strong>: how to detect whether the evaluated model saw the golden set during pre-training, and why public benchmarks are half broken.&lt;/li>
&lt;li>&lt;strong>Cost-aware judging&lt;/strong>: when a cheap judge (Llama 8B) beats an expensive one (GPT-4o), and how to quantify the quality/cost trade-off with Pareto curves.&lt;/li>
&lt;/ul>
&lt;h2 id="see-also">See also&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/evals-llm-layer-after-tracing/">Evals for LLMs: the layer after tracing&lt;/a> — the full context of the Eval stage; this post goes deeper into the judge piece inside the mixed panel described there.&lt;/li>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/modern-alignment-dpo-kto-orpo-simpo/">Modern alignment: DPO, KTO, ORPO and SimPO&lt;/a> — the preference optimization methods that consume the pairs the judge produces.&lt;/li>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/continuous-fine-tuning-production-real-traffic-deployed-adapter/">Continuous fine-tuning in production&lt;/a> — the Postgres + queries + hot-swap cycle that needs the judge as its hinge.&lt;/li>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/prompt-versioning-contract-five-word-change/">Prompt versioning with Langfuse and MLflow&lt;/a> — the judge&amp;rsquo;s prompt is versioned too; a &amp;ldquo;minor&amp;rdquo; change to the rubric can invalidate the calibration.&lt;/li>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/llm-tracing-opentelemetry-genai/">LLM tracing with OpenTelemetry GenAI&lt;/a> — the full OTel pipeline that captures the traces the judge runs its continuous scoring over. The eval-tracing coupling closes there.&lt;/li>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/structured-output-bitmask-outlines-xgrammar-llguidance/">Structured output&lt;/a> — the judge produces a structured verdict (&lt;code>{score, reasoning, decision}&lt;/code>); with constrained decoding (XGrammar) parsing is guaranteed not to fail, which removes retries and reduces the variance attributable to format failures.&lt;/li>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/canary-blue-green-shadow-llm-models/">Canary, blue-green and shadow for LLM models&lt;/a> — the judge&amp;rsquo;s quality score is one of the five regression metrics acting as a gate in the canary; the detail of why it works offline but not inline is there.&lt;/li>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/evaluating-rag-ragas-golden-dataset-metrics/">Evaluating a RAG without fooling yourself: RAGAS, the golden dataset and the four metrics that matter&lt;/a> — RAGAS uses LLM-as-judge to measure faithfulness claim by claim; the judge in this post is exactly the piece RAGAS instantiates to classify whether each statement in the answer is supported by the retrieved chunks.&lt;/li>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/llm-quality-benchmarks-contamination-trap-oss-tools/">LLM quality benchmarks: MMLU, MT-Bench, HELM and the leaderboards that matter&lt;/a> — the public benchmarks that give an external perspective on whether an internal judge is calibrated with the community consensus.&lt;/li>
&lt;/ul>
&lt;h2 id="references">References&lt;/h2>
&lt;ul>
&lt;li>Liu, Y., Iter, D., Xu, Y., Wang, S., Xu, R., Zhu, C. &lt;em>G-Eval: NLG Evaluation using GPT-4 with Better Human Alignment&lt;/em> (EMNLP 2023).&lt;/li>
&lt;li>Kim, S., Suk, J., Longpre, S., Lin, B. Y., Shin, J., Welleck, S., Neubig, G., Lee, M., Lee, K., Seo, M. &lt;em>Prometheus 2: An Open Source Language Model Specialized in Evaluating Other Language Models&lt;/em> (EMNLP 2024).&lt;/li>
&lt;li>Verga, P., Hofstatter, S., Althammer, S., Su, Y., Piktus, A., Arkhangorodsky, A., Xu, M., White, N., Lewis, P. &lt;em>Replacing Judges with Juries: Evaluating LLM Generations with a Panel of Diverse Models&lt;/em> (Cohere, 2024).&lt;/li>
&lt;li>Panickssery, A., Bowman, S., Feng, S. &lt;em>LLM Evaluators Recognize and Favor Their Own Generations&lt;/em> (Anthropic, NeurIPS 2024).&lt;/li>
&lt;li>Wang, P., Li, L., Chen, L., Cai, Z., Zhu, D., Lin, B., Cao, Y., Liu, Q., Liu, T., Sui, Z. &lt;em>Large Language Models are Not Fair Evaluators&lt;/em> (ACL 2024).&lt;/li>
&lt;li>Dubois, Y., Galambosi, B., Liang, P., Hashimoto, T. &lt;em>Length-Controlled AlpacaEval: A Simple Way to Debias Automatic Evaluators&lt;/em> (Stanford, 2024).&lt;/li>
&lt;li>Cohen, J. &lt;em>A Coefficient of Agreement for Nominal Scales&lt;/em> (Educational and Psychological Measurement, 1960).&lt;/li>
&lt;li>Landis, J. R., Koch, G. G. &lt;em>The Measurement of Observer Agreement for Categorical Data&lt;/em> (Biometrics, 1977).&lt;/li>
&lt;/ul></description></item><item><title>Evals for LLMs: the layer after tracing that decides whether your model performs or only looks like it does</title><link>https://blog.lo0.es/en/posts/evals-llm-layer-after-tracing/</link><pubDate>Mon, 25 May 2026 07:30:00 +0200</pubDate><guid>https://blog.lo0.es/en/posts/evals-llm-layer-after-tracing/</guid><description>&lt;blockquote>
&lt;p>This is &lt;strong>stage 3&lt;/strong> of the LLMOps pipeline. If you arrive without context on the full journey, the &lt;a href="https://blog.lo0.es/en/posts/six-stage-llmops-pipeline-architecture-and-deep-dive/">six-stage LLMOps pipeline&lt;/a> describes where Eval sits between Tune and Deploy, and the &lt;a href="https://blog.lo0.es/en/posts/anatomy-llm-request-production-tour-six-stages/">anatomy of a production LLM request&lt;/a> shows a real eval blocking the promotion of an adapter.&lt;/p>
&lt;/blockquote>
&lt;h2 id="tldr">TL;DR&lt;/h2>
&lt;p>Tracing is not evaluation. &lt;strong>Tracing tells you what happened; eval tells you whether what happened is any good.&lt;/strong> The two layers live in tools that overlap visually (Langfuse does both), but the discipline is different: tracing is continuous capture over real traffic; eval is controlled execution against a stable dataset, with metrics that have to &lt;strong>fail CI&lt;/strong> if they drop below a threshold. Without eval, the &lt;code>Tune → Deploy&lt;/code> loop closes blind: adapter v8 goes to production because the engineer &amp;ldquo;saw it answering well&amp;rdquo; on five examples. With eval done properly, v8 only gets in if it beats v7 across a battery of 500 curated cases, evaluated by a mix of heuristics, embeddings, an LLM judge calibrated against humans, and a sample of real traffic with human annotation. This post takes apart the mechanism, the mathematics that keep you honest, the real tools in 2026 and the pitfalls that turn it into theatre.&lt;/p>
&lt;h2 id="the-analogy-the-academic-examination-board">The analogy: the academic examination board&lt;/h2>
&lt;div class="diagram" style="max-width:760px;margin:1.5rem auto;">
&lt;svg viewBox="0 0 760 320" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Eval as an academic examination board">
&lt;style>
.tbox{fill:#f8f8f8;stroke:#444;stroke-width:1.4;rx:8}
.thead{fill:#7aafff;stroke:#444;stroke-width:1.4;rx:8}
.tlbl{font:600 13px sans-serif;fill:#222}
.tsub{font:400 11px sans-serif;fill:#555}
.tarr{stroke:#666;stroke-width:1.5;fill:none;marker-end:url(#me1)}
.tgate{fill:#ffd76b;stroke:#444;stroke-width:1.6;rx:6}
&lt;/style>
&lt;defs>&lt;marker id="me1" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6" markerHeight="6" orient="auto">&lt;path d="M0,0 L10,5 L0,10 z" fill="#666"/>&lt;/marker>&lt;/defs>
&lt;rect x="20" y="20" width="160" height="60" class="thead"/>
&lt;text x="100" y="44" text-anchor="middle" class="tlbl">Candidate&lt;/text>
&lt;text x="100" y="62" text-anchor="middle" class="tsub">model + adapter + prompt&lt;/text>
&lt;text x="100" y="76" text-anchor="middle" class="tsub">(the "thesis" being defended)&lt;/text>
&lt;rect x="240" y="20" width="200" height="60" class="tbox"/>
&lt;text x="340" y="44" text-anchor="middle" class="tlbl">Fixed syllabus&lt;/text>
&lt;text x="340" y="62" text-anchor="middle" class="tsub">versioned golden dataset&lt;/text>
&lt;text x="340" y="76" text-anchor="middle" class="tsub">(500 questions with expected answer)&lt;/text>
&lt;rect x="500" y="20" width="240" height="60" class="tbox"/>
&lt;text x="620" y="44" text-anchor="middle" class="tlbl">Mixed board&lt;/text>
&lt;text x="620" y="62" text-anchor="middle" class="tsub">heuristics + embeddings + LLM judge&lt;/text>
&lt;text x="620" y="76" text-anchor="middle" class="tsub">+ human sample (calibrated panel)&lt;/text>
&lt;path class="tarr" d="M180,50 L240,50"/>
&lt;path class="tarr" d="M440,50 L500,50"/>
&lt;rect x="40" y="130" width="180" height="60" class="tbox"/>
&lt;text x="130" y="154" text-anchor="middle" class="tlbl">Marks per category&lt;/text>
&lt;text x="130" y="172" text-anchor="middle" class="tsub">faithfulness, relevancy,&lt;/text>
&lt;text x="130" y="186" text-anchor="middle" class="tsub">format, toxicity, latency&lt;/text>
&lt;rect x="270" y="130" width="220" height="60" class="tbox"/>
&lt;text x="380" y="154" text-anchor="middle" class="tlbl">Aggregation + segmentation&lt;/text>
&lt;text x="380" y="172" text-anchor="middle" class="tsub">global mean, by language,&lt;/text>
&lt;text x="380" y="186" text-anchor="middle" class="tsub">by tenant, by question type&lt;/text>
&lt;rect x="540" y="130" width="200" height="60" class="tgate"/>
&lt;text x="640" y="154" text-anchor="middle" class="tlbl">Eval gate (pass mark)&lt;/text>
&lt;text x="640" y="172" text-anchor="middle" class="tsub">faithfulness ≥ 0.85 ∧ tox &amp;lt; 0.02&lt;/text>
&lt;text x="640" y="186" text-anchor="middle" class="tsub">∧ regression vs baseline &amp;lt; 2 pp&lt;/text>
&lt;path class="tarr" d="M620,86 L130,124"/>
&lt;path class="tarr" d="M620,86 L380,124"/>
&lt;path class="tarr" d="M620,86 L640,124"/>
&lt;rect x="40" y="240" width="320" height="60" class="tbox"/>
&lt;text x="200" y="264" text-anchor="middle" class="tlbl">Pass → promotion to production&lt;/text>
&lt;text x="200" y="282" text-anchor="middle" class="tsub">label `production` moves to the candidate&lt;/text>
&lt;rect x="400" y="240" width="320" height="60" class="tbox"/>
&lt;text x="560" y="264" text-anchor="middle" class="tlbl">Fail → back to Tune&lt;/text>
&lt;text x="560" y="282" text-anchor="middle" class="tsub">incident or regression stays in lineage&lt;/text>
&lt;path class="tarr" d="M580,196 L200,236"/>
&lt;path class="tarr" d="M700,196 L560,236"/>
&lt;/svg>
&lt;/div>
&lt;p>A doctoral candidate defends a thesis. They do not defend it before a single distracted professor: they defend it before a &lt;strong>mixed board&lt;/strong>, with a &lt;strong>syllabus fixed in advance&lt;/strong> (not improvised on the day), and with an &lt;strong>explicit pass mark&lt;/strong> that separates pass from fail. The board is not a single expert: it is a panel combining fast readers (the heuristics: does it have the requested format? does it include the citation?), semantic reviewers (the embeddings: does it resemble the expected answer?), an external assessor trained on the subject (the LLM judge: is it faithful to the context, is it relevant, does it sound coherent?), and human jury members on a &lt;strong>sample of the most sensitive cases&lt;/strong>. If the candidate does not reach the mark, they are not promoted: they go back and prepare the defence again.&lt;/p>
&lt;p>That analogy has three edges worth holding on to from the first minute:&lt;/p>
&lt;ol>
&lt;li>&lt;strong>The syllabus is fixed&lt;/strong>, but &lt;strong>it is actively updated when a new topic appears in the real world&lt;/strong> that the candidate must know. If it is not updated, the exam measures something increasingly distant from what happens outside.&lt;/li>
&lt;li>&lt;strong>The board has to be trained&lt;/strong>: an LLM judge not calibrated against humans is an examiner making up the criteria.&lt;/li>
&lt;li>&lt;strong>The pass mark is published beforehand&lt;/strong>: it is not decided after seeing the result, because then it is not a pass mark, it is a justification.&lt;/li>
&lt;/ol>
&lt;p>These three ideas run through the rest of the post. Every tool and every piece of mathematics that follows is, at bottom, a way of operationalising them.&lt;/p>
&lt;h2 id="the-mechanism-itself-four-layers-of-evaluators">The mechanism itself: four layers of evaluators&lt;/h2>
&lt;p>An eval suite in 2026 is made up of four layers that coexist. None replaces the others; each one measures what the rest cannot measure well, and leaves unmeasured what the rest do measure well.&lt;/p>
&lt;p>&lt;strong>Layer 1 — Deterministic heuristics.&lt;/strong> Rules that return &lt;code>true&lt;/code> or &lt;code>false&lt;/code> with no ambiguity: the output matches a regex, contains a specific entity, does not exceed a length, follows a valid JSON schema, respects a requested format (markdown, &lt;code>tool_call&lt;/code> function, mandatory citation). They are cheap, extremely fast, need neither judge nor embeddings, and catch the most frequent class of bug: the model answered in the wrong format. Their limit is obvious, in that they do not know whether the answer is &lt;strong>correct&lt;/strong>, only whether it is &lt;strong>well formed&lt;/strong>.&lt;/p>
&lt;p>&lt;strong>Layer 2 — Semantic metrics with embeddings.&lt;/strong> They compare the model&amp;rsquo;s output with an expected answer by computing cosine similarity between their embeddings, or by measuring whether a claim in the output is entailed by the retrieved context. They are cheap, deterministic given the embedding model, and very useful for detecting answers that drift in meaning but not in form. Their limit is equally clear: two answers can have high cosine similarity and say the opposite of each other (&amp;ldquo;the customer can cancel at any time&amp;rdquo; vs &amp;ldquo;the customer cannot cancel at any time&amp;rdquo; share 80% of their tokens).&lt;/p>
&lt;p>&lt;strong>Layer 3 — LLM-as-judge.&lt;/strong> A model, or an ensemble, evaluates the output of the model under test with a prompt designed to produce a score on a rubric. The canonical methods in 2026 are &lt;strong>G-Eval&lt;/strong> (chain-of-thought prompting with a calibrated numeric score), &lt;strong>Prometheus&lt;/strong> (open-source judge trained specifically for evals, reporting 0.897 correlation with humans in its v2.5 release from late 2025), and &lt;strong>panel-of-judges&lt;/strong> setups that average votes from three heterogeneous models to reduce bias. This layer captures nuances the previous two cannot see: is it faithful to the context? is it useful? is it safe? is it complete? Its limit is cost and the need for calibration, treated as a whole section below.&lt;/p>
&lt;p>&lt;strong>Layer 4 — Humans.&lt;/strong> Trained annotators who evaluate a &lt;strong>sample&lt;/strong> of the eval set, not all of it. They are the only layer with ultimate authority over the rubric: the LLM judge is calibrated against them, not the other way round. They are expensive (≈ 0.50–2.00 € per annotated sample when the domain is technical) and slow (a competent annotator produces 60–120 quality annotations per working day). The mistake teams make again and again is dropping this layer &amp;ldquo;because we have an LLM judge&amp;rdquo;; without humans there is no calibration, and without calibration the judge measures whatever it feels like.&lt;/p>
&lt;p>Normal operation of an eval gate combines all four: heuristics remove malformed outputs before spending judge tokens, embeddings filter out the manifestly irrelevant, the judge scores the rest, and humans annotate a sample every N runs to keep the judge calibrated.&lt;/p>
&lt;h2 id="the-golden-dataset-a-versioned-syllabus">The golden dataset: a versioned syllabus&lt;/h2>
&lt;p>The golden dataset is the most undervalued artefact in the pipeline. It is &lt;strong>the exam&lt;/strong>. If it is badly built, everything else, the best-calibrated judge in the world, the strictest gates, the fastest suite, measures noise. Covered at the top level in the &lt;a href="https://blog.lo0.es/en/posts/data-versioning-llmops-dvc-lakefs-reproducible-golden-dataset/">data versioning post&lt;/a> as one of the four artefacts to version differently; here we go into detail from the Eval perspective.&lt;/p>
&lt;p>The three properties a golden dataset has to satisfy are:&lt;/p>
&lt;p>&lt;strong>Stratified representativeness.&lt;/strong> The dataset has to cover the system&amp;rsquo;s real input space in proportions that reflect production. If 30% of real traffic is in German, 30% of the golden set has to be in German; if 12% of questions are about subscription cancellation, that category cannot be 60% of the eval set just because it was easy to annotate. Stratification stays auditable: each example carries tags (&lt;code>lang=de&lt;/code>, &lt;code>category=cancellation&lt;/code>, &lt;code>tenant_type=enterprise&lt;/code>, &lt;code>difficulty=hard&lt;/code>) and the suite reports metrics per segment, not just the aggregate.&lt;/p>
&lt;p>&lt;strong>Strict holdout, no contamination with training.&lt;/strong> This rule is so obvious that almost every team believes it is following it, and almost every team breaks it without noticing. If the golden eval set gets mixed with the fine-tuning dataset, because somebody did a badly built &lt;code>random_split&lt;/code>, because a purchased dataset is used by other vendors for training, because the LLM judge saw it during pretraining, then the metric stops measuring generalisation and starts measuring memorisation. The eval set hash is versioned separately (covered in the &lt;a href="https://blog.lo0.es/en/posts/continuous-fine-tuning-production-real-traffic-deployed-adapter/">continuous fine-tuning post&lt;/a>) and a routine leakage check is run: if an example in the golden set matches one in training token for token, it raises an alert.&lt;/p>
&lt;p>&lt;strong>Reasoned sample size, not aspirational.&lt;/strong> How many examples are needed? There is a mathematical minimum for telling two models apart with confidence. If model A is right 80% of the time and model B 85% on the same set, the 95% confidence interval for that difference of proportions (unpaired) is:&lt;/p>
\[
\Delta p \pm 1{.}96 \cdot \sqrt{\frac{p_A(1-p_A) + p_B(1-p_B)}{n}}
\]
&lt;p>To distinguish 80% from 85% with 95% confidence (an interval that does not cross zero), you need n ≈ 700 examples. To distinguish 90% from 91% under the same criterion, the calculation gives n ≈ 6,500. A &amp;ldquo;we have 50 examples in the golden set and we see adapter v8 scoring 90%&amp;rdquo; means nothing statistically: the confidence interval is ±8 points. The field&amp;rsquo;s practical rule in 2026 is &lt;strong>a minimum of 300 examples to detect coarse differences, ideally 500–1,500 if you want to detect fine improvements&lt;/strong>, and to start by stratifying properly before obsessing over sample size.&lt;/p>
&lt;p>On top of this comes &lt;strong>active maintenance&lt;/strong>: the golden set is enriched with &lt;strong>production incidents&lt;/strong> (covered in detail in the &lt;a href="https://blog.lo0.es/en/posts/retrain-closing-the-loop-feedback-dataset-adapter/">retrain post&lt;/a>), so that every real complaint that ends in a bug becomes a curated example the next deploy candidate will have to pass. The golden set is not static: it is a &lt;strong>living record of errors the system has already made and must not make again&lt;/strong>.&lt;/p>
&lt;h2 id="llm-as-judge-how-you-calibrate-an-examiner">LLM-as-judge: how you calibrate an examiner&lt;/h2>
&lt;p>Layer 3 is the one most teams misuse. The typical mistake is: &amp;ldquo;we use GPT-4 as judge because it is the most capable&amp;rdquo;. The judge is not chosen for nominal capability; it is chosen for &lt;strong>agreement with humans&lt;/strong> on the specific rubric you are measuring. A judge with 60% agreement is useless even if it is GPT-5; a Prometheus 7B fine-tuned for your domain with 88% agreement is worth more.&lt;/p>
&lt;p>The standard metric for measuring agreement between two annotators (human vs judge, or two humans with each other) is &lt;strong>Cohen&amp;rsquo;s kappa&lt;/strong>, which corrects for the agreement expected by chance:&lt;/p>
\[
\kappa = \frac{p_o - p_e}{1 - p_e}
\]
&lt;p>where \(p_o\) is the observed proportion of agreement and \(p_e\) is the proportion expected by chance under each annotator&amp;rsquo;s marginal distributions. The accepted interpretations in the literature are:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>κ &amp;lt; 0.40&lt;/strong>: poor agreement. The judge says whatever it likes.&lt;/li>
&lt;li>&lt;strong>κ ∈ [0.40, 0.60]&lt;/strong>: moderate. Acceptable for coarse signals (is it toxic?), dreadful for nuance (is it faithful to the context?).&lt;/li>
&lt;li>&lt;strong>κ ∈ [0.60, 0.80]&lt;/strong>: substantial. Useful in production for most metrics.&lt;/li>
&lt;li>&lt;strong>κ &amp;gt; 0.80&lt;/strong>: almost perfect. The judge can be treated as a substitute for the human for that specific kind of judgement.&lt;/li>
&lt;/ul>
&lt;p>Numerically, consider a binary rubric (faithful / not faithful) over 200 examples annotated by a human and by a judge. If the human said &amp;ldquo;faithful&amp;rdquo; in 150 cases and the judge in 140, and they agree on 175 of the 200, then \(p_o = 0{.}875\); the marginals are \(p_h = 0{.}75\), \(p_j = 0{.}70\), and \(p_e = 0{.}75 \cdot 0{.}70 + 0{.}25 \cdot 0{.}30 = 0{.}600\). Kappa comes out at &lt;strong>0.6875&lt;/strong>: substantial but not excellent, usable, with an eye kept on the rubric.&lt;/p>
&lt;p>Calibrating the judge means an explicit process:&lt;/p>
&lt;ol>
&lt;li>&lt;strong>Build a calibration set&lt;/strong> — 100–300 examples annotated by trained humans, with written guidelines. Inter-annotator kappa between the humans is also measured; if the humans themselves cannot agree, the rubric is badly written before you even start talking about a judge.&lt;/li>
&lt;li>&lt;strong>Iterate the judge prompt&lt;/strong> until judge agreement with the humans passes the accepted threshold (typically κ ≥ 0.7 for sensitive metrics).&lt;/li>
&lt;li>&lt;strong>Pin the judge version&lt;/strong> (&lt;code>claude-3-5-sonnet-20251022&lt;/code>, &lt;code>gpt-4o-2024-11&lt;/code>, &lt;code>prometheus-2-7b@sha256:…&lt;/code>): any change invalidates the calibration.&lt;/li>
&lt;li>&lt;strong>Recalibrate periodically&lt;/strong> — every time the judge, the judge prompt, or the rubric changes. The frequency the field recommends in 2026 is quarterly at minimum, monthly if the rubric is new.&lt;/li>
&lt;li>&lt;strong>Persist everything in lineage&lt;/strong> — a score of &amp;ldquo;faithfulness 0.87&amp;rdquo; with no traceability of which judge, which prompt, which calibration set and which human validated it, is decorative.&lt;/li>
&lt;/ol>
&lt;p>The &lt;a href="https://blog.lo0.es/en/posts/prompt-versioning-contract-five-word-change/">prompt versioning post&lt;/a> covers how judge prompt versioning is materialised. The practical consequence is that &lt;strong>the judge is versioned like any other model&lt;/strong>: your eval suite has &lt;code>judge_id = prometheus-2.5@v3&lt;/code> just as it has &lt;code>adapter_id = customer_support_v7&lt;/code>.&lt;/p>
&lt;h2 id="the-two-cadences-ci-gate-and-platform-regression">The two cadences: CI gate and platform regression&lt;/h2>
&lt;p>Eval suites live in two places and run on two different cadences. Teams that conflate them turn one of the two into theatre.&lt;/p>
&lt;p>&lt;strong>CI gate (pre-merge, blocking).&lt;/strong> It runs on every pull request that modifies prompts, adapters, RAG configuration, or any artefact that could move the model&amp;rsquo;s output. It runs against the golden dataset versioned at the hash that is on &lt;code>main&lt;/code>. The gate fails the merge if:&lt;/p>
&lt;ul>
&lt;li>the critical metric drops &lt;strong>more than X percentage points&lt;/strong> in absolute terms against the baseline (typically X = 2);&lt;/li>
&lt;li>some safety metric (toxicity, PII leakage) crosses a hard threshold (typically tox &amp;gt; 0.02);&lt;/li>
&lt;li>some strategic segment (a language, an enterprise-type tenant) drops more than Y points even if the aggregate improves.&lt;/li>
&lt;/ul>
&lt;p>This cadence has to be &lt;strong>fast&lt;/strong> (ideally &amp;lt; 10 minutes over 500 examples) and &lt;strong>cheap&lt;/strong> (LLM judge in batch mode, cached embeddings, heuristics run locally). The CI gate is not exhaustive: it is the low-latency line of defence.&lt;/p>
&lt;p>&lt;strong>Platform regression (post-deploy, continuous).&lt;/strong> It runs on a schedule (typically nightly or weekly) over &lt;strong>sampled production traffic&lt;/strong>, not over the static golden set. It detects drift: the model has not changed, the golden set has not changed, but the users have, and quality over real traffic drops. This cadence is more expensive (judge over thousands of samples, human annotation over hundreds), tolerates latencies of hours, and its main consumer is not CI but the &lt;a href="https://blog.lo0.es/en/posts/agentsight-llm-tracing-ebpf-zero-instrumentation/">observability&lt;/a> dashboard and the humans on the product team who decide whether to open a &lt;a href="https://blog.lo0.es/en/posts/retrain-closing-the-loop-feedback-dataset-adapter/">retrain&lt;/a> cycle.&lt;/p>
&lt;p>Both cadences persist results in the same store (Langfuse, MLflow, or equivalent) and connect them by &lt;code>model_id&lt;/code>, &lt;code>prompt_id&lt;/code>, &lt;code>dataset_hash&lt;/code> and &lt;code>judge_id&lt;/code>. Without that glue of identifiers, the metric that passes CI cannot be correlated with the one that fails in production three weeks later.&lt;/p>
&lt;h2 id="the-minimum-mathematics-that-matter">The minimum mathematics that matter&lt;/h2>
&lt;p>Beyond kappa and the interval for the difference of proportions, both already covered above, there are three more mathematical pieces that any team running evals seriously ends up using.&lt;/p>
&lt;p>&lt;strong>Confidence interval for a continuous metric.&lt;/strong> If your metric is a continuous score (faithfulness ∈ [0, 1]) and you measure the sample mean \(\bar{x}\) over n examples with standard deviation s, the 95% confidence interval for the population mean is:&lt;/p>
\[
\bar{x} \pm 1{.}96 \cdot \frac{s}{\sqrt{n}}
\]
&lt;p>For n = 300 and s ≈ 0.2 (typical of a 0-1 score with non-degenerate variance), the margin is ±0.023. This means that differences below 2 hundredths &lt;strong>cannot be distinguished&lt;/strong> from noise at that sample size. If your team is chasing &amp;ldquo;+0.5 pp&amp;rdquo; improvements over 100 examples, it is optimising noise.&lt;/p>
&lt;p>&lt;strong>Judge cost as a function of sample size and rubric.&lt;/strong> The cost of one eval pass with LLM-as-judge over n examples, with m metrics evaluated in a single call per example, and per-token price \(c_{in}, c_{out}\) on the judge model, is:&lt;/p>
\[
C \approx n \cdot (t_{in} \cdot c_{in} + t_{out} \cdot c_{out})
\]
&lt;p>where \(t_{in}\) is the number of input tokens (includes context, output of the model under test, full rubric) and \(t_{out}\) the output tokens (includes the judge&amp;rsquo;s CoT + score). For n = 500, \(t_{in}\) ≈ 4,000, \(t_{out}\) ≈ 300, a GPT-4o judge at May 2026 prices, one pass costs on the order of &lt;strong>8–15 USD per suite&lt;/strong>. If the pass fires on every PR and there are 30 PRs/day, that is 240–450 USD/day on CI gates alone. Multiplied by continuous regression, teams that do not control this spend four figures a month on judge tokens without realising. The canonical mitigation is a &lt;strong>mix of layers&lt;/strong>: heuristics and embeddings filter first, the judge is only invoked on what the cheap layers cannot resolve, and for platform regression a self-hosted open-source judge is used (Prometheus 7B on your own GPU plane) instead of a commercial model.&lt;/p>
&lt;p>&lt;strong>Distinction between aggregate metric and per-segment metric.&lt;/strong> The classic eval fallacy is the hidden mean. If your suite reports &lt;code>faithfulness = 0.87&lt;/code> and the team reads it as &amp;ldquo;up 2 points against the previous adapter&amp;rdquo;, this may be what is happening: the new adapter gains 4 points in English (where 70% of the eval set is) and loses 6 points in German (where 30% is). The aggregate mean improves, the German experience gets worse. Any serious suite reports a &lt;strong>breakdown by strategic segment&lt;/strong> (language, tenant type, question category, context length). The CI gate can also have per-segment thresholds, not just aggregate ones.&lt;/p>
&lt;h2 id="the-2026-stack-dominant-tools">The 2026 stack: dominant tools&lt;/h2>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Tool&lt;/th>
&lt;th>Main layer&lt;/th>
&lt;th>Licence&lt;/th>
&lt;th>Maintainer&lt;/th>
&lt;th>When to pick it&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;strong>DeepEval&lt;/strong>&lt;/td>
&lt;td>CI gate&lt;/td>
&lt;td>Apache 2.0&lt;/td>
&lt;td>Confident AI&lt;/td>
&lt;td>&amp;ldquo;Evals as pytest&amp;rdquo; — assertions in Python code, trivial integration with GitHub Actions. A reasonable default.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Promptfoo&lt;/strong>&lt;/td>
&lt;td>CI gate&lt;/td>
&lt;td>MIT&lt;/td>
&lt;td>Promptfoo Inc.&lt;/td>
&lt;td>Declarative YAML, matrix of prompts × providers × assertions, diff vs baseline. DevOps-friendly.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>RAGAS&lt;/strong>&lt;/td>
&lt;td>RAG-specific metrics&lt;/td>
&lt;td>Apache 2.0&lt;/td>
&lt;td>Exploding Gradients&lt;/td>
&lt;td>Faithfulness, context relevancy, answer relevancy. The canonical piece if your system is RAG.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Inspect AI&lt;/strong>&lt;/td>
&lt;td>Safety/capability evals&lt;/td>
&lt;td>MIT&lt;/td>
&lt;td>UK AI Safety Institute&lt;/td>
&lt;td>Suite focused on safety and capability. Useful for regulatory gates under the EU AI Act.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Langfuse Evals&lt;/strong>&lt;/td>
&lt;td>Platform regression&lt;/td>
&lt;td>MIT (OSS) / EE&lt;/td>
&lt;td>Langfuse GmbH&lt;/td>
&lt;td>Integrated with tracing — datasets, runs and scores in the same UI as production traces.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>MLflow GenAI Evals&lt;/strong>&lt;/td>
&lt;td>Registry + evals&lt;/td>
&lt;td>Apache 2.0&lt;/td>
&lt;td>Databricks/LF AI&lt;/td>
&lt;td>Good when you already have MLflow for classic models; &amp;ldquo;GenAI dashboard&amp;rdquo; since 3.10.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Phoenix (Arize)&lt;/strong>&lt;/td>
&lt;td>Eval + visual drift&lt;/td>
&lt;td>Elastic License 2.0&lt;/td>
&lt;td>Arize AI&lt;/td>
&lt;td>Focused on visual debugging of embeddings and drift; a complement to Langfuse, not a replacement.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Prometheus 2.5&lt;/strong>&lt;/td>
&lt;td>Self-hosted OSS judge&lt;/td>
&lt;td>Apache 2.0&lt;/td>
&lt;td>KAIST + LG AI&lt;/td>
&lt;td>Fine-tuned judge, high correlation with GPT-4 at zero cost per token when self-hosted.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>G-Eval / JudgeLM&lt;/strong>&lt;/td>
&lt;td>Prompting methods&lt;/td>
&lt;td>— (techniques)&lt;/td>
&lt;td>academic&lt;/td>
&lt;td>Prompting frameworks for LLM-as-judge — they apply on top of any judge model.&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>The &lt;a href="https://blog.lo0.es/en/posts/oss-catalogue-llmops-six-stages-tool-by-tool/">OSS catalogue by stage&lt;/a> goes into detail entry by entry; the &lt;a href="https://blog.lo0.es/en/posts/parallel-catalogue-llmops-stages-open-source-hyperscalers/">parallel OSS vs hyperscalers catalogue&lt;/a> compares against Bedrock Evaluations, Vertex AI Eval Service and Azure AI Evaluation.&lt;/p>
&lt;p>The canonical pattern in 2026 is hybrid: &lt;strong>DeepEval or Promptfoo for CI gates + Langfuse Evals for platform regression + Prometheus 2.5 as a self-hosted judge + human annotation on Argilla or Label Studio for the calibration set&lt;/strong>. Swapping any of these pillars for equivalents (W&amp;amp;B Weave instead of Langfuse, Inspect instead of DeepEval) is style, not functionality; what matters is that the four functions are present and connected.&lt;/p>
&lt;h2 id="applied-to-typical-on-premise-hardware">Applied to typical on-premise hardware&lt;/h2>
&lt;p>For an on-premise deployment that wants to avoid sending sensitive outputs to a commercial LLM judge (for data sovereignty, ENS, NIS2 or equivalents), the judge is hosted on your own GPU plane. Reference figures for May 2026, based on &lt;strong>Prometheus 2.5 (Llama-3.1-8B fine-tuned as a judge)&lt;/strong> served on vLLM:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>RTX 4090 (24 GB, Ada Lovelace)&lt;/strong>: viable for small suites (&amp;lt; 200 examples) and for running the judge offline during development. Latency per evaluation ≈ 1.5–3 s with BF16; aggregate throughput on the order of 25–40 evaluations/min with batching. Useful for a developer&amp;rsquo;s local CI gates, not for platform regression.&lt;/li>
&lt;li>&lt;strong>Generic 4×H100 SXM configuration (320 GB total, NVLink)&lt;/strong>: runs the judge in parallel at TP=2 across two GPUs, leaving two free to serve the model under test. Aggregate throughput on the order of 200–350 evaluations/min, a full 500-example suite in 2–3 min. This allows PR gates with no perceptible waiting and nightly platform regression over thousands of samples with no per-token cost.&lt;/li>
&lt;/ul>
&lt;p>The comparative cost arithmetic is stubborn: self-hosting Prometheus 2.5 pays off an H100 in roughly 6 months &lt;strong>if the team fires ≥ 30 PRs/day with eval gates&lt;/strong>. Below that volume, the commercial judge still wins unless sovereignty is a requirement, and under ENS / NIS2 it is.&lt;/p>
&lt;h2 id="the-seven-pitfalls-that-kill-this-stage">The seven pitfalls that kill this stage&lt;/h2>
&lt;p>&lt;strong>Pitfall 1 — Aged golden dataset.&lt;/strong> It is not enriched with production incidents. After months it measures a world that no longer exists. The metric climbs comfortably while real users complain more.&lt;/p>
&lt;p>&lt;strong>Pitfall 2 — Contaminated or uncalibrated judge.&lt;/strong> The LLM judge evaluates with criteria it invents itself. Without a human calibration set as reference, there is no way to know whether its 0.89 is generous, severe or random.&lt;/p>
&lt;p>&lt;strong>Pitfall 3 — Insufficient sample size.&lt;/strong> A 50-example suite, 1-point differences the team treats as significant. The confidence interval is ±10 points. They are measuring noise and making real decisions on it.&lt;/p>
&lt;p>&lt;strong>Pitfall 4 — Runaway cost.&lt;/strong> A GPT-4 batch-mode judge fired on every PR over 1,000 examples, with no prior filtering by cheap layers. The eval bill overtakes production serving. It happens more often than people admit.&lt;/p>
&lt;p>&lt;strong>Pitfall 5 — Aggregate metric hiding segments.&lt;/strong> Global mean improves 2 points, German drops 6, enterprise tenants drop 3. With no explicit per-segment breakdown, the gate approves what it should not.&lt;/p>
&lt;p>&lt;strong>Pitfall 6 — Judge with a floating version.&lt;/strong> Judge model updated without recalibrating the rubric. Thresholds lose their statistical meaning. Last month&amp;rsquo;s regressions are not comparable with those from two months ago.&lt;/p>
&lt;p>&lt;strong>Pitfall 7 — Eval gate that is not enforced.&lt;/strong> The gate exists in the documentation but not in the real workflow: the suite takes 30 minutes, developers skip it with &lt;code>--no-verify&lt;/code>, managers ask for one-off exceptions that become the norm. An eval gate without enforcement is ornament.&lt;/p>
&lt;p>All seven are operational, not technical. The Eval layer does not break because the mathematics are wrong: it breaks because the discipline slackens. It is the same thing that happens with unit tests in any project that grows, except that here, without the discipline, the system &lt;strong>improves its metrics while getting worse&lt;/strong>, and that makes the degradation invisible until it is already ungovernable.&lt;/p>
&lt;h2 id="what-we-have-not-covered-upcoming-posts">What we have not covered (upcoming posts)&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>Guardrails and online safety&lt;/strong>: the &lt;strong>inline&lt;/strong> eval layer that filters outputs in real time, not in CI. Conceptually a cousin of Eval, but with very different latency constraints. Covered in detail in the &lt;a href="https://blog.lo0.es/en/posts/llm-guardrails-safety-four-lines-of-defence/">guardrails post&lt;/a>: four lines of defence (input, retrieval, tool, output), OWASP LLM Top 10 (2025), OSS catalogue and deployment patterns.&lt;/li>
&lt;li>&lt;strong>Judge ensembles and agreement between multiple judges&lt;/strong>: how to reduce bias by combining three heterogeneous models as a panel, which aggregation function works (simple majority, trimmed mean, calibrated meta-judge).&lt;/li>
&lt;li>&lt;strong>Meta-eval&lt;/strong>: how you evaluate the suite itself. If the eval improvement from adapter v7 to v8 does not translate into a real improvement for the user, the suite is wrong, and that is also measured, by correlating eval metrics against product metrics.&lt;/li>
&lt;li>&lt;strong>Metamorphic testing&lt;/strong>: evaluating robustness against input perturbations (typos, paraphrasing, alternative language) as an extra gate. Beyond nominal agreement, it measures consistency.&lt;/li>
&lt;li>&lt;strong>Adversarial evals with red teaming&lt;/strong>: introducing prompt injection and jailbreak attacks as part of the gate.&lt;/li>
&lt;li>&lt;strong>Privacy in the judge&lt;/strong>: how to stop sensitive outputs from the model under test travelling to an external judge when regulation forbids it — homomorphic judge, judge in a TEE, or simply a self-hosted judge.&lt;/li>
&lt;/ul>
&lt;h2 id="see-also">See also&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/six-stage-llmops-pipeline-architecture-and-deep-dive/">The six-stage LLMOps pipeline&lt;/a> — the master map where Eval sits between Tune and Deploy. The &amp;ldquo;Stage 3 — Eval&amp;rdquo; section gives the structured summary this post develops.&lt;/li>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/anatomy-llm-request-production-tour-six-stages/">Anatomy of a production LLM request, May 2026&lt;/a> — the forensic tour of a request crossing the six stages; the moment the eval suite is invoked to promote adapter v7→v8 is the materialisation of the gate described here.&lt;/li>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/prompt-versioning-contract-five-word-change/">Prompt versioning: the contract that stops a five-word change sinking your system&lt;/a> — judge prompts are versioned with the same mechanisms as any other prompt. The &lt;code>prompt_id&lt;/code> travels in lineage.&lt;/li>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/data-versioning-llmops-dvc-lakefs-reproducible-golden-dataset/">Data versioning: DVC, lakeFS and the reproducible golden dataset challenge&lt;/a> — the golden eval set is one of the four artefacts to version differently. Without a strict holdout, the metric measures memorisation.&lt;/li>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/continuous-fine-tuning-production-real-traffic-deployed-adapter/">Continuous fine-tuning in production&lt;/a> — the eval gates that appear in that post as SQL predicates are the concrete materialisation of the framework described here.&lt;/li>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/retrain-closing-the-loop-feedback-dataset-adapter/">Retrain: closing the loop between the production incident and the adapter that fixes it&lt;/a> — the golden set is enriched with incidents coming from the Retrain loop; without that flow the dataset ages and pitfalls 1 and 5 trigger by themselves.&lt;/li>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/oss-catalogue-llmops-six-stages-tool-by-tool/">The OSS catalogue for LLMOps in six stages&lt;/a> — entry-by-entry write-ups of DeepEval, Promptfoo, RAGAS, Langfuse, Phoenix.&lt;/li>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/parallel-catalogue-llmops-stages-open-source-hyperscalers/">The parallel catalogue: OSS vs AWS / GCP / Azure&lt;/a> — how the Eval stage translates to Bedrock Evaluations, Vertex AI Eval Service and Azure AI Evaluation.&lt;/li>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/llm-as-judge-exam-marker-not-oracle/">LLM-as-judge: the examination marker&lt;/a> — the judge piece of this mixed board taken apart in depth. G-Eval, Prometheus 2, panel of judges, the four biases (position, verbosity, self-preference, narcissism) and calibration with Cohen&amp;rsquo;s kappa.&lt;/li>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/modern-alignment-dpo-kto-orpo-simpo/">Modern alignment: DPO, KTO, ORPO and SimPO&lt;/a> — the judge calibrated by the techniques here produces the preference pairs that enter as an alignment dataset. Closing the Eval → Tune loop.&lt;/li>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/llm-tracing-opentelemetry-genai/">LLM tracing with OpenTelemetry GenAI&lt;/a> — the capture substrate on which continuous eval runs. The traces that tail sampling preserves (errors, high latencies, guardrail blocks) are the natural input for the judge in production.&lt;/li>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/langfuse-inside-sorting-centre-bottleneck/">Langfuse from the inside: v3 architecture and the 10 backend knobs&lt;/a> — the datasets and evaluators designed here rest on the Langfuse backend (ClickHouse + Postgres); that post explains how to size and tune it so it withstands the trace volume feeding the eval.&lt;/li>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/structured-output-bitmask-outlines-xgrammar-llguidance/">Structured output&lt;/a> — LLM-as-judge evals benefit enormously from guaranteed structured output: a &lt;code>{score, justification, pass}&lt;/code> verdict that parses 100 % of the time removes retries and simplifies storage in the data warehouse for longitudinal analysis.&lt;/li>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/llm-guardrails-safety-four-lines-of-defence/">Guardrails and safety in LLMs&lt;/a> — the sibling layer at runtime. Same categories as those evaluated offline here (toxicity, PII, prompt injection, jailbreak, groundedness) but with a latency budget of 30-150 ms and compact models (PromptGuard 2, Llama Guard 4, Granite Guardian, ShieldGemma) instead of large judges.&lt;/li>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/canary-blue-green-shadow-llm-models/">Canary, blue-green and shadow for LLM models&lt;/a> — the eval suite designed here is the gate &lt;strong>before&lt;/strong> the canary; unless the suite has passed offline on the candidate model, the rollout does not start.&lt;/li>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/evaluating-rag-ragas-golden-dataset-metrics/">Evaluating a RAG without fooling yourself: RAGAS, the golden dataset and the four metrics that matter&lt;/a> — the specialisation of this post&amp;rsquo;s eval framework for RAG systems; faithfulness, context precision and context recall are the eval gate metrics when the system has retrieval.&lt;/li>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/llm-quality-benchmarks-contamination-trap-oss-tools/">LLM quality benchmarks: MMLU, MT-Bench, HELM and the leaderboards that matter&lt;/a> — the external benchmarks that serve as a reference for calibrating whether internal evals are measuring the same thing as the field.&lt;/li>
&lt;/ul>
&lt;h2 id="references">References&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>G-Eval&lt;/strong>: Liu et al., &amp;ldquo;G-Eval: NLG Evaluation using GPT-4 with Better Human Alignment&amp;rdquo; — the reference paper for the chain-of-thought LLM judge method.&lt;/li>
&lt;li>&lt;strong>Prometheus&lt;/strong>: Kim et al., &amp;ldquo;Prometheus 2: An Open Source Language Model Specialized in Evaluating Other Language Models&amp;rdquo; — OSS judge with a reported 0.897 correlation vs humans.&lt;/li>
&lt;li>&lt;strong>RAGAS&lt;/strong>: Es et al., &amp;ldquo;RAGAS: Automated Evaluation of Retrieval Augmented Generation&amp;rdquo; — the paper that standardises faithfulness, context relevancy and answer relevancy.&lt;/li>
&lt;li>&lt;strong>Cohen&amp;rsquo;s kappa&lt;/strong>: Cohen, J. (1960). &amp;ldquo;A Coefficient of Agreement for Nominal Scales.&amp;rdquo; Educational and Psychological Measurement — the classic metric for inter-annotator agreement, still the operational reference.&lt;/li>
&lt;li>&lt;strong>DeepEval docs&lt;/strong>: &lt;a href="https://docs.confident-ai.com/">https://docs.confident-ai.com/&lt;/a>&lt;/li>
&lt;li>&lt;strong>Promptfoo docs&lt;/strong>: &lt;a href="https://promptfoo.dev/docs/">https://promptfoo.dev/docs/&lt;/a>&lt;/li>
&lt;li>&lt;strong>Langfuse Evals&lt;/strong>: &lt;a href="https://langfuse.com/docs/scores">https://langfuse.com/docs/scores&lt;/a>&lt;/li>
&lt;li>&lt;strong>Inspect AI&lt;/strong>: &lt;a href="https://inspect.ai-safety-institute.org.uk/">https://inspect.ai-safety-institute.org.uk/&lt;/a>&lt;/li>
&lt;li>&lt;strong>EU AI Act&lt;/strong>, relevant articles on mandatory evaluation of high-risk systems — pending publication of the CEN/CENELEC technical standards on conformity assessment for GenAI.&lt;/li>
&lt;/ul></description></item></channel></rss>