Evaluation & Testing Reference — Claude Cert Academy

A practical guide to evaluating Claude outputs, building test suites, and maintaining quality as models and prompts evolve.

Evaluation Taxonomy

Metric Types

Automatic Metrics

LLM-as-Judge Metrics

Use a Claude call to evaluate a Claude output. More flexible than exact match, but adds cost.

eval_prompt = f"""
Evaluate the following customer service response on a scale of 1-5 for:
- Empathy (1-5)
- Accuracy (1-5)
- Clarity (1-5)

Customer issue: {issue}
Agent response: {response}

Return JSON: {{"empathy": N, "accuracy": N, "clarity": N, "reasoning": "..."}}
"""

Human Evaluation

Golden Dataset Construction

Evaluation Pipeline

# Minimal eval pipeline
import anthropic

client = anthropic.Anthropic()

def evaluate(prompt_template, test_cases, metrics):
    results = []
    for case in test_cases:
        response = client.messages.create(
            model="claude-sonnet-4-6",
            max_tokens=1024,
            messages=[{"role": "user", "content": prompt_template.format(**case)}]
        )
        output = response.content[0].text
        scores = {m: metrics[m](case, output) for m in metrics}
        results.append({"input": case, "output": output, "scores": scores})
    return results

Model Upgrade Evaluation Protocol

Use this protocol when Anthropic releases a new model version.

Prompt Change Testing Protocol

Eval Anti-Patterns

Eval Infrastructure Checklist

Continue to Claude Cert Academy