Coders In Hoods
  • Courses
  • Roles
  • Blog
  • Setup

Coders In Hoods AI Academy

Every course is free. Sign in to start, and your progress, quiz scores and bookmarks follow you.

AI Academy

  • Courses
  • Paths
  • Setup guides
  • How we teach

Role roadmaps

  • AI Engineer
  • Forward Deployed Engineer
  • Machine Learning Engineer
  • All roles

Coders In Hoods

  • The agency
  • Coaching for teams
  • Blog
  • LinkedIn
  • X (Twitter)

Contact

codersinhoods@gmail.com

© Coders In Hoods · since 2019

Course overview

Evaluating and Scoring Agents

Free · sign in to start and track progress

1 · Foundations of evaluation

  • 1Why evals, and their vocabulary
  • 2Error analysis from traces
  • 3Code-based graders

    Exercise answers

    • Answer: Write five eve evals for the enquiries agent
    • Answer: Mutation-test your graders

2 · Scoring that you can trust

  • 4LLM-as-judge
  • 5Calibrating judges
  • 6Rubrics per task
  • 7Statistics, trials and CI gates
CapstoneA full eval suite for your drafting agentReference implementation

Module 1 · Foundations of evaluation · Lesson 3

Code-based graders

Grade everything that can be checked mechanically, from schemas and tool calls to grounded quotes, approval gates and final state, using eve evals, tool stubs and Claude Code headless runs.

75 min 1 video 3 exercises 7-question quiz Answers
Setup for the exercises:Install Claude CodeDurable agents with eveGet an OpenRouter keyLocal models with OllamaNode.js, pnpm and TypeScript

By the end of this lesson you can

  • Design agent outputs so that the important properties can be checked with code
  • Write eve evals with defineEval, scoped tool assertions, value assertions, t.score and t.require, and choose gate or soft severity for each
  • Use tool stubs to serve fixtures, inject tool errors and keep side effects from running
  • Assert that a high-stakes side effect is waiting for human approval rather than executed
  • Grade a Claude Code headless run from its structured output and event stream, and test the graders themselves

On this page

  • Design outputs that can be graded
  • What code can check
  • Outcomes over paths
  • Tool stubs: control the world the agent sees
  • Worked example: one task, five graders
  • Partial credit, computed
  • Testing failure handling
  • Running it
  • The same graders in Claude Code
  • Test your graders
  • Misconceptions and limits
  • Summary
  • Sources & further reading
  • Quiz

In this lesson

  1. 01Design outputs that can be graded
  2. 02What code can check
  3. 03Tool stubs: control the world the agent sees
  4. 04Worked example: one task, five graders
  5. 05Running it
  6. 06The same graders in Claude Code
  7. 07Test your graders
  8. 08Misconceptions and limits
  9. 09Summary

Sources & further reading

  • SWE-bench: Can Language Models Resolve Real-World GitHub Issues?Paper · Carlos E. Jimenez et al. · 2023The best-known code-graded agent benchmark: 2,294 real GitHub issues, judged by running the repository's tests on the agent's patch. A model for outcome grading.
  • τ-bench: A Benchmark for Tool-Agent-User Interaction in Real-World DomainsPaper · Shunyu Yao, Noah Shinn, Pedram Razavi, Karthik Narasimhan · 2024Grades tool-using agents by comparing the final database state with the goal state, which is the pattern behind state-based assertions.
  • Demystifying evals for AI agentsLab research · Mikaela Grace, Jeremy Hadfield, Rodrigo Olivares, Jiri De Jonghe · Anthropic · 2026The code-based grader section (string, schema, outcome and tool-call checks), the advice to grade outcomes over paths, and partial credit.
  • eve docs: AssertionsDocs · VercelEvery scoped assertion, the matcher mini-language, t.check builders, t.score, t.require and severity. Keep it open while writing evals.
  • eve docs: Tool stubsDocs · VercelFixed tool outcomes, sequences, argument matching, injected errors and the allowToolStubs permission.
  • Claude Code docs: Run Claude Code programmaticallyDocs · Anthropicclaude -p, --output-format json and stream-json, --json-schema and the structured_output field, and why --bare needs an API key.
Free · sign in to start

Sign in to keep reading.

Free, no card. We use your account to save progress, quiz scores, bookmarks and occasionally send updates from our team.

  • 9 more sections
  • 3 hands-on exercises
  • A 7-question quiz
  • Progress, quiz scores and bookmarks