Review the prerequisites
Suitable for: Engineers choosing guarantees across services, time and failure boundaries.
- Postcondition
- Facts that the business world must satisfy at the end of the task, such as that the report exists and has been published with approved content.
- Hard constraints
- Conditions that must be met individually, such as authorization, number of effects, and budget, are not averaged with language quality.
- Trajectory
- Key actions and their order during execution, used to check process constraints. They do not necessarily prescribe one fixed path.
- Held-out test set
- Samples excluded from tuning, used to evaluate changes on cases the tuning process has not been tailored to.
How does the mechanism work?
- 1Task contract
Fix inputs, required evidence, prohibited actions, and budgets. Keep labels out of model input.
- 2Run record
Bind prompt/model/data versions; retain tool events, artifacts, and business receipts.
- 3Hard gates
Check authorization, structure, citations, budgets, and effect counts separately. An average score cannot offset a dangerous failure.
- 4Semantic review
Check each free-form claim. Mark this dimension not_scored when review has not been performed.
- 5Comparison
Keep all attempts; report task counts, repetitions, denominators, failures, and unscored dimensions.
This experiment contains 8 authored tasks × 3 trials per version. It reports task/trial denominators and rule-gate results; semantic quality, model effects and production reliability are not measured.
Step-by-step explanation
- Define the task contract
Inputs, allowed actions, artifacts, and prohibited behaviors.
- Collect trusted facts
Observe business effects, permissions, usage, and key events.
- Evaluate each dimension
Handle rule checks and semantic review separately.
- Analyze and run regression checks
Report specific failure conditions, then retest changes and different valid paths.
Design · Explain the trade-offs
Choose retry metrics and uncertainty under deployment constraints
Objectives of this level: State when observed repeats, confidence intervals and zero failures can or cannot support a release decision.
Visual guide · Independent evidence, separate gates
Authorization, effect count and budget are hard gates. Good prose cannot cancel violations; an unscored dimension remains explicitly unscored. Select the figure to open it at full size.
Change the deployed strategy from one attempt to up to three read-only attempts with a fallible selector. The observed any-success task ratio assumes someone can recognize a correct candidate. A real selector may accept the first wrong candidate, so evaluate the whole retry/verification strategy, its stopping rules, shared budget and false-accept rate. Write tools require one durable business intent across allowed retries.
Pair A/B on the same independently sampled tasks and report each task's delta. For a population uncertainty estimate, sample or bootstrap at the task level when repeated trials share task difficulty. Pooling 24 correlated authored trials as 24 independent Bernoulli samples is unjustified. Eight selected teaching tasks cannot establish a representative deployment distribution.
The lab implements Wilson's binomial interval to illustrate the math. For a hypothetical independent sample with 16 successes in 24 trials it is about [0.467063,0.820278]. The output explicitly says this assumption does not apply to the authored repeated-trial fixture. NIST proportion intervals.
For zero observed failures in n independent representative Bernoulli trials with stationary failure probability, the one-sided 95% upper bound is 1−0.05^(1/n). At n=30 it is about 0.095034. This follows from P(no failures)=(1−q)^n; it is an assumption-based illustration, not a claim of nine-percent risk in the lab or zero risk in production. Rare severe failures need adversarial regression, separate risk gates and monitoring in addition to a headline interval.
Compare strict all-attempt reliability, a read-only verified retry policy and human escalation. They trade availability, budget, delay and false acceptance differently. Before a model or judge upgrade, calibrate on a shared anchor set while keeping a separate held-out set; version the rubric so score changes are not mistaken for agent changes.
A concrete strategy to compare
Assume read-only answers get at most three attempts under one deadline and one total budget, while a write has one approved business operation with repeated transport deliveries. A selector can accept the first wrong read-only candidate and stop before a later correct one. Measure returned-policy success and selector false accepts, not merely whether a good candidate occurred somewhere.
Specify the target task distribution and independent task sample before A/B comparison. Use task-level paired deltas and cluster resampling if attempts share task difficulty. Declare minimum_trial_success and any slice-specific quality thresholds before reading the results; the lab’s1.0 default is a demonstration, not a threshold inferred from production risk. Keep authorization/effect/budget, quality, semantic-review coverage and unmeasured dimensions separate. Thirty zero-failure trials justify the illustrated upper bound only under its stated sampling and observation assumptions.
Run experiments and observe counterexamples
Actual local calculations over authored trial/reference/judge fixtures. No live model, human calibration, measured latency/cost or independent deployment sample.
Python 3.10+ · Runs by default using only the standard library · Runs on your computer
- Compute A/B trial and task ratios.
- Inspect hard-gate slices and narration-only false accepts.
- Inspect the authored judge confusion matrix and assumption-based interval illustrations.
python3 -B evaluation_deep_dive.pyView the entry-point script
"""Actual statistics over authored trial and grader fixtures, Python 3.9+.
No model or human rater was run. Trials are correlated within tasks. This
file demonstrates metric definitions, false acceptance and release gates.
"""
import json
import math
TASKS = ['happy', 'alternative_path', 'timeout', 'permission', 'duplicate', 'citation', 'cancel', 'unanswerable']
PATTERNS = {
'A': [[1,1,1], [1,1,1], [1,0,1], [0,0,0], [1,0,1], [1,1,0], [1,0,0], [1,1,1]],
'B': [[1,1,1], [1,1,1], [1,0,1], [1,1,1], [1,0,1], [1,1,0], [1,0,1], [1,1,1]],
}
def fixtures(version):
records = []
for task, pattern in zip(TASKS, PATTERNS[version]):
for attempt, passing in enumerate(pattern, 1):
row = {'task_id': task, 'attempt': attempt, 'origin': 'authored_trial_fixture',
'business_ok': bool(passing), 'authorized': True, 'effect_count': 0,
'max_effect_count': 1, 'budget_units': 10 + attempt, 'max_budget_units': 20,
'narration_score': 0.95, 'trajectory': ['lookup','verify','finish']}
if task == 'alternative_path':
row['trajectory'] = ['cache','verify','finish']
if task == 'permission' and not passing:
row.update(business_ok=True, authorized=False, effect_count=1)
if task == 'duplicate' and not passing:
row.update(business_ok=True, effect_count=2)
if task == 'cancel' and not passing:
row.update(business_ok=True, budget_units=25)
records.append(row)
return records
def grade(row):
violations = []
if not row['authorized']:
violations.append('authorization')
if row['effect_count'] > row['max_effect_count']:
violations.append('duplicate_effect')
if row['budget_units'] > row['max_budget_units']:
violations.append('budget')
return {'pass': bool(row['business_ok']) and not violations, 'hard_violations': violations}
def trial_identities(records):
if not records:
raise ValueError('empty_dataset')
identities = [(r['task_id'], r['attempt']) for r in records]
if len(set(identities)) != len(identities):
raise ValueError('duplicate_trial_identity')
return set(identities)
def summary(records, minimum_trial_success=1.0):
# This lab's default is deliberately strict. A product must choose its own
# quality threshold and sampling plan before observing candidate scores.
trial_identities(records)
if type(minimum_trial_success) not in (int, float) or not math.isfinite(minimum_trial_success) or not 0 <= minimum_trial_success <= 1:
raise ValueError('quality_threshold')
grouped = {}
for row in records:
grouped.setdefault(row['task_id'], []).append(grade(row))
tasks = [{'task_id': task, 'passed': sum(r['pass'] for r in rows), 'attempts': len(rows),
'any_attempt_passed': any(r['pass'] for r in rows), 'every_attempt_passed': all(r['pass'] for r in rows)}
for task, rows in grouped.items()]
violations = {kind: sum(kind in grade(r)['hard_violations'] for r in records)
for kind in ('authorization','duplicate_effect','budget')}
hard_gate = sum(violations.values()) == 0
passed = sum(grade(r)['pass'] for r in records)
quality_gate = passed / len(records) >= minimum_trial_success
return {'trial_success': {'numerator': passed, 'denominator': len(records)},
'tasks_with_any_success': {'numerator': sum(t['any_attempt_passed'] for t in tasks), 'denominator': len(tasks)},
'tasks_with_all_success': {'numerator': sum(t['every_attempt_passed'] for t in tasks), 'denominator': len(tasks)},
'hard_violations': violations, 'hard_constraint_gate': 'allow' if hard_gate else 'block',
'quality_gate': 'allow' if quality_gate else 'block', 'quality_threshold': minimum_trial_success,
'release_gate': 'allow' if hard_gate and quality_gate else 'block', 'task_results': tasks,
'boundary': 'Descriptive fixture ratios; any-attempt success assumes an oracle chooses a correct attempt and is not a deployed retry policy.'}
def calibration(gold, judge):
if not gold or len(gold) != len(judge) or any(type(v) is not bool for v in gold + judge):
raise ValueError('calibration_shape')
tp = sum(g and j for g,j in zip(gold,judge))
tn = sum(not g and not j for g,j in zip(gold,judge))
fp = sum(not g and j for g,j in zip(gold,judge))
fn = sum(g and not j for g,j in zip(gold,judge))
return {'tp': tp, 'tn': tn, 'fp': fp, 'fn': fn, 'agreement': (tp+tn)/len(gold),
'precision': tp/(tp+fp) if tp+fp else None, 'recall': tp/(tp+fn) if tp+fn else None,
'origin': 'authored_reference_labels_and_judge_verdicts'}
def wilson(successes, total, z=1.959963984540054):
if type(successes) is not int or type(total) is not int or not 0 <= successes <= total or total < 1:
raise ValueError('binomial_counts')
p = successes / total
denom = 1 + z*z/total
center = (p + z*z/(2*total))/denom
radius = z*math.sqrt(p*(1-p)/total + z*z/(4*total*total))/denom
return [max(0, center-radius), min(1, center+radius)]
def zero_failure_upper(n, alpha=0.05):
if type(n) is not int or n < 1 or not 0 < alpha < 1:
raise ValueError('zero_failure_parameters')
return 1 - alpha**(1/n)
def paired_task_deltas(a, b):
attempts_a, attempts_b = trial_identities(a), trial_identities(b)
def group(rows):
result = {}
for r in rows:
result.setdefault(r['task_id'], []).append(grade(r)['pass'])
return result
left, right = group(a), group(b)
if left.keys() != right.keys() or attempts_a != attempts_b:
raise ValueError('unpaired_tasks')
return [{'task_id': t, 'A': sum(left[t])/len(left[t]), 'B': sum(right[t])/len(right[t]),
'delta': sum(right[t])/len(right[t])-sum(left[t])/len(left[t])} for t in left]
def demo():
a, b = fixtures('A'), fixtures('B')
gold = [True,True,True,True,False,False,False,False]
judge = [True,True,False,True,True,False,False,True]
swapped = [True,False,False,True,False,False,False,True]
return {'origin': 'authored_trials_and_judgments_actual_local_statistics', 'versions': {'A': summary(a), 'B': summary(b)},
'narration_only_evaluator': {'accepted': len(a), 'false_accepts': sum(not grade(r)['pass'] for r in a)},
'calibration': calibration(gold, judge),
'order_swap_fixture': {'disagreements': sum(x != y for x,y in zip(judge,swapped)), 'pairs': len(judge)},
'paired_task_deltas': paired_task_deltas(a,b),
'independent_sample_illustration': {'successes': 16, 'n': 24, 'wilson_95': [round(v,6) for v in wilson(16,24)],
'applies_to_trial_fixture': False, 'reason': 'Repeated authored trials are not independent sampled tasks.'},
'zero_failure_illustration': {'n': 30, 'one_sided_95_failure_upper': round(zero_failure_upper(30),6),
'assumption': 'Independent representative Bernoulli trials, stationary failure probability; not established by these fixtures.'},
'boundary': 'No measured model accuracy, latency, monetary cost, human agreement or deployment reliability.'}
if __name__ == '__main__':
print(json.dumps(demo(), indent=2, sort_keys=True))
Expected output when running locally
{
"boundary": "No measured model accuracy, latency, monetary cost, human agreement or deployment reliability.",
"calibration": {
"agreement": 0.625,
"fn": 1,
"fp": 2,
"origin": "authored_reference_labels_and_judge_verdicts",
"precision": 0.6,
"recall": 0.75,
"tn": 2,
"tp": 3
},
"independent_sample_illustration": {
"applies_to_trial_fixture": false,
"n": 24,
"reason": "Repeated authored trials are not independent sampled tasks.",
"successes": 16,
"wilson_95": [
0.467063,
0.820278
]
},
"narration_only_evaluator": {
"accepted": 24,
"false_accepts": 8
},
"order_swap_fixture": {
"disagreements": 2,
"pairs": 8
},
"origin": "authored_trials_and_judgments_actual_local_statistics",
"paired_task_deltas": [
{
"A": 1.0,
"B": 1.0,
"delta": 0.0,
"task_id": "happy"
},
{
"A": 1.0,
"B": 1.0,
"delta": 0.0,
"task_id": "alternative_path"
},
{
"A": 0.6666666666666666,
"B": 0.6666666666666666,
"delta": 0.0,
"task_id": "timeout"
},
{
"A": 0.0,
"B": 1.0,
"delta": 1.0,
"task_id": "permission"
},
{
"A": 0.6666666666666666,
"B": 0.6666666666666666,
"delta": 0.0,
"task_id": "duplicate"
},
{
"A": 0.6666666666666666,
"B": 0.6666666666666666,
"delta": 0.0,
"task_id": "citation"
},
{
"A": 0.3333333333333333,
"B": 0.6666666666666666,
"delta": 0.3333333333333333,
"task_id": "cancel"
},
{
"A": 1.0,
"B": 1.0,
"delta": 0.0,
"task_id": "unanswerable"
}
],
"versions": {
"A": {
"boundary": "Descriptive fixture ratios; any-attempt success assumes an oracle chooses a correct attempt and is not a deployed retry policy.",
"hard_constraint_gate": "block",
"hard_violations": {
"authorization": 3,
"budget": 2,
"duplicate_effect": 1
},
"quality_gate": "block",
"quality_threshold": 1.0,
"release_gate": "block",
"task_results": [
{
"any_attempt_passed": true,
"attempts": 3,
"every_attempt_passed": true,
"passed": 3,
"task_id": "happy"
},
{
"any_attempt_passed": true,
"attempts": 3,
"every_attempt_passed": true,
"passed": 3,
"task_id": "alternative_path"
},
{
"any_attempt_passed": true,
"attempts": 3,
"every_attempt_passed": false,
"passed": 2,
"task_id": "timeout"
},
{
"any_attempt_passed": false,
"attempts": 3,
"every_attempt_passed": false,
"passed": 0,
"task_id": "permission"
},
{
"any_attempt_passed": true,
"attempts": 3,
"every_attempt_passed": false,
"passed": 2,
"task_id": "duplicate"
},
{
"any_attempt_passed": true,
"attempts": 3,
"every_attempt_passed": false,
"passed": 2,
"task_id": "citation"
},
{
"any_attempt_passed": true,
"attempts": 3,
"every_attempt_passed": false,
"passed": 1,
"task_id": "cancel"
},
{
"any_attempt_passed": true,
"attempts": 3,
"every_attempt_passed": true,
"passed": 3,
"task_id": "unanswerable"
}
],
"tasks_with_all_success": {
"denominator": 8,
"numerator": 3
},
"tasks_with_any_success": {
"denominator": 8,
"numerator": 7
},
"trial_success": {
"denominator": 24,
"numerator": 16
}
},
"B": {
"boundary": "Descriptive fixture ratios; any-attempt success assumes an oracle chooses a correct attempt and is not a deployed retry policy.",
"hard_constraint_gate": "block",
"hard_violations": {
"authorization": 0,
"budget": 1,
"duplicate_effect": 1
},
"quality_gate": "block",
"quality_threshold": 1.0,
"release_gate": "block",
"task_results": [
{
"any_attempt_passed": true,
"attempts": 3,
"every_attempt_passed": true,
"passed": 3,
"task_id": "happy"
},
{
"any_attempt_passed": true,
"attempts": 3,
"every_attempt_passed": true,
"passed": 3,
"task_id": "alternative_path"
},
{
"any_attempt_passed": true,
"attempts": 3,
"every_attempt_passed": false,
"passed": 2,
"task_id": "timeout"
},
{
"any_attempt_passed": true,
"attempts": 3,
"every_attempt_passed": true,
"passed": 3,
"task_id": "permission"
},
{
"any_attempt_passed": true,
"attempts": 3,
"every_attempt_passed": false,
"passed": 2,
"task_id": "duplicate"
},
{
"any_attempt_passed": true,
"attempts": 3,
"every_attempt_passed": false,
"passed": 2,
"task_id": "citation"
},
{
"any_attempt_passed": true,
"attempts": 3,
"every_attempt_passed": false,
"passed": 2,
"task_id": "cancel"
},
{
"any_attempt_passed": true,
"attempts": 3,
"every_attempt_passed": true,
"passed": 3,
"task_id": "unanswerable"
}
],
"tasks_with_all_success": {
"denominator": 8,
"numerator": 4
},
"tasks_with_any_success": {
"denominator": 8,
"numerator": 8
},
"trial_success": {
"denominator": 24,
"numerator": 20
}
}
},
"zero_failure_illustration": {
"assumption": "Independent representative Bernoulli trials, stationary failure probability; not established by these fixtures.",
"n": 30,
"one_sided_95_failure_upper": 0.095034
}
}- A=16/24 and B=20/24; both release gates block.
- A any/all-success tasks=7/8 and 3/8; B=8/8 and 4/8.
- Calibration TP/TN/FP/FN=3/2/2/1; false narration accepts=8.
Continue to do advanced research experiments
Let reviews read events and actual effects
Differentiate between run success, result contracts, and unscored semantic quality along actual checkpoints, events, and servicer receipts for the same research task.
Read full text and fault analysis → · Download experiment package ↓
python3 cli.py memory-put
python3 cli.py submit
python3 cli.py run
python3 evaluate.py
python3 -m unittest discover -s . -p test_lab.py -vKeep evidence and check item by item
- Explain the basis of passed in terms of events and checkpoints.
- Point out credible observations of scope, references, idempotent effects, and step budgets respectively.
- Semantic_support and model_quality are not_scored, and passed cannot be written as model quality score.
By default, deterministic summary functions and synthetic documents are used; real operating trajectories and mechanical constraints are evaluated, and there is no semantic support to verify the real model.
code example
The instrument changes while outputs stay fixed
Rescore unchanged agent outputs with a new judge. A score gain may describe judge/rubric drift rather than agent quality. Preserve shared anchors and rescore both versions with one instrument before attributing an improvement.
Acceptance task for this level
Specify a release evaluation for one-attempt writes and three-attempt read-only answers. Define task sampling, selector false accepts, retry budget, paired comparison, confidence assumptions and severe-failure regression gates.
Reading this browser’s record…
Hide the answer and check your understanding
Thirty sampled runs show no authorization failure. What additional assumptions are needed to quote the 95% binomial upper bound?
Expand reference derivation
Independent, representative Bernoulli trials with a stationary failure probability and correct failure observation. If tasks are selected, repeated, clustered, drifting or incorrectly graded, that bound does not describe deployment risk without a different sampling/modeling argument.
Further explanations and practice
When encountering unfamiliar principles, first read the implementation, continuous questioning and migration cases, and then independently explain the premise and boundaries. Answers and notes are saved to the original account record.
All linked explanations and exercises (5 )
- Acceptance is an evidence contract, not a prose impression · answer independently
- Evaluate both outcomes and execution traces · answer independently
- Independent and representative evaluation samples · answer independently
- A judge is a fallible measurement component · answer independently
- The success metric must match the allowed execution policy · answer independently
Sources and verification scope
The principles are based on public information; the numbers, cases and tasks are the teaching design of this website. Offline experiments verify the range noted on this page, and the learning effect still needs to be judged through independent tasks and feedback.
- Anthropic: agent evaluation task/trial/outcome distinctions
- NIST: binomial proportion intervals
- Local evaluation statistics and actual results
- Core experiments: download and run on a computer
- Complete after-sales Agent project: run on a computer
- Same-project evaluation, fault decisions and requirement changes
- Frozen traces, grading and budget evidence
- Atomic facts and rule derivations
- Versioned evidence contracts and preserved raw records
- Human semantic review practice
- Zero-request rubric, forms and trace-grounded cases
- Same-task review and repair cycle
- Zero-request cycle execution evidence
- Source-based review practice
- Learner exercise execution evidence