Stanford Online

LLM-as-a-Judge: How to Grade AI Agents | Stanford CS329Z Lecture 13 with John Yang

Published 2026-11-28 · Duration 1:20:02

Summary

This lecture explores the methodology of using Large Language Models (LLMs) as judges to evaluate AI agents, covering the three primary grading types: unit tests, human annotation, and LLM-as-a-Judge. Key challenges discussed include LLM biases (e.g., positional or length bias) and non-determinism in agentic tasks. The session details advanced metrics like pass@k and pass^k to accurately report performance across multiple rollouts, emphasizing that the choice of metric is highly dependent on the task's nature.

Download summary

Key takeaways

  1. Three Types of Graders 1:41

    Evaluation methods fall into three categories: deterministic unit tests (fast, cheap, but limited in nuance), human annotation (expensive, but high fidelity), and LLM-as-a-Judge (a scalable stand-in for human effort).

  2. LLM-as-a-Judge Lineage 6:07

    The use of LLMs for grading evolved from replacing traditional NLP metrics (like Blue Score) to simulating human actions (e.g., GDP Val, MT-Bench) and, most recently, acting as an agent to grade trajectories (e.g., Web Voyager).

  3. Handling Non-Determinism 21:13

    For agentic tasks with multiple rollouts, reporting performance requires metrics beyond simple averaging. Pass@k measures the likelihood of solving the task at least once within k trials, while pass^k requires success on every single trial.

More digests on AI Agent Evaluation

Technical details

  • Evaluation Biases 1563s

    LLM judges exhibit biases, such as positional bias (favoring Answer A over Answer B) and length bias (favoring verbose completions), which necessitates mitigation strategies like applying length penalties to the post-training objective.

  • Benchmarking Paradigms 336s

    Benchmarks like SWE-bench and Terminal Bench rely on programmatic, deterministic unit tests. In contrast, tasks like Chatbot Arena and GDP Val require human or LLM judgment due to the large, non-exact solution space.

  • Agentic Grading (LLM as Agent) 1843s

    In complex domains (e.g., web or OS interaction), the LLM can be used as an agent to generate a grading trajectory (e.g., a random walk on a website) which serves as verification, replacing the need for original source code.

  • Reward Modeling 1143s

    The process of training a reward model involves collecting human preference data (tuples of Output A vs. Output B) and training the model to predict which output the human preferred, thereby removing the human from the training loop.

Mentioned resources

  • Grace et al., “Demystifying Evals for AI Agents,” Anthropic (Reading)
  • Zheng et al., “Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena,” NeurIPS (Reading)
  • Ryan et al., “AutoMetrics: Approximate Human Judgements with Automatically Generated Evaluators,” ICLR (Reading)

Channel & topics

Watch on YouTube · Back to latest

This independent, AI-assisted summary is provided for commentary and informational purposes. It may contain errors or omit important context. Please watch the original video for the creator's complete presentation. Video, thumbnail, and related copyrights belong to their respective owners.