LLM-as-a-Judge for AI Agents: Stanford's 2026 Framework
Stanford's CS329 lecture lays out how to grade non-deterministic agent outputs with LLM-as-a-judge. Here's how to build rubrics, where judges disagree with humans, and how to combine it with task-success metrics.
LLM-as-a-judge is an evaluation technique where one large language model scores another model's output against a written rubric, instead of a human doing it or a word-overlap metric like BLEU. For AI agent evaluation, it matters because agent outputs are non-deterministic: the same task can succeed through ten different trajectories, and a pass/fail assertion can't tell a good answer from a lucky one. Stanford's CS329 lecture, published 28 November 2026 and already pulling roughly 16.6k views a day, makes that case head-on.
The lecture is taught by John Yang, one of the co-creators of SWE-bench. That detail should make you pay attention. This is the person who built the benchmark half the industry now cites for coding agents, telling you that benchmarks alone stop working once agents get interesting. The gap between what the leaderboards measure and what you actually ship is exactly where judge models earn their keep.
Key takeaways
- LLM-as-a-judge scores open-ended agent outputs against a rubric, which pass/fail tests and BLEU/ROUGE cannot do for non-deterministic trajectories.

- A judge model is only as reliable as its rubric: vague criteria produce confident, wrong scores that correlate with nothing.
- GPT-4-class judges hit roughly 80% agreement with humans on MT-Bench, which is also the human-to-human agreement ceiling.
- Judge scores belong on top of task-success metrics, not instead of them. Grade the outcome deterministically, grade the quality with a judge.
- The tooling has consolidated fast: Promptfoo (27.8k stars) was acquired by OpenAI in 2026 while OpenAI's own evals repo went stale.
Why task-success metrics aren't enough for agents
For a classifier, evaluation is easy. You have labels, you compute accuracy, you move on. For an AI agent that plans, calls tools, retrieves documents, and hands off to sub-agents, "correct" stops being a single bit.

Take a research agent asked to condense a company's Q3 filing into a one-page brief. Did it succeed? A task-success check can verify that it produced output and cited the right document. It cannot tell you whether the brief buried the one number that mattered, hallucinated a growth figure, or padded three paragraphs of filler. Those are quality judgments, and quality is where agents fail in production.
The older automatic metrics are worse here, not better. BLEU and ROUGE measure n-gram overlap against a reference answer. They were built for machine translation, and they reward you for reusing the same words as the gold text. So an agent can write a factually perfect brief that shares almost no vocabulary with your reference and score terribly. The metric rewards mimicry, not meaning.
A judge model is only as good as its rubric. Vague criteria produce confident nonsense. Pin every score to an observable behavior.
This is why the field moved toward LLM-as-a-judge. You hand a capable model the output, a rubric, and optionally the input, and ask it to score. It reads for meaning, not word overlap. I've written before about the 8 metrics beyond task success that actually predict production behavior, and nearly all of them need a judge, not an assertion, to measure.
How Stanford frames LLM-as-a-judge AI agent evaluation
The CS329 framing is refreshingly practical. Yang doesn't treat LLM-as-a-judge as a replacement for benchmarks. He treats it as the layer you reach for when the thing you care about is subjective, open-ended, or trajectory-dependent, which describes almost every real agent task.

The lecture breaks grading into three postures. Reference-based: the judge compares the output to a known-good answer. Reference-free: the judge scores the output against a rubric with no gold answer, useful when there is no single right answer. Pairwise: the judge picks the better of two outputs, which is more reliable than asking for an absolute 1-to-10 score because models are better at ranking than at calibrating.
That last point is the one people skip and regret. Absolute scores drift. Ask the same judge to rate ten outputs on a 10-point scale and you'll see it cluster everything between 6 and 8. Ask it which of two outputs is better and the signal sharpens considerably. The MT-Bench work from Lianmin Zheng and collaborators documented exactly this bias, along with the position bias where judges favor whichever answer appears first.
Here's the official IBM breakdown of how this scales, which pairs well with the lecture:
For a full tour of how to structure this across levels of an agent, the piece on how to evaluate AI agents in production walks through the three-level framework that LLM-as-a-judge slots into.
Building a rubric a judge model can actually follow
The rubric is the whole game. I cannot say this strongly enough: a judge model with a vague rubric is a random number generator with a vocabulary.
A bad rubric says "rate the helpfulness of this response from 1 to 10." Helpfulness means nothing to a model without anchors, so it defaults to vibes and the scores are noise. A good rubric decomposes the quality you care about into observable, binary-ish criteria:
- Does the output answer the exact question asked, or a nearby one? Agents drift toward the question they can answer.
- Is every factual claim supported by the retrieved context? This is your hallucination check, and it maps directly to RAG faithfulness.
- Did the agent call the right tools in a sensible order? Trajectory quality, not just final answer.
- Is the output free of unsupported confidence? Hedging when it should hedge.
- Would a domain expert sign off on this without edits? The ship-it bar.
Each criterion gets a short definition and, ideally, one positive and one negative example in the prompt. Few-shot anchors move judge agreement more than almost anything else you can do. Then you ask the judge to produce a reason before the score, because forcing the chain-of-thought first improves calibration and gives you something to audit when a score looks wrong.
When I built the review stage of this blog's own agent orchestration pipeline, one lesson held up above the rest: a deterministic quality gate in front of the LLM reviewer caught more real problems than doubling the review model's size would have. The judge handles taste. Hard rules handle correctness. Don't make the judge do a regex's job.
Where judge models disagree with humans
Nobody wants to hear this part, but you need to measure your judge before you trust it. A judge that disagrees with your human raters is not giving you a free evaluation. It's giving you a confident lie at scale.
The optimistic headline is real: in the MT-Bench study, a GPT-4-class judge reached over 80% agreement with human preferences, which happens to be about the same rate at which two humans agree with each other. In other words, the ceiling for agreement is not 100%, because humans themselves disagree 20% of the time on open-ended quality. Your judge does not need to be perfect. It needs to be as consistent as your human panel.
But the known failure modes are specific, and you should test for all of them:
- Position bias: the judge prefers the first (or last) option in a pairwise comparison. Mitigate by running both orderings and averaging.
- Length bias: longer answers get higher scores regardless of quality. Judges confuse verbosity with thoroughness.
- Self-preference: a model judging its own family's outputs tends to rate them higher. Use a different model family as judge than the one under test when you can.
- Sycophancy: tell the judge the output came from an expert and watch the score climb.
The right workflow is to assemble a small golden set, maybe 100 to 200 examples, that your humans have already graded. Run the judge against it, compute agreement with Cohen's kappa rather than raw accuracy so chance agreement doesn't flatter you, and only then let it loose on the other 10,000 cases.
What counts as good? A kappa above 0.6 is usually treated as substantial agreement. Below 0.4 and your judge is barely beating coin flips on the examples that actually matter, which are the ambiguous ones. Recompute it every time you change the rubric or swap the judge model. A prompt tweak that helps one criterion can quietly wreck another, and a single aggregate number hides that. The guide on how to start an AI agent evaluation program builds this calibration step directly into a five-task scorecard.
The tooling: DeepEval, Promptfoo, and Ragas
The open-source eval ecosystem consolidated hard in 2026, and where you place your bets matters. Here's the honest state of the three frameworks most teams are choosing between, by GitHub stars and recent activity:
| Framework | Stars | License | Agent trajectory grading | Status (late 2026) |
|---|---|---|---|---|
| Promptfoo | 27,791 | MIT | Yes, via LLM judges | Acquired by OpenAI 2026, still OSS, pushed 2026-11-28 |
| DeepEval | 19,723 | Apache-2.0 | Yes, trajectories + individual steps | Actively maintained, pushed 2026-11-27 |
| Ragas | 16,451 | Apache-2.0 | Coming Soon (roadmap) | v0.4.4, 2026-11-14 |
| OpenAI evals | 19,820 | MIT | Limited | Stale, last push 2026-04-14 |
Two things jump out. First, DeepEval is the one built for agents specifically. It implements LLM-as-a-judge alongside G-Eval and can grade complete agent trajectories and individual steps: the LLM call, the tool use, the retrieval, the sub-agent handoff. That step-level grading is exactly what you need when a multi-agent system fails and you need to know which hop broke.
Second, the consolidation signal is loud. Promptfoo, which markets itself as powering apps serving 10M+ users and is used inside OpenAI and Anthropic, was acquired by OpenAI in 2026 and remains open source. Meanwhile OpenAI's own openai/evals repo hasn't shipped since April 2026. Read that again: OpenAI bought the better third-party judge framework rather than fix its first-party one. And Ragas, one of the strongest RAG eval toolkits, still lists agent_evals as "Coming Soon" on its roadmap, which tells you dedicated agent grading is an emerging need the field hasn't fully solved. If you want a deeper head-to-head, the LLM eval frameworks comparison breaks down the tradeoffs.
Combining judge scores with task-success metrics
LLM-as-a-judge is not a substitute for deterministic checks. The strongest agent evaluation setups run both, in a specific order.
Start with the cheap, hard metrics. Did the task complete? Did the tool return a 200? Did the output parse as valid JSON? Did the agent finish inside its LLM cost and latency budget? These are binary, they're free, and they catch the catastrophic failures that make judge scoring moot. A response that never returned doesn't need a quality rating.
Then layer the judge on the survivors. Of the trajectories that completed, which produced good answers? This is where the rubric runs. The judge output becomes one dimension in a scorecard that also includes latency, token count, tool-call accuracy, and task success. No single number. A vector.
There's a cost argument for this ordering too. A judge pass is a second model call on every output you grade, so the cheap gate's real job is shrinking the set the judge ever sees. Running a Sonnet-class judge on every surviving trajectory is affordable at the rates I track on the site's LLM pricing tracker. Running a frontier judge over all 10,000 raw traces, most of which failed a parse check anyway, is money set on fire. Grade order is a budget decision, not only a correctness one.
The deeper reason to keep the two layers separate is debuggability. When a score drops, you want to know instantly whether the agent got slower, started failing tasks, or started producing worse answers to tasks it still technically completes. Collapse everything into one judge score and you lose that signal. Running production AI at this blog's pipeline level drilled the same point in: separate layers tell you where to look when a number moves, and a deterministic gate traces a regression to a cause faster than any single blended score can.
If you're evaluating agentic AI systems that self-modify, like Stanford's own ACE method for self-improving agents, this separation becomes non-negotiable. The agent is changing its own behavior, and you need to distinguish "it got smarter" from "it learned to game the judge."
What I'd build if I started today
If I were standing up agent evaluation from scratch tomorrow, I'd do three things in this order. Build a 150-example golden set graded by two humans and keep it version-controlled. Pick DeepEval for step-level trajectory grading because that's where it's strongest, and calibrate its judge against the golden set with Cohen's kappa before trusting a single automated score. Then wire the judge behind a deterministic gate so cheap checks fail fast and the judge only grades what survives.
The uncomfortable truth John Yang's lecture circles is that we're grading intelligence with intelligence, and the judge inherits the student's blind spots. As Simon Willison has pointed out repeatedly about evals, the teams that win aren't the ones with the fanciest judge prompt. They're the ones who actually look at their outputs. Measure your judge the way you'd measure your agent. If you can't show it agrees with humans on your task, you don't have an evaluation. You have a vibe with a decimal point.
The next twelve months will decide whether agent grading becomes a solved, boring layer like unit testing, or stays the thing everyone fakes. Ragas shipping agent_evals is the tell to watch. When the top RAG framework finishes its agent-grading tooling, the excuse for shipping ungraded agents disappears.
Photo by litoon dev on Unsplash.
Kunal Ganglani (2026, November 29). LLM-as-a-Judge for AI Agents: Stanford's 2026 Framework. Kunal Ganglani. Retrieved November 29, 2026, from https://www.kunalganglani.com/blog/llm-judge-ai-agent-evaluation
Frequently Asked Questions
What is LLM-as-a-judge in AI agent evaluation?
It's a technique where a capable language model scores another model's or agent's output against a written rubric. For agents, it grades qualities that pass/fail tests can't capture, like answer faithfulness, trajectory quality, and whether a domain expert would ship the result. It's a scalable, cheaper alternative to human annotation.
How accurate is an LLM judge compared to human raters?
In the MT-Bench study, a GPT-4-class judge agreed with human preferences over 80% of the time, which is roughly the same rate at which two humans agree with each other. You should always calibrate your own judge against a human-graded golden set using Cohen's kappa before trusting its scores at scale.
What are the main biases of LLM judges?
The documented failure modes are position bias (favoring the first option shown), length bias (rating longer answers higher regardless of quality), self-preference (rating its own model family higher), and sycophancy (scoring higher when told the output came from an expert). Mitigate position bias by averaging both orderings and use a different model family as judge than the one under test.
Should LLM-as-a-judge replace task-success metrics?
No. Run cheap deterministic checks first, like did the task complete, did tools return valid responses, did output parse correctly. Then apply the judge only to outputs that survive those gates to assess quality. Keeping them separate makes regressions debuggable: you can tell whether the agent got slower, started failing, or started producing worse answers.
Which open-source framework is best for grading AI agents?
DeepEval (19.7k stars) is the strongest for agents specifically, since it grades complete trajectories and individual steps like tool use and retrieval. Promptfoo (27.8k stars, acquired by OpenAI in 2026) is excellent for broad LLM evals and red teaming. Ragas leads on RAG evaluation but still lists dedicated agent grading as coming soon on its roadmap.
How do you write a good rubric for an LLM judge?
Decompose the quality you care about into specific, observable criteria rather than vague labels like 'helpfulness.' Give each criterion a short definition plus one positive and one negative example in the prompt. Ask the judge to write its reasoning before producing a score, which improves calibration and lets you audit any score that looks wrong.



