Evaluation, Testing & Optimization·Task 4.2·Bloom: remember·Difficulty 1/5·6 min read·Updated 2026-07-14

Code-Based, Model-Based, and Human-Review Eval Types

Design evaluation datasets and test frameworks using mixed methodologies

SUBy Solomon UdohReviewed by Solomon UdohAI-assisted · human-reviewed
In short
The three eval methodologies are code-based, model-based, and human-review. Code-based evals run deterministic checks such as schema validation, regex, or exact match in milliseconds at near-zero cost. Model-based (LLM-as-judge) evals score outputs that require interpretation, such as tone or reasoning quality, at roughly the cost of a model call per item. Human-review evals rely on human judgment for high-stakes or novel behaviours and are the slowest and most expensive. Behaviours with a single unambiguous correct answer suit code-based checks; behaviours requiring interpretation suit model-based or human evals.

Three ways to grade, matched to three kinds of behaviour

Not every behaviour you need to evaluate can be checked the same way, and picking the wrong method either wastes money or produces a grade you cannot trust. Some outputs have exactly one correct form, valid JSON or not, the right field value or the wrong one, while others, tone, reasoning quality, appropriateness, require a judgment call that no simple function can make. The CCAR-P exam expects you to name the three eval methodologies and match each to the kind of behaviour it fits. This is a remember-level foundation for the grading decisions that follow.

The three eval types
Code-based evals: deterministic checks (schema validation, regex, exact match, length) that run in milliseconds at near-zero cost, suited to unambiguous behaviours. Model-based evals: an LLM judge scores outputs requiring interpretation (tone, reasoning, helpfulness) at roughly the cost of one model call per item. Human-review evals: a person scores against a rubric for high-stakes or novel behaviours, the slowest and most expensive, viable only on sampled subsets.

Code-based evals: fast, cheap, deterministic

A code-based eval is a function that inspects the output programmatically, does it parse as valid JSON, does it match the expected schema, does a regex find the required pattern, is it under the length limit, does the extracted value equal the authoritative value. These checks run in milliseconds, cost essentially nothing because there is no model call, and never drift, the same input always produces the same verdict.

Their strength is also their boundary. A function can only check what can be reduced to a deterministic rule. It can confirm that output is valid JSON; it cannot judge whether a summary captured the important points, because "important" requires interpretation a function cannot supply. Wherever a behaviour has a single unambiguous correct answer, the code-based eval is the right tool and any heavier method is waste.

Model-based evals: judgment at scale, at a price

A model-based eval, often called LLM-as-judge, hands the output to a judge model along with the original prompt and a scoring rubric, and the judge returns a verdict with reasoning. This is how you score behaviours that require interpretation, response quality, instruction-following, reasoning soundness, safety, handling of ambiguous inputs, at a scale humans could never reach.

The cost is roughly one model call per item evaluated, at the judge model's per-token rate, which adds up across a large dataset but is still far below human review. The limitation is reliability on borderline cases: a judge can be inconsistent, and without forcing it to produce reasoning alongside its score, that inconsistency is hard to detect. A model-based eval is a system that itself needs engineering and validation, not a free oracle.

Human-review evals: the expensive last resort

Human-review evals put a person in front of the output to score it against a rubric or annotate it freely. This is the method for high-stakes or novel behaviours where neither a function nor a judge model can yet be trusted, safety-critical edge cases, brand-new capability areas without established rubrics, anything where a wrong grade carries real risk. Human review is also how you calibrate and validate a model judge in the first place.

Its cost is human time and its ceiling is human throughput, which makes it the slowest and most expensive option and unusable at full scale. In practice it runs on sampled subsets, and humans bring their own inconsistency, so even here the process needs rubrics and structure.

ms / ~$0
code-based eval speed and cost
~1 model call
cost per item for a model-based judge
sampled only
human review is too slow to run at full scale

What the exam trips candidates on

The first trap is using an LLM judge to check something a function should check, such as whether output is valid JSON. A scenario will route a deterministic check through a model judge; the credited answer moves it to a code-based check, which is faster, cheaper, and deterministic, and points out that spending a model call to validate JSON is waste.

The second trap is the reverse, assuming a code-based check can score a subjective quality like tone, helpfulness, or reasoning. A scenario will try to grade "professional tone" with a regex or keyword match. The correct reading recognizes that these behaviours require interpretation a function cannot supply and belong to a model-based or human eval. The whole skill is matching the mechanism to whether the behaviour is unambiguous or interpretive.

Worked example

A team needs to evaluate a customer-message generator on four things: the output is valid JSON, it is under 500 tokens, its tone is appropriately professional, and its reasoning about the customer's issue is sound. Which eval type fits each?

The four checks split cleanly along the ambiguous-versus-interpretive line.

Valid JSON is a deterministic property: the string either parses against the schema or it does not. This is a code-based eval, a parse-and-validate function, running in milliseconds at no meaningful cost. Using a model judge here would be slower, costlier, and less reliable than a function that gives an exact verdict.

Under 500 tokens is equally deterministic: count the tokens, compare to the limit. Code-based again.

Appropriately professional tone requires interpretation, there is no rule that mechanically distinguishes professional from curt or overfamiliar. This is a model-based eval, an LLM judge with a rubric describing what professional means for the brand, returning a score and its reasoning.

Sound reasoning about the customer's issue is the most interpretive of the four. A judge model can score it at scale with a detailed rubric, and for a high-stakes deployment a sample might additionally go to human review to calibrate the judge. It is not something a function can assess.

The takeaway is that a single feature's evaluation mixes methods: the two unambiguous checks go to cheap code-based evals, and the two interpretive checks go to a model judge, reserving human review for calibration and the highest-stakes slice.

Common misreadings to avoid

Misconception

An LLM judge is the most thorough eval, so use it for every check including format and schema validation.

What's actually true

For unambiguous behaviours like valid JSON or a length limit, a code-based check is faster, cheaper, and deterministic. Spending a model call to validate JSON wastes the expensive method on a problem a function solves perfectly.

Misconception

A code-based check can score subjective qualities like tone or helpfulness if the rules are detailed enough.

What's actually true

Tone, helpfulness, and reasoning quality require interpretation that a deterministic function cannot supply. These behaviours belong to a model-based judge or human review, not a regex or keyword rule.

How this shows up on the exam

Domain 4 questions on this knowledge point list a set of behaviours and ask you to sort each into code-based or model-based (with human review for the highest-stakes). The reliable test is whether the behaviour has a single unambiguous correct answer, if so, code-based; if it needs interpretation, model-based or human.

This foundation feeds directly into the eval grading ladder, which turns the three types into a cost-ordered decision rule, and into calibrating an LLM-as-judge rubric, which makes the model-based option trustworthy. It also supports the five-stage eval workflow, whose automated-checks and judge-scoring stages are exactly these methods in sequence, and it connects back to translating a requirement into a threshold, where the behaviour's nature determines its check.

Check your understanding

Which behaviour is best evaluated with a code-based eval rather than a model-based judge?

People also ask

What are the three types of evals?
Code-based deterministic checks, model-based LLM-as-judge scoring, and human review. They trade off speed, cost, and the kind of behavior each can reliably assess.
When should you use a code-based eval versus a model-based one?
Code-based for unambiguous behavior with a single correct answer; model-based when the behavior requires interpretation, such as tone or reasoning quality.
When is human review the right eval method?
For high-stakes or novel behaviors no automated method can be trusted to grade, and for calibrating model judges. It runs on sampled subsets because it is slow and expensive.

Watch and learn

Official Anthropic Academy lessons first, then hand-picked walkthroughs. Videos load only when you press play.

No videos curated for this concept yet

We are still curating the best official and community videos for this topic.

Official prep for this domain

Anthropic's own free prep module for this part of the syllabus, on the official prep course. Free with an Anthropic Academy sign-in.

References & primary sources

Adaptive study

Master this concept with Archie

Practice it inside an adaptive study session. Archie, your Socratic AI tutor, tracks your mastery with Bayesian Knowledge Tracing and schedules the perfect next review.

Start studying