Skip to content
Agent Field Notes
Practice topicsFilter practice questions by topic.All practice →
knowledge unit 10AdvancedConceptsAbout 18 minutes

Understand → Implement → Debug → Design

The success metric must match the allowed execution policy

Report task and trial counts, then replace an oracle best-of result with a real fallible retry strategy.

pass@kStabilitystatistics

Knowledge content check2026-10-11 · Check the source of the original question2026-10-11

Which step do you want to learn from this knowledge point?

Select the starting point based on the current basis, or you can go deeper one by one. When you encounter an unfamiliar concept, go back to the core principles first; use the knowledge exercises to check your understanding when you are finished.

Understand first

New to this knowledge point

Complete the prerequisite concepts, read the principles and counterexamples, and then explain why in your own words.

Start with core principles →

Implement next

Prepare to write the principles into code

Understand implementation steps and boundaries, complete small tasks, and check results against acceptance requirements.

View the code example →

Debug failures

Need to handle failures and changes in conditions

Follow the continuous questioning to locate the failure premise, and then compare the migration cases to explain how the plan should be adjusted.

Continue to delve deeper into the problem →

Compare designs

Need to design or review plans

Combine engineering deductions and senior self-evaluation standards to explain the applicable conditions, costs and alternatives of the plan.

Analyze engineering scenarios →
Knowledge unit directory

LEARN · PRACTICE · REFLECT

Knowledge learning and personal records

My notes and review ↗

First read along the principles, Q&A and migration cases. When you need to check your understanding, switch to reinforcement exercises or start personal recording.

Answers and personal notes

Each modified commit will be kept as an independent history. Your level of mastery is up to you to evaluate yourself against the standards.

Core concept · The success metric must match the allowed execution policy

Understand the core principles first

Preparatory concepts:Task/trial grouping and paired comparison, Fallible verification and stopping rules, Effect identity and independent sampling assumptions

Observed repeat outcomes describe the sample; a reliability claim additionally needs the deployed selector/retry policy and a justified sampling model.

Visual guide · Repeat results have different denominators

Repeat results have different denominators

Any-success assumes useful selection; all-success asks a stricter question. Neither directly measures an untested retry policy. Select the figure to open it at full size.

Repeated observations reveal variability but they do not automatically create independent task evidence. A best-of group assumes successful selection, while every-attempt success asks a stricter question. Neither substitutes for measuring the actual runtime strategy.

The code reports these denominators and leaves confidence illustrations explicitly separate. A release decision also retains hard violation gates: B improves aggregate success but its duplicate and budget slices still block. See the evaluation course.

Acceptance: from actual evidence to separate verdicts
  1. 1
    Task contract

    Fix inputs, required evidence, prohibited actions, and budgets. Keep labels out of model input.

  2. 2
    Run record

    Bind prompt/model/data versions; retain tool events, artifacts, and business receipts.

  3. 3
    Hard gates

    Check authorization, structure, citations, budgets, and effect counts separately. An average score cannot offset a dangerous failure.

  4. 4
    Semantic review

    Check each free-form claim. Mark this dimension not_scored when review has not been performed.

  5. 5
    Comparison

    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.

Check understanding with a question

How do repeated attempts change the success metric and its guarantee boundary?

Compare with the reference answer

Report all trials and distinct tasks, single-attempt results and observed any/all-attempt task ratios separately. Evaluate the deployed retry/selection policy with its false accepts and shared budget. Compare paired tasks and cluster repeats by task for population inference. Selected authored repeats and zero observed failures do not establish deployment reliability.

Implementation and trade-offs

The authored A fixture has eight tasks with three attempts each. Trial success is16/24, any-success tasks7/8 and every-success tasks3/8. B yields20/24,8/8 and4/8. Those are different ratios with explicit denominators; best observed outcome cannot be relabeled single-attempt reliability.

Any-success assumes an oracle can choose the correct attempt. A real read-only retry policy stops when its verifier accepts a candidate; false acceptance, deadlines, shared budget and correlated attempts change that policy's outcome. Evaluate the whole policy, not just whether a successful candidate appeared later. A write must keep one durable business intent so retries do not become extra effects.

Pair A/B on the same task/attempt identities and report task deltas. Repeated attempts share task difficulty; for representative-population uncertainty, sample independent tasks and resample/cluster at the task level rather than treating every repeated record as independent. The lab's selected authored tasks support no population confidence interval.

The code illustrates Wilson bounds for a hypothetical independent16/24 sample, about[0.467063,0.820278], and a zero-failure one-sided95% upper bound1−0.05^(1/30)≈0.095034. Both explicitly require independent representative stationary Bernoulli observations and correct grading. They are mathematical illustrations, not estimated lab or production risks.

Reject duplicate (task_id, attempt) identities in each version before pairing. Set equality alone loses duplicate counts: copying one successful timeout trial into B can manufacture a task-level improvement. The code deliberately adds that duplicate and requires duplicate_trial_identity instead of a reported gain.

code example

Reproducible local boundary check

Python 3.9+, standard library. Extract /lab/deep-dive/agent-core-deep-dive-v1.zip and run this snippet beside evaluation_deep_dive.py; /lab/deep-dive/evaluation_deep_dive.py is also available. Authored fixtures only; not a live model or external service.

from evaluation_deep_dive import demo,fixtures,paired_task_deltas
d=demo()
assert d['versions']['A']['tasks_with_any_success']['numerator']==7
assert d['versions']['A']['tasks_with_all_success']['numerator']==3
assert not d['independent_sample_illustration']['applies_to_trial_fixture']
duplicated=fixtures('B')
duplicated.append(dict(duplicated[6]))
try:
    paired_task_deltas(fixtures('A'),duplicated)
except ValueError as error:
    assert str(error)=='duplicate_trial_identity'
else:
    raise AssertionError('A duplicate identity distorted the paired comparison')
print(d['zero_failure_illustration']['one_sided_95_failure_upper'])

expected output

0.095034

Engineering deduction

scene
Authored A/B matrices contain eight task contexts and three attempts each with correlated task conditions.
design decisions
Compute trial/any/all ratios, paired task deltas and assumption-labeled mathematical intervals separately.
Verify target
A16/24,7/8,3/8; B20/24,8/8,4/8. The independently sampled illustration is explicitly marked inapplicable to these fixture records.
applicable boundary
No actual retry selector, live model, independent population sample, real latency/cost or production failure probability is measured.

Continuous questions and answers

Continue reading along with the premises and constraints of the problem. Understand the reference answers first, then try to put away the answers and explain the cause and effect and trade-offs in your own words.

Draw inferences from one example: If the conditions change, how to deduce it?

First find out the conditions for change, and then determine which premises in the original plan still hold true. The following cases are teaching deductions to facilitate the transfer of principles to new problems.

Several candidates before one side effect

Changing conditions:The user may review three read-only drafts and only one approved artifact is sent.

Extended question:Which metrics and boundaries apply?

Derivation and reference solutions

Measure draft candidate quality and the human/automatic selection process separately from the final send acceptance. One reviewed send intent has its own authorization/effect receipt gate. Oracle best-draft statistics describe availability of a good candidate, not selection accuracy or delivery uniqueness.

The principles that remain unchanged:The reported metric must match selection and effect behavior actually allowed.

Money movement under a repeat strategy

Changing conditions:The task may issue at most one refund while transport requests repeat.

Extended question:How are attempts grouped safely?

Derivation and reference solutions

Keep one durable business operation and identical normalized payload across reconciliation/retry. Count request deliveries as transport evidence, not new legitimate refunds. Grade actual effect count and receipt identity, and block changed payload or unknown-provider blind retries.

The principles that remain unchanged:Repeated execution attempts cannot create multiple effects for one business intent.

Easy to make mistakes

  • Calling7/8 any-success tasks a single-attempt success rate.
  • Assuming the deployed verifier is an oracle that always selects the correct candidate.
  • Counting repeated or duplicate logs as independent sampled tasks.
  • Reporting zero failures as proof of zero risk.

References

Official mechanisms were checked on 2026-10-11. Examples and schedules are authored; local Python/SQLite outputs are actually executed. No enterprise incident, live model accuracy or production reliability is asserted. New Q&A and migration cases are added for principle explanation, and source verification and case operation verification are recorded separately.

Check how far you understand

After reading, you can explain the principles, boundaries, and trade-offs against these standards. It is up to you to evaluate your mastery; if further verification is needed, complete the small tasks below.

Basic standards met
Distinguishes task and trial counts plus any/all versus one-attempt success.
Intermediate and advanced signals
Reproduces counts and explains false-selector acceptance and paired task comparison.
Senior criteria
Designs actual-policy evaluation with shared budgets/effect identity and justified cluster/sampling uncertainty; states zero-failure limitations.

View verification records for independent examples

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 -v

Keep 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.

Hands-on verificationComplete on demand · Suggestions35 minutes

Run the evaluation fixture, reconstruct each task's three attempts and A/B ratios. Design a three-attempt read-only policy with a fallible validator, then contrast a one-operation write policy and the assumptions for zero-failure bounds.

Expand acceptance requirements and checkpoints
  • Trial/any/all numerators and denominators match the runnable output.
  • The retry policy includes stopping, false acceptance, deadline and total budget.
  • Write retries preserve one operation identity and reconcile unknown effects.
  • Population inference uses justified task sampling; fixture repeats are not presented as independent evidence.

Key inspections

  • Preserves all attempts and task-level denominators.
  • Distinguishes observed any success, every success and deployed-policy success.
  • Pairs versions and rejects duplicate/mismatched trial identities.
  • States independent sampling/stationarity assumptions for binomial bounds.