CertSafari
    Anthropic Claude Certified Architect – Professional (CCAR-P)· Lessons

    Domain 4 · Lesson 21/38

    Mixed-Method Eval Grading: Code, LLM and Human Graders

    Design evaluation datasets and test frameworks using mixed methodologies

    9 min read
    2.67% of exam
    3 sources
    Published 4 Oct 2026
    Docs as of 30 Sep 2026

    What you will be able to do

    • Choose between code-based, LLM-based and human grading using the docs' selection rule
    • Pick the right code-based metric for categorical, consistency and summarisation tasks
    • Write an LLM grader prompt with a clear rubric, a fixed output format and reasoning that is then discarded
    • Combine grader types into one framework, using humans for calibration

    1.Three grader families and how to choose

    Once you have a dataset, every test case needs a score. Anthropic's guidance groups graders into three families: code-based, model-based (LLM) and human. A mixed-methods framework uses each family for the cases it handles best. The selection rule in the docs is simple: use the fastest, most reliable and most scalable method that can actually judge the task.

    That rule gives a clear order of preference. Code-based grading comes first wherever the task allows it. The cookbook calls it by far the best method when you can design for it. LLM-based grading is next, for judgments that rules cannot express. Human grading is the most flexible, but it is slow and expensive, and the docs advise avoiding it where possible.

    Strengths and weaknesses of the three grader families (Anthropic agent-evals guidance)
    GraderExample methodsStrengthsWeaknesses
    Code-basedString match (exact, regex, fuzzy); binary tests; static analysis; tool-call verificationFast, cheap, objective, reproducible, easy to debugBrittle to valid variations; lacks nuance for subjective tasks
    Model-basedRubric-based scoring; natural language assertions; pairwise comparison; multi-judge consensusFlexible, scalable, captures nuance, handles freeform outputNon-deterministic; more expensive than code; needs calibration with human graders
    HumanSME review; crowdsourced judgment; spot-check sampling; inter-annotator agreementGold standard quality; used to calibrate model-based gradersExpensive, slow, often needs experts at scale

    For agents there is one more choice: what the grader looks at. A grader can examine the transcript, meaning the full record of tool calls and reasoning. Or it can examine the outcome, the final state of the environment. A flight-booking agent may say the flight is booked. An outcome grader checks whether the reservation actually exists in the database.

    Checkpoint 1 of 6· Exam question

    An evaluation team is assembling test cases for a clause-extraction feature used on uploaded contracts. The current dataset contains only well-formatted, standard commercial leases. Following evaluation design best practices, which addition would most improve the test set's ability to predict real-world failures?

    Checkpoint 2 of 6· Match them up

    Match each grader family to its main weakness

    Tap a term, then the definition that fits it.

    Sources123

    2.Code-based graders: exact match, similarity and overlap

    Code-based grading covers more than string equality. The docs use three metrics, each suited to a different task.

    Exact match suits tasks with clear categorical answers, such as sentiment labels. The output is normalised for whitespace and case, then compared with the golden answer.

    Cosine similarity measures *consistency*. The same question is asked several ways, including with typos and padded with irrelevant detail. The outputs are embedded, and the grader checks that they are semantically close even when the wording differs. Its dataset is built from groups of paraphrases, not single questions.

    ROUGE-L grades summaries against reference summaries. It uses the longest common subsequence, so a high score means the summary captures key information in a coherent order.

    The exact-match grader in the docs is only two lines long:

    Checkpoint 3 of 6· Fill the gap

    Which method completes the whitespace normalisation in this exact-match grader?

    def evaluate_exact_match(model_output, correct_answer):
        return model_output. ? ().lower() == correct_answer.lower()

    Sources1

    3.LLM-based graders: rubrics, scales and binary judgments

    Some qualities, such as empathy, professionalism or whether a reply leaks private health data, cannot be checked with a string comparison. For these the docs use an LLM as the grader, in two forms. A Likert grader rates tone on a 1-to-5 scale against a target such as "empathetic". A binary classification grader answers yes or no to whether a response contains personal health information (PHI). It can catch subtle or implicit PHI that rule-based checks miss.

    The docs say to test an LLM grader's reliability before scaling it, and give these tips:

    - Detailed, clear rubrics. State exactly what makes an answer correct or incorrect. - Empirical or specific output. Ask for only "correct"/"incorrect" or a 1–5 score. Purely qualitative evaluations are hard to assess quickly and at scale. - Encourage reasoning. Have the grader reason first, then discard the reasoning and keep only the score. - Use a different model to grade. The example code notes it is generally best practice to grade with a different model from the one that produced the output.

    A rubric-based grader prompt: reasoning in <thinking> tags, a constrained verdict in <result> tagspython
    def build_grader_prompt(answer, rubric):
        return f"""Grade this answer based on the rubric:
        <rubric>{rubric}</rubric>
        <answer>{answer}</answer>
        Think through your reasoning in <thinking> tags, then output 'correct' or 'incorrect' in <result> tags."""

    Checkpoint 4 of 6· Exam question

    A team is designing a test framework for a Claude-based tool that answers factual questions about internal HR policies using short, well-defined answers (e.g., "What is the maximum number of paid sick days?"). To keep pace with frequent policy updates, which grading approach best supports automation while remaining accurate?

    Checkpoint 5 of 6· Check yourself

    Your LLM grader's scores look unreliable on complex judgments. Which change does the guidance recommend?

    Sources1

    4.Putting the methods together

    A mixed-methods framework assigns each grader type its own job. Within one task, several graders can score different aspects of the output. Their scores combine in one of three ways: weighted, where the combined score must pass a threshold; binary, where every grader must pass; or a hybrid of the two. The docs also say qualitative measures add value when applied consistently alongside quantitative ones, not in place of them.

    Humans still matter, mostly as calibration. Model-based graders need checking against human judgment. The guidance reserves structured human studies for two uses: calibrating LLM graders, and judging subjective outputs where human agreement is the reference standard. Descript is one example. The team moved from manual grading to LLM graders using criteria the product team defined, with periodic human calibration.

    Anthropic compares this layering to the Swiss Cheese Model from safety engineering. No single evaluation layer catches everything, so problems that get through one layer are caught by another.

    Checkpoint 6 of 6· Check yourself

    A task is scored by three graders: a unit-test grader, an LLM rubric grader and a tool-call check. The task passes only if all three pass. Which scoring mode is this?

    Sources12

    Exam traps

    Each one states something that sounds right. Open it to see what is actually true.

    1. 1.Human grading is the safest default for any eval because it gives the highest quality.Why is that wrong?

      Human grading is flexible and high quality, but the docs advise avoiding it where possible. Use the fastest, most reliable and most scalable method that works, and keep humans mainly for calibration.

      Covered in Three grader families and how to choose

    2. 2.Grading with the same model that generated the output is fine, and even improves consistency.Why is that wrong?

      The docs' grader code notes it is generally best practice to grade with a different model from the one that produced the output.

      Covered in LLM-based graders: rubrics, scales and binary judgments

    Sources

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “When deciding which method to use to grade evals, choose the fastest, most reliable, most scalable method:”
      ↩︎ Three grader families and how to choose
      “Exact match evals measure whether the model's output matches a predefined correct answer, typically after normalizing whitespace and case.”
      ↩︎ Code-based graders: exact match, similarity and overlap
      “It's ideal for evaluating consistency because similar questions should yield semantically similar answers, even if the wording varies.”
      ↩︎ Code-based graders: exact match, similarity and overlap
      “High ROUGE-L scores indicate that the generated summary captures key information in a coherent order.”
      ↩︎ Code-based graders: exact match, similarity and overlap
      “LLM-based grading: Fast and flexible, scalable and suitable for complex judgment. Test to ensure reliability first then scale.”
      ↩︎ LLM-based graders: rubrics, scales and binary judgments
      “This method can account for context and identify subtle or implicit forms of PHI that rule-based systems might miss.”
      ↩︎ LLM-based graders: rubrics, scales and binary judgments
      “Purely qualitative evaluations are hard to assess quickly and at scale.”
      ↩︎ LLM-based graders: rubrics, scales and binary judgments
      “Numbers provide clarity and scalability, but qualitative measures can be valuable if consistently applied along with quantitative measures.”
      ↩︎ Putting the methods together
      “Human grading: Most flexible and high quality, but slow and expensive. Avoid if possible.”
      ↩︎ Exam trap 1
      “Generally best practice to use a different model to evaluate than the model used to generate the evaluated output”
      ↩︎ Exam trap 2
      “Code-based grading: Fastest and most reliable, extremely scalable, but also lacks nuance for more complex judgments that require less rule-based rigidity.”
      ↩︎ Checkpoint
      “Encourage reasoning: Ask the LLM to reason first before producing an evaluation score, and then discard the reasoning.”
      ↩︎ Checkpoint
    2. 2.
      “Agent evaluations typically combine three types of graders: code-based, model-based, and human.”
      ↩︎ Three grader families and how to choose
      “The outcome is the final state in the environment at the end of the trial.”
      ↩︎ Three grader families and how to choose
      “Reserve systematic human studies for calibrating LLM graders or evaluating subjective outputs where human consensus serves as the reference standard.”
      ↩︎ Putting the methods together
      “They evolved from manual grading to LLM graders with criteria defined by the product team and periodic human calibration”
      ↩︎ Putting the methods together
      “Like the Swiss Cheese Model from safety engineering, no single evaluation layer catches every issue.”
      ↩︎ Putting the methods together
      “For each task, scoring can be weighted (combined grader scores must hit a threshold), binary (all graders must pass), or a hybrid.”
      ↩︎ Checkpoint
    3. 3.
      “This is by far the best grading method if you can design an eval that allows for it”
      ↩︎ Three grader families and how to choose

    Spotted a mistake, or was something unclear? Tell us.