Deterministic graders are appealing when you’re building evals for AI coding agents. They’re fast and cheap to run. They also give you the same result every time, which makes them easy to add to a CI pipeline. Compared to using an LLM as a judge, they seem like the obvious choice. But are they as simple as they seem? A check that starts as a single string comparison can grow into a piece of software that you need to maintain. Even then, it can score valid solutions as failures without telling you.
A one-line check that keeps growing
Imagine you’re building an eval to understand how well AI coding agents work with your SDK. One of your evaluation criteria is that the agent uses version 2.3.0 of your SDK. Implementing a deterministic grader for that criterion seems straightforward: read the package.json file, find the dependency, and compare its version to 2.3.0. Then you run your eval and discover that some agents declare ^2.3.0 instead. Your grader marks these solutions as incorrect, even though they might be perfectly valid. So you extend your grader to understand SemVer ranges.
Soon you realize that declaring a compatible version range doesn’t mean the application uses the expected version. To know that, you need to inspect the lockfile. But agents can pick different package managers, each with its own lockfile format. On top of that, there are workspaces, dependency overrides, transitive dependencies. And even if you establish that the correct version of your SDK is installed, how do you know that the application actually uses it? What started as a simple string comparison has become a domain-specific piece of software that you need to build and maintain.
An incomplete grader can pick the wrong winner
Worse than the effort of building a deterministic grader is not realizing that it’s incomplete. Imagine that you’re comparing two AI coding agents with your original string-matching grader. One agent consistently pins the exact version of your SDK, while the other uses SemVer ranges. Your eval tells you that the first agent is better at working with your SDK. In reality, you might have measured nothing more than a difference in how the two agents declare dependencies.
As you expand your evals to more agents and models, you expose your graders to more valid ways of accomplishing the same task. Every variation that a grader doesn’t account for can turn into an incorrect score. And because deterministic graders give you consistent results, they give you the same incorrect score on every run. Consistency isn’t the same as correctness.
What exactly are you going to build?
When we evaluate AI coding agents, we always want to know whether the code they produce builds and runs. We learned this the hard way, after evals gave us perfect scores on code that wouldn’t even compile. Building a project is a deterministic operation. Surely, it’s a perfect candidate for a deterministic grader? But what exactly are you going to build?
You might assume that the agent creates a project in the working directory, but it creates one in a subdirectory instead. You might expect a particular project name, but the agent chooses another one. You could recursively discover project files, but what if the agent creates several projects? You can keep extending your grader to accommodate these variations, or you can constrain the agent by specifying the exact project structure in your prompt. But unless those constraints reflect the user’s actual requirements, you’re changing the scenario to suit your grader.
Working with an existing codebase lets you make more assumptions about the project structure. Even then, ask whether breaking one of those assumptions is a failure from the user’s perspective. An agent that delivers an incorrect solution and a grader that can’t verify a correct one produce the same failing score.
What are you actually measuring?
The appeal of deterministic graders can also shape what you choose to evaluate. Consider an agent skill. It’s easy to check deterministically whether an agent invoked the skill. But does that tell you whether the skill helped the user? The agent might have invoked the skill and delivered a worse outcome at twice the cost. Similarly, you could check whether the agent’s output contains the name of an API you recommend. But what if the agent mentioned that API in a comment explaining why it shouldn’t be used? Both graders can work exactly as designed without telling you whether the user got what they needed.
Plenty of deterministic checks are still useful for a skill, such as validating its frontmatter. But those are linting checks. They don’t tell you whether the skill improves the agent’s ability to complete the user’s task. So be ruthlessly honest about what each of your graders establishes, and don’t infer assurance from checks that don’t provide it. A perfect score on a flawed eval gives you a false sense of success and can lead you to the wrong product decisions.
Using an LLM as a judge
An alternative to implementing deterministic graders is to express your evaluation criteria in plain English and use an LLM as a judge. LLMs know a lot about many problem domains, so they can often recognize different valid ways of implementing a solution without you having to account for each one. As your understanding of the problem evolves, you refine the criteria without touching the grading code. This flexibility pays off as you scale your evals across products and scenarios and run them against different agents and models. Domain experts own their evaluation criteria, while the evaluation platform stays generic instead of accumulating scenario-specific grading logic.
But LLM judges come with their own challenges. If your evaluation criteria are ambiguous, the judge has to assume what you meant. Different grading runs can then interpret the same criterion differently, which introduces variance into your scores. Worse, the judge might consistently apply an interpretation that differs from yours. So a lack of variance doesn’t guarantee that your rubric is unambiguous or that your scores are correct.
You need to invest in writing unambiguous criteria and in validating that your judge evaluates them correctly. LLMs can help with that too. Ask them to challenge your criteria and to point out implicit assumptions or cases you haven’t considered. The goal is to take advantage of the LLM’s ability to accommodate different solutions without letting it decide for you what success looks like.
Give your judge deterministic tools
LLMs aren’t equally capable at every task. SemVer is a good example, because even capable LLMs can struggle to evaluate version ranges correctly. Rather than implementing an entire deterministic grader to verify SDK usage, you can give your LLM judge a tool that evaluates SemVer ranges deterministically. The judge discovers the relevant project, finds the dependency and its version range, and uses the tool to establish whether the range satisfies the criterion. You keep the flexibility of an LLM judge, while a specialized tool takes care of the one operation that deterministic code performs reliably.
Building a project works the same way. The judge discovers the project structure and works out the right build command. The compiler then establishes whether the code builds. Of course, the judge must evaluate the artifacts exactly as the agent delivered them and must not fix the code to make the build pass. Because these tools aren’t tied to a specific scenario, you can reuse them across many evals instead of implementing scenario-specific graders for each one. You still need to validate that the judge uses the tools correctly and interprets their results appropriately.
Some outcomes cost too much to verify directly, even with the right tool. Deploying an application to the cloud on every eval run might be prohibitively expensive. Instead, you ask an LLM to inspect the deployment configuration and decide whether it looks correct. That’s a legitimate trade-off, as long as you’re aware that you’re now evaluating by proxy. An LLM reading source code isn’t a compiler. Inspecting deployment configuration isn’t deploying an application. Checking whether a dependency is declared doesn’t establish whether it’s used. Whatever grading mechanism you choose, distinguish between verifying an outcome directly and evaluating evidence that suggests the outcome would be achieved. When you communicate your eval results, be clear about which of the two you did.
Start with what good looks like
Rather than starting with what you can easily verify programmatically, start by defining what a successful outcome looks like from the user’s perspective. Write that definition down as a rubric, and use an LLM to find ambiguity in it and uncover assumptions about the problem space. Then decide how to evaluate each criterion. My order of preference is:
- LLM as a judge. Where an LLM can reliably evaluate the criterion, express it in plain English without introducing scenario-specific grading code.
- LLM as a judge with deterministic tools. Where specialized tools are needed to reliably establish facts, equip the judge with those tools.
- Deterministic graders. Where you can reliably verify a criterion programmatically, and understand the assumptions and limitations of doing so, consider implementing a deterministic grader.
Whichever approach you choose, validate your grader against successful and unsuccessful outcomes before you trust its scores. Include different valid implementations of the same solution, because those are the cases an incomplete grader gets wrong, like the agent that declared ^2.3.0 or created its project in a subdirectory. When your grader fails a valid solution, fix the grader before you draw conclusions about the agent.
Deterministic graders are typically cheaper and faster to run than LLM judges. Whether they’re also cheaper to own depends on how complex the problem is and how much agent outputs vary. How often you run your evals plays a role too. But execution cost isn’t the only thing to optimize for. You run evals to get reliable insights for making informed decisions, and a cheap, fast grader that gives you misleading scores defeats that purpose. The goal isn’t to grade deterministically. It’s to grade reliably.
