Grading coding agents: tests, rubrics or an LLM judge
AutoRouter9 min read
Key facts
- Ramp grades its private SWE-Bench with LLM judges that compare each candidate patch with the engineer-reviewed patch that shipped; engineers agreed with nearly 90% of the judges' task-level verdicts (Ramp, read November 25, 2026).
- In a 2023 study, changing only the order of two answers let Vicuna-13B beat ChatGPT on 66 of 80 queries with ChatGPT as the judge (Wang et al.).
- AutoRouter's free company benchmark grades each task against the team's tests or a rubric written with the team.
Grade a coding agent with tests whenever the task has them: tests that fail on the code before the change, pass after it, and leave the existing tests passing. Use a written rubric when a reviewer has to judge the result, and an LLM judge only when there are too many results to review by hand, with the rubric and a reference patch in front of it and a sample of its verdicts checked by people. AutoRouter, the Mac app for all your coding agents, grades its free company benchmark against a team's own tests or a rubric written with the team. AutoRouter wrote this post.
When are tests enough to grade a coding agent?
Tests are enough when they fail before the fix, pass after it, and the tests that already passed keep passing. SWE-bench records exactly these two sets for every task: FAIL_TO_PASS, the tests "resolved by the PR and tied to the issue resolution", and PASS_TO_PASS, tests "that should pass before and after the PR application" (SWE-bench dataset card). A task passes only when both sets pass, so an agent can't fix the bug by breaking something else.
Check both properties before you trust a task. Run its held-out tests on the code before the change and confirm they fail, then on the merged change and confirm they pass; a test that passes on both measures nothing. Databricks graded its internal benchmark this way, with held-out tests and no LLM judge, because it found a judge "rewards sounding right over being right" (Databricks, July 8, 2026).
Tests stop being enough in two ways, which Ramp named when it moved away from them (Ramp). Overspecified tests expect one implementation and fail a correct one written differently. Underspecified tests check some requirements and miss others, so an incomplete solution passes. Rewriting the first kind and adding cases to the second keeps tests as your grader for longer.
How do you grade coding agent output without tests?
Grade it with a rubric written before you see any output: a short list of pass-or-fail checks a reviewer can answer from the diff. Refactors, migrations, documentation, review comments and UI changes often have no test that captures what matters, and a rubric turns "looks good" into criteria two reviewers would score the same way. Writing it first keeps it grading the task and not the answers you happened to get.
A rubric for a migration task might read:
- The change does what the task asked, and nothing it didn't.
- No file outside the migration and its callers changed.
- Every old call site moved to the new API.
- The change follows the repository's existing error-handling pattern.
- A test covers the new behavior.
Score each line pass or fail and count a task as passed only when every line passes. Yes-or-no checks are easier to agree on than a score out of ten, and they tell you which part an agent got wrong. Keep the merged pull request beside the rubric as a reference: it shows one correct answer without being the only one.
When does an LLM judge make sense for coding agents?
An LLM judge makes sense when tasks admit many valid solutions and there are more results than people can review: every model, every agent setup and several runs each. Cursor grades CursorBench with "agentic graders" because most developer requests are underspecified enough to allow many valid approaches, and it pairs them with experiments on live traffic that catch output which looks correct to a grader but feels worse to a developer (Cursor, March 11, 2026).
Ramp's private SWE-Bench shows how to build one that holds up (Ramp, read November 25, 2026). Its judges see the task, the repository context, the candidate patch and the gold patch, the engineer-reviewed code that shipped, and decide whether the two implement the same requested behavior. To check them, Ramp ran seven judge models on 360 comparisons spanning 72 tasks and 20 solver models. All seven judges were stricter than the tests, which had made the earlier version of the benchmark "appear more saturated than it actually was"; a majority vote of the judges ranked solvers with a 0.85 correlation to test-based pass rates; and engineers agreed with nearly 90% of the task-level verdicts. Ramp SWE-Bench v2 is graded this way (Ramp Labs), and how Ramp, Cursor and Uber build AI coding benchmarks sets its method beside the other two.
Ramp is candid about the limits. Nearly half of the comparisons had at least one dissenting judge, so a single judge is noisy, and judges agreeing with each other "does not by itself prove" they are right; the human check is what does.
What goes wrong with an LLM as a judge?
LLM judges have known biases that can pick the winner for reasons unrelated to the code. Zheng et al. (2023) found that strong judges such as GPT-4 agreed with human raters over 80% of the time, about as often as humans agree with each other, and named three biases: position, verbosity and self-enhancement. Wang et al. (2023) showed how large position bias can be: with ChatGPT as the judge, changing only the order of the answers let Vicuna-13B beat ChatGPT on 66 of 80 queries. Panickssery et al. (2024) found that models can recognize their own output and that the better they recognize it, the more they favor it.
| Pitfall | What it does | How to check for it |
|---|---|---|
| Position bias | Favors the answer shown first or second | Grade every pair in both orders and keep only verdicts that agree |
| Verbosity bias | Favors longer answers and explanations | Grade the diff alone, without the agent's summary |
| Self-preference | Favors output from its own model or provider | Use judges from several providers, and test for it as Ramp did |
| Sounding right | Passes plausible code that doesn't work | Keep tests wherever they exist; give the judge a reference patch |
| One noisy judge | Verdicts change between judges and runs | Take a majority of several judges and spot-check a sample by hand |
Ramp tested self-preference directly, asking whether a candidate scored better when it came from the same provider as the model behind the gold patch, and found no evidence of an advantage. Run the same check on your own judges before you rely on them, since one study's result doesn't carry over to another set of models.
Which grader should you use for each kind of task?
Use the cheapest grader that measures what the task is for, and move down this table only when the row above can't:
| If the task | Grade with | Why | Watch for |
|---|---|---|---|
| Has tests that fail before the fix and pass after | The held-out tests, plus the tests that already passed | Deterministic, cheap to rerun, no judgment involved | Overspecified or underspecified tests |
| Has tests, but they miss requirements | Tests plus a rubric for what they miss | Catches incomplete solutions the tests let through | Rubric lines that restate the tests |
| Has no useful tests (refactor, migration, docs, UI) | A rubric written before any output, scored by a person | Turns a reviewer's judgment into repeatable checks | Reviewer time; vague lines |
| Has too many results for people to review | LLM judges with the rubric and a reference patch | Scales to every model, agent and run | Position, verbosity and self-preference bias; check against people |
The same choice applies when you test a change to your agents' instructions instead of a model; how to test an AGENTS.md change before it reaches your team uses tests first and a rubric where they run out. How do you build an AI coding benchmark for your company? covers making the tasks these graders score, and what is an LLM router? covers using the results to pick a model for each task.
How does AutoRouter's free benchmark grade tasks?
AutoRouter grades each task in its free company benchmark against the team's own tests or a rubric written with the team. The tasks come from the team's merged pull requests and agent traces, and each starts from the repository as it was before the change, down to a synthetic version of a database or service the task depends on. AutoRouter then tunes a custom router, skills and team-wide system prompts against the benchmark to save the team money.
The team keeps the benchmark and the diagnostic that comes before it, and can rerun the benchmark when a new model comes out or its AI setup changes. Targets for savings, speed and performance are agreed before tuning, and a paid pilot follows only if they are met. Which repositories, pull requests and transcripts may be read, and where the benchmark runs, are agreed at kickoff.
To have your team's merged work graded on its own tests and a rubric you agree on, apply for AutoRouter's free company benchmark.
Questions
Is an LLM judge reliable for grading code?
It can be, with safeguards. Ramp's judges, given the shipped patch as a reference, matched engineers on nearly 90% of verdicts, while Databricks avoided judges because they reward code that sounds right. Use tests where they exist and check a judge against people before trusting it.
Can the judge be the same model as the agent it grades?
Avoid it where you can. Models can recognize and favor their own output, so use judges from more than one provider and compare their verdicts. Ramp tested for a same-provider advantage in its setup and found none, which is worth repeating on yours.
How many verdicts should people check?
No standard number exists. Check enough at the start to measure how often people agree with the judge, then a smaller sample whenever you change the judge model, its prompt or the kind of task. Read every verdict where the judges disagree.
Should a rubric give scores or pass and fail?
Pass and fail per line is easier to agree on and to act on. A score out of ten hides which part failed and drifts between reviewers. AutoRouter's free company benchmark writes its rubrics with the team, so the lines match what the team's reviewers already look for.
Sources
- Building LLM Judges to Judge LLMs, Ramp Builders, read November 25, 2026
- Ramp SWE-Bench v2, Ramp Labs, read November 25, 2026
- Benchmarking coding agents on Databricks' multi-million line codebase, Databricks, July 8, 2026
- How we compare model quality in Cursor, Cursor, March 11, 2026
- SWE-bench dataset card, Princeton NLP, read November 25, 2026
- Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena, Zheng et al., 2023
- Large Language Models are not Fair Evaluators, Wang et al., 2023
- LLM Evaluators Recognize and Favor Their Own Generations, Panickssery, Bowman and Feng, 2024