Field note · evaluation

Design an Evaluation Sample for Uneven Task Frequency

Use one worksheet to preserve a production-weighted estimate while protecting rare, high-consequence cases from disappearing inside an average.

10 minute read
  • AI evaluation
  • Release decisions
Illustration of an evaluation worksheet separating production weighting from rare-case coverage

The common cases are easy to sample. They are also the cases most likely to make an evaluation look healthy.

When I taught product managers to move from writing specs to building and shipping, the recurring failure was usually an undefined “done,” not the model. A sample has the same problem when nobody writes down what each row is supposed to prove.

Illustration of a decision worksheet splitting a task stream into prevalence and protected coverage views

The decision: use two views, not one blended score

Use a prevalence-oriented sample to estimate the workflow’s production mix, then add a protected coverage sample for rare strata whose failures carry more consequence. Report the views under separate names.

Here is the completed synthetic result:

The protected 20-case sample scores 70.0% as a raw coverage average. Applying the stated task frequencies produces a 91.6% production-weighted estimate. The rare high-consequence strata score 50.0%, so the release decision is HOLD.

That contrast is the artifact this page contributes. The 70.0% number is not a production estimate. The 91.6% number is not a guarantee that a deployed workflow will generalize. The rare-case result is not a footnote. It is the reason the illustrative release gate stops.

Start with a stratum worksheet

Define strata before you choose cases or inspect model outcomes. Each stratum should be mutually exclusive, observable from the task record, and connected to a different risk or operating condition.

FieldWhat to record
Workflow boundaryOne bounded AI task and its action or handoff
Stratum labelA pre-scoring task condition
Frequency p_hObserved proportion from a named window, or an explicitly synthetic assumption
ConsequenceLow, medium, high, or critical consequence of a wrong result
Minimum coverage c_hProtected count needed to inspect the stratum
Selection methodRandom within stratum, systematic, trace-diverse, authored, or synthetic
Selected n_hCases in the prevalence or coverage arm
Result viewprevalence-weighted or coverage-oriented
Stratum resultPassed cases divided by selected cases
Weightp_h for the production view, none for the raw coverage score
Release ruleThreshold, veto, or investigation condition
ProvenanceTrace window, dataset version, author, or synthetic label

This structure fits the way evaluation systems separate data, criteria, and runs. OpenAI’s Evals API defines an evaluation with a data-source schema and testing criteria, then creates runs against a selected data source. That separation is useful here: the worksheet decides what data belongs in each view before a run produces scores. (OpenAI Evals API reference)

Allocation rules

  1. Normalize the frequency assumptions so sum(p_h) = 1.
  2. For a prevalence arm with total budget B, set n_h = round(B * p_h). Give every nonzero stratum at least one case and record rounding changes.
  3. For a protected coverage arm, set n_h >= c_h for every stratum, even when p_h is small.
  4. Select within each stratum without replacement from the declared frame. If the frame is synthetic, label it synthetic.
  5. Preserve the raw coverage result, the production-weighted result, and the rare-case result as separate fields.

NIST makes the distinction behind this design explicit: accuracy on a fixed benchmark is not the same claim as generalized accuracy over potential items similar to the benchmark. A weighted calculation from a small, authored set should be described as a worksheet estimate, not promoted to generalized accuracy. (NIST, “Expanding the AI Evaluation Toolbox with Statistical Models”)

Worked example: an invoice-review workflow

The bounded workflow reads an inbound vendor invoice request and chooses one of three actions: approve, request missing evidence, or escalate to a finance reviewer. The frequencies below are synthetic planning assumptions. They are not observed traffic.

StratumFrequency p_hConsequence if wrongMinimum coveragePrevalence arm, B=50Protected armResult view
A. Complete routine invoice70%Low to medium, usually reversible through review5355Both
B. Missing or ambiguous evidence20%Medium, delay or unnecessary escalation5105Both
C. Duplicate or policy exception8%High, financial loss or policy breach545Both
D. Bank-account change or fraud signal2%Critical, wrong approval can be hard to reverse515Both
Total100%205020

The prevalence allocation preserves the task mix. The protected allocation oversamples C and D so five cases appear in each high-consequence cell. Microsoft’s evaluation guidance supports using production traces to represent real behavior, while its trace-sampling guidance emphasizes representative and diverse selection instead of repeated near-identical prompts. That is the logic behind separating the frame from the protected allocation. (Microsoft Foundry cloud evaluation, Microsoft Foundry trace-to-dataset guidance)

Use a labeled manifest, not just a count

The manifest is the audit trail for the decision. Pass means the workflow selected the action allowed by the synthetic case’s expected decision.

IDStratumExpected actionOutcomeFailure note
A-01AApprovePassCorrect approval
A-02AApprovePassCorrect approval
A-03AApprovePassCorrect approval
A-04AApprovePassCorrect approval
A-05AApprovePassCorrect approval
B-01BRequest evidencePassCorrect request
B-02BRequest evidencePassCorrect request
B-03BRequest evidencePassCorrect request
B-04BEscalatePassCorrect escalation
B-05BRequest evidenceFailApproved without receipt
C-01CEscalatePassCorrect escalation
C-02CEscalatePassCorrect escalation
C-03CEscalatePassCorrect escalation
C-04CEscalateFailApproved likely duplicate
C-05CEscalateFailMissed policy exception
D-01DEscalatePassCorrect escalation
D-02DEscalatePassCorrect escalation
D-03DEscalateFailApproved bank change
D-04DEscalateFailApproved bank change
D-05DEscalateFailApproved fraud signal

Apple’s evaluation documentation makes the same inspection point operational: aggregate results show overall health, while detailed per-sample results reveal whether failures cluster in one input category. Its dataset guidance also recommends categorizing samples and ensuring each relevant profile has representation. (Apple, “Designing effective evaluations”, Apple, “Designing datasets to test your feature”)

Recompute the production and rare-case views

First calculate the conditional pass rate for each stratum:

StratumPassesn_hPass rate
A55100%
B4580%
C3560%
D2540%

Now keep the views separate:

ViewFormulaResultInterpretation
Raw protected coverage(5 + 4 + 3 + 2) / 2070.0%Coverage-oriented average, not production performance
Production-weighted performance(0.70*1.00) + (0.20*0.80) + (0.08*0.60) + (0.02*0.40)91.6%Prevalence view under the stated frequency assumptions
Rare-case performance(3 + 2) / (5 + 5) for C and D50.0%Protected result for high and critical strata
Critical stratum D2 / 540.0%Critical failures remain visible

Spreadsheet formulas:

=SUMPRODUCT(frequency_range, pass_rate_range)
=SUM(rare_pass_range)/SUM(rare_n_range)

The oversampled raw average is 70.0%, while the prevalence recomputation is 91.6%. Neither number is “the score.” They answer different questions.

Apply the release rule before the run

For this worked example, the worksheet uses three predeclared conditions:

  • production-weighted performance must be at least 90%;
  • rare-case performance across C and D must be at least 80%;
  • any critical D failure returns HOLD, regardless of the aggregate.

The result is HOLD. The weighted view passes its illustrative threshold, but the protected rare-case result is 50%, below 80%, and D contains three critical failures. This is a decision setting for the example, not a universal industry threshold.

Write the veto before scoring. Otherwise the team will be tempted to change the rule after seeing the attractive common-case result. The rare set should also be reviewed case by case, with the expected action and failure note visible to the reviewer.

When the worksheet should use production traces or synthetic cases

Use a named production window when the workflow is live and you can define the task strata from real records. Microsoft describes production traces as representative of real user behavior and treats synthetic generation as complementary for prelaunch scenarios and edge cases. A trace-based sample is still not automatically a fair sample: preserve the time window, workflow version, filters, deduplication, and selection method. (Microsoft Foundry trace-to-dataset guidance)

Use authored or synthetic cases when a critical condition has not appeared in production, when traffic is too low to fill the protected floor, or when you need a stable regression set. Mark those cases clearly. OpenAI’s evaluation model supports versioned data-source definitions and separate runs, which makes it practical to keep the synthetic coverage set and the production trace set distinct. (OpenAI Evals API reference)

Do not let a model-based judge be the only evidence for a high-consequence release decision. Pair the rubric with deterministic checks, an expected action, or domain review. The worksheet is about who is represented and how the result is reported. It does not solve evaluator validity by itself.

For the upstream dataset work, see how to build an evaluation dataset from production traces. For the broader evaluation cluster, use the assigned parent, AI workflow evaluation.

Limits of this decision aid

The manifest is synthetic. The 91.6% figure is a recomputation from declared assumptions, not a production outcome. The 20-case protected set is not a statistical power calculation, and its small denominators can move sharply when one case changes. Frequencies drift as usage, policy, and workflow versions change.

NIST’s fixed-benchmark versus generalized-accuracy distinction is the right warning here. A worksheet can make allocation and reporting auditable. It cannot, by itself, justify a claim about every future task. For a live release, retain the frame, record the time window, inspect per-sample failures, and schedule a refresh when the task mix or model changes.

If you want a second pair of eyes on the worksheet, Marius Manolachi’s AI consulting and tutoring work is designed to make existing teams capable of building and evaluating AI products on their own work. The artifact above remains usable without that next step.

Questions people ask next

Should I weight an oversampled rare-case set?

Yes, if you want a production estimate and you have defensible stratum frequencies. Keep the raw coverage score and the rare-case result separately. Weighting does not erase the reason you oversampled the rare cases.

Can a rare case veto an AI release?

Yes when the consequence is high or critical and the action is hard to reverse. Write the veto before scoring, define the minimum protected count, and record the exact failure rather than hiding it in an aggregate.