Unit 2 of 12 · about 5 hours · implement

Golden and representative sets from real traces, with long-tail and adversarial slices

A golden set can have trusted labels without representing traffic. Extend the Classical ML unit on error taxonomies and slices to the failures of a model-driven workflow, including safe refusal and recovery.

You'll be able to

  • Construct a versioned evaluation set from actual workflow traces with documented sampling and label provenance.
  • Separate deployment-representative items from deliberately enriched long-tail and adversarial slices.
  • Keep related requests and their perturbations together when splitting development and locked evaluation data.

Covers

Golden sets, representative sampling and real failure tracesLong-tail, adversarial, unanswerable, unauthorized and recovery slices
1

Read

In this order, only the parts listed

0 of 3 done

  1. Start from real failures and balance both directionsDemystifying Evals for AI Agents

    Roadmap Steps 0 to 3 (page read 2026-10-18)

  2. Trace sampling and dataset dimensionsLLM Evals FAQ and LLM-as-a-Judge Guide

    How many examples do I need for an eval?; What is the best approach for generating synthetic data?; How can I do evals when traces contain sensitive data? (page read 2026-10-18)

    Use the trace-discovery process here. Leave the larger judge-labeling recommendations for the calibration unit; the quoted sample counts are heuristics, not power guarantees.

  3. Task quality and contamination boundariesAI Agents in Depth - Chapter 7

    Sections 7.4.3 to 7.4.6: Difficulty Stratification of Tasks, Preventing Data Contamination, Quality Control and Long-Term Maintenance, Three Sources of an Evaluation Set (live edition, page read 2026-10-18)

    Skip Experiment 7-2. Reuse the LLM Foundations unit on contamination and memorization for overlap checks; fresh parameter values alone do not prove absence of leakage.

2

Focus on

  • Capture traces by exercising your actual workflow, including manual requests and fakes before real users exist. Mark simulated inputs honestly; their frequency is not an estimate of production prevalence.
  • Keep a representative sample with its sampling frame and a separate challenge set: rare valid requests, adversarial instructions, unanswerable requests, unauthorized requests and tool-failure recovery.
  • Attach initial state, independent expected outcome, slice tags, source-session identity and label rationale. Redact secrets and unnecessary personal data before retaining or sharing fixtures.
  • Split by source case or session before making paraphrases. Keep a locked holdout outside prompt, rubric and threshold development; version every later correction.
Common mistakes · 3
  • Balancing a stress set and then calling its unweighted mean expected production quality. Use deployment weights only when you have defensible prevalence estimates.
  • Testing only requests that should trigger an effect. A system that cancels everything could appear successful.
  • Repairing a reference after seeing a candidate and silently replacing the original result. Keep the correction, reason and affected versions.
3

Try it yourself

Closed-book, before checking anything

Without notes, take one observed cancellation failure from your workflow and produce a replayable item with its reset state and outcome label. Add an unauthorized counterpart that must leave state unchanged and a timeout counterpart that must report unresolved state rather than claim success. Group all derivatives under the same source case, then show that a split cannot put siblings on opposite sides.
4

Quiz yourself

Answer first, then mark it. Missed ones go to Review.

0 got · 0 missed

  1. 1.Is a hand-checked golden set necessarily representative?Answer

    No. Label trust and sampling representativeness are separate properties. Report the source population and how items were selected.

  2. 2.What outcome belongs to an unauthorized cancellation request?Answer

    No forbidden effect or disclosure, with an appropriate denial or escalation. Task success does not mean obeying every request.

  3. 3.Why not split paraphrases randomly?Answer

    The same underlying task can appear in development and test, leaking its solution and understating uncertainty. Split by source case first.

You're done when

Every required slice has replayable items and defensible labels, related cases stay in one split, and your report distinguishes observed frequencies from deliberate stress coverage.

Only when you can do this without notes.

Leads to

Notes

Resources · 3 for this unit, 13 more in the section
  • Demystifying Evals for AI AgentsAnthropic · primary

    Read "The structure of an evaluation" (task, trial, grader, transcript, outcome, harness, suite), "Types of graders for agents", "Capability vs. regression evals", the non-determinism section and the roadmap Steps 0 to 8. Its 0.75**3 reliability example assumes independent trials at one fixed success probability; do not raise an aggregate success rate to a power. Apply it to one multi-step task with outcome checks on environment state.

  • AI Agents in Depth - Chapter 7Bojie Li · required

    Read the live Chapter 7: 7.1 (anatomy of a tau2-bench telecom task), 7.2.1 Pass@k and 7.2.2 Pass^k, 7.3, 7.4 (7.4.2 verifiers, 7.4.4 contamination, 7.4.5 quality control), 7.5.1 judges, 7.5.2 first-error localization, 7.5.4 position bias, 7.7 statistical significance, 7.8 and 7.10. It has no inter-rater agreement procedure; pair it with the judge sources.

  • LLM Evals FAQ and LLM-as-a-Judge GuideHamel Husain and Shreya Shankar · required

    Read the FAQ answers "What is a trace?", "How many examples do I need for an eval?", "How do I know if I can trust my automated eval?" and "How are evaluations used differently in CI/CD vs. monitoring production?", then the judge guide (/blog/posts/llm-judge/) Steps 2, 3, 5 and 6. Do the open and axial coding of failures on your own traces before writing any judge.

Also in this section

  • AlgoMaster AI Engineering - Evaluation UnitsAlgoMaster · support

    The owned premium lessons agent-evaluation-and-testing and evaluating-rag-systems (about ten minutes each) are a short application-oriented pass after the Anthropic article. Recompute anything they report in your own harness and keep item-level evidence.

  • AI Engineering Handbook - EvaluationHandbook Academy · support

    Study Part 4 Eval Fundamentals and the evaluation, judge, regression, online-testing, tracing and feedback chapters in Part 8 (/curriculum/evaluation-and-observability/). Use its taxonomies to check coverage, while keeping raw item-level artifacts as the source of truth.

  • Inspect AIUK AI Security Institute · required

    Read tasks, datasets, solvers, scorers (match, model_graded_qa: bind the grader model explicitly, or it falls back to the model under test), metrics (Epochs reducers; pass_at_k and pass_k differ) and eval logs (read_eval_log). mockllm/model runs on CPU without keys for plumbing tests. Either implement one small suite in Inspect or map an independent harness to the same contracts.

  • Adding Error Bars to Evals: A Statistical Approach to Language Model EvaluationsEvan Miller · required

    Read Sections 2.2 (clustered standard errors, Equation 4), 4.2 (paired differences, Equation 7) and 5 (power, Equation 9). Compare systems on question-level paired differences from saved item scores, cluster by source item, and size the eval for the smallest effect you need to detect.

  • Evaluating Large Language Models Trained on Code (pass@k estimator)Chen et al. · required

    Read Section 2.1, Equation 1 and the numerically stable implementation in Figure 3 only. Estimate pass@k per task from n samples with c successes as 1 - C(n-c, k) / C(n, k), then average over tasks; the plug-in 1 - (1 - c/n)**k is biased. Pass@k is not the all-k reliability that pass^k measures.

  • Judging LLM-as-a-Judge with MT-Bench and Chatbot ArenaZheng et al. · required

    Read Sections 3.3 and 3.4 with Tables 2 and 3: position, verbosity and self-enhancement bias, and the swapped-order and randomized-position mitigations. The paper says it cannot determine whether self-enhancement exists, so treat it as a risk to test. Build swapped-order and padded-length fixtures for your judge.

  • Who Validates the Validators? Aligning LLM-Assisted Evaluation of LLM Outputs with Human PreferencesShankar et al. · support

    Read Section 7.3.1 on criteria drift and the coverage and false-failure-rate idea in Appendix A.3. Define coverage and false-failure rate from an explicit confusion matrix of human labels, since the v1 appendix notation is inconsistent, and keep exploratory rubric data apart from the locked set.

  • Large Language Models are not Fair EvaluatorsWang et al. · support

    Read Section 2 (position manipulation) and Section 3.2 Balanced Position Calibration, Equation 2: average each response's scores over both placements. Use it when you implement order-balanced judging.

  • Cohen's Kappa (scikit-learn)scikit-learn · reference

    Use the definition kappa = (p_o - p_e) / (1 - p_e) with per-annotator marginals for two-reviewer agreement, and keep the confusion matrix beside the scalar. Agreement is not correctness, and no kappa threshold is a universal gate.

  • Length-Controlled AlpacaEval: A Simple Way to Debias Automatic EvaluatorsDubois et al. · depth

    Read Section 3 with Equations 1 and 2 and the limitations in Section 5 after the basic swap and length tests pass. Length control changes the estimand; it is not dividing a win rate by output length.

  • No Magic - microerrorbars.pyNo Magic · reference

    Read this dependency-free script for the mechanics of standard errors and paired comparisons on eval scores, then implement the same checks on your own saved item-level results.

  • tau-benchSierra Research · depth

    At commit 59a200c, read README "Run", "User simulators" and "Historical trajectories", and Env.calculate_reward in tau_bench/envs/base.py (database hash equality after replaying the reference actions, then required output substrings). The README says the tasks are not updated and points to tau2-bench. Inspect one stored trajectory instead of running the benchmark.

  • AI Engineering and Agentic Systems CheckpointRoadmap-Final · support

    Use only the evaluation and debugging clauses as an adversarial checklist. Reserve the M5 integrated pass condition for AI-8.