whitepaper
A Versioned Harness for One Controlled Tuning Comparison
I run one finite tuning experiment for you: a frozen bundle, a fixed paired cohort, explicit stop rules, and staged shadow and canary rollout before any release decision.
One experiment, not continuous optimization
This paper walks through a single controlled tuning experiment. It is distinct from a durability architecture and from an economics analysis. The question is narrow: for one candidate change, does measured behavior improve on a fixed cohort enough to justify a bounded canary, and what would stop that canary. The method is the one I apply to your tuning decisions.
The unit is finite by design. One baseline bundle, one candidate bundle, one frozen cohort, one prespecified analysis, one budget, and one named decision owner. No additional tuning rounds are permitted inside the comparison. If the result suggests another idea, that idea becomes a new experiment with a new version. This constraint prevents silent iteration on the test set from being presented as independent evidence.
Freeze the harness bundle before running
A versioned harness bundle names everything that can change behavior: prompt and system instruction versions, model identifier and parameters, tool and schema versions, retrieval index or document snapshot, policy and permission configuration, evaluation code and judge calibration, and rollback target. Each element receives an explicit version string and content digest where applicable. The run log records the complete bundle for baseline and candidate. An omitted version is treated as unknown, not as unchanged.
Permissions and rollback are part of the bundle, not surrounding documentation. The permission boundary states which operations the candidate may propose, which it may execute, which require human authorization, and which are prohibited even in shadow evaluation. The rollback entry names the prior permitted version, its compatible data and configuration, and any external effects that rollback cannot reverse, such as a message already delivered. A candidate without a restorable predecessor is not eligible for canary exposure.
Fix a reproducible cohort and keep pairs together
The cohort is fixed before either configuration runs. It contains routine requests, permission-sensitive workflows, multilingual inputs, edge cases, and cases where the correct behavior is refusal or abstention. Each item records provenance, expected behavior, risk stratum, and known limitations. The same item identities run against baseline and candidate, preserving pairs. Control or counterbalance run order and isolate tool state, caches and retrieval snapshots so warm-up or carryover is not mistaken for a candidate effect. Record stochastic settings and acknowledge that one run per item does not establish repeatability of a nondeterministic model. A refreshed cohort may later test generalization, but it does not replace or reinterpret the frozen comparison.
Risk strata are analyzed separately because headline averages can conceal concentrated harm. Routine tasks measure useful improvement. Permission-sensitive tasks measure whether an action exceeds authority, uses a changed revision, or proceeds without required evidence. Adversarial and refusal cases measure whether embedded instructions, changed permissions, or unsupported requests are correctly declined. A candidate may be accepted for routine work while remaining unacceptable for consequential actions. The release decision uses strata, not only the mean.
One controlled comparison from bundle to decision
- Freeze bundle — Version prompt, model, tools, contracts, evals, permissions, and rollback target.
Prevents an unrecorded prompt, tool, or policy change from being mistaken for model improvement.
Alternative: Use a checklist review instead of digests for very low volume, accepting weaker reproducibility.
- Fix cohort — Lock routine, sensitive, multilingual, edge, and refusal items with strata and provenance.
A stable denominator exposes per-item differences; controlled conditions and an appropriate design are still needed to attribute them to the candidate.
Alternative: Sample live traffic only after the frozen comparison, to test representativeness separately.
- Run paired — Execute baseline and candidate on identical items with paired logging and cost and latency capture.
Pairing controls the item set and exposes regressions; run-order, state and stochastic variation still need handling.
Alternative: Use independent samples with larger size and explicit variance accounting when pairing is infeasible.
- Stratified review — Score acceptance, abstention, repair, cost, latency, and failures separately by risk stratum.
A routine gain must not outweigh a concentrated increase in sensitive or refusal failures.
Alternative: Use aggregate scoring only for non-consequential tasks with documented owner acceptance.
- Shadow then canary — Compare without side effects first, then expose a bounded population under stop rules.
Enforced shadow isolation avoids production effects; a separately authorized canary limits exposure while gathering operational evidence.
Alternative: Use case-by-case human receiving with no canary when volume is low and consequences are high.
- Stage or roll back — Expand only on prespecified criteria; halt, reconcile in-flight work, and restore the permitted version otherwise.
A predefined reversal path keeps a late failure recoverable after partial exposure.
Alternative: Hold at the current stage and escalate to the named owner when evidence is inconclusive.
Observations revise the next candidate and cohort design; they do not alter the recorded result of this comparison.
Sample scenario with correct arithmetic
A frozen cohort contains 200 items: 140 routine, 40 permission-sensitive, and 20 adversarial or refusal items. Baseline and candidate each run once on all 200 items. Outcomes use four exclusive categories: accepted without repair, accepted after human repair, correct abstention or refusal, and failure. Baseline records 132 accepted, 24 repaired, 30 abstained, and 14 failed, totaling 200. Candidate records 142 accepted, 18 repaired, 22 abstained, and 18 failed, totaling 200. Headline acceptance rises from 66 percent to 71 percent, repair falls from 12 percent to 9 percent, and failure rises from 7 percent to 9 percent.
Stratified failures reverse the headline impression. Example partition: baseline failures are 8 routine, 3 sensitive, and 3 adversarial, totaling 14; candidate failures are 4 routine, 7 sensitive, and 7 adversarial, totaling 18. Routine failure rate improves from 5.7 percent to 2.9 percent. Sensitive failure rate worsens from 7.5 percent to 17.5 percent. Adversarial failure rate worsens from 15 percent to 35 percent. The full example outcome matrix makes the tradeoff inspectable. In the order first-pass accepted / accepted after repair / correct abstention / failure, baseline routine is 110/18/4/8, sensitive is 18/4/15/3, and adversarial is 4/2/11/3. Candidate routine is 120/12/4/4, sensitive is 18/4/11/7, and adversarial is 4/2/7/7. The row totals are 140/40/20 for each configuration. Correct abstentions in the two higher-risk strata fall from 26 to 18 while failures rise from 6 to 14. The scenario shows a risk pattern; the aggregate counts alone do not identify which individual decisions changed.
Cost and latency are reported alongside quality. Example measurement: baseline metered model-and-tool spend is 8.20 example dollars for 200 tasks, mean 0.041; candidate spend on the same narrow basis is 10.60, mean 0.053, an increase of 2.40 dollars per 200 tasks or about 29 percent. Baseline latency is 1.9 seconds median and 4.2 seconds 95th percentile; candidate is 2.3 seconds median and 4.8 seconds 95th percentile. The reading is therefore conditional: the candidate has more first-pass routine acceptances but higher metered spend, slower median and tail response latency, fewer correct abstentions and worse failures in the strata that govern release. These latency figures cover response generation, not end-to-end human acceptance time. That pattern supports further prompt or permission work, not rollout.
Metered spend is not cost per accepted outcome. The measurement sheet must separately include reviewer time, repair, judge and retrieval charges not already metered, infrastructure and reconciliation, with onboarding distinguished. This example leaves those amounts unpriced rather than inventing an all-in saving. First-pass acceptance (132/200 and 142/200) also differs from accepted after repair (24/200 and 18/200); settled accepted totals are 156 and 160 at this cutoff, while correct abstentions remain a separately valued outcome.
Leakage, holdout, overfitting, and insufficient evidence
Leakage makes a comparison look better than the change deserves. Examples include tuning on evaluation items, reusing near-duplicates of test prompts in training or retrieval, deriving features from labels, calibrating a judge on the same items it later scores, or refreshing the cohort after observing candidate weaknesses and retaining only favorable cases. The control is procedural: separate tuning and evaluation material, record retrieval snapshots, keep judge calibration data disjoint from scoring data, and freeze the cohort before the candidate runs.
Tuning overfit and small samples are separate insufficiencies. Repeatedly adjusting instructions against the same 200 items can improve those items without improving adjacent requests. With 40 sensitive and 20 adversarial items, a shift of four failures changes each rate by 10 to 20 percentage points, so stratum estimates are noisy. Paired disagreement analysis helps: report how many items changed in each direction, inspect the items where baseline succeeded and candidate failed, and retain a small holdout that neither tuning nor judge calibration observes. If the holdout is too small for a consequential decision, state that explicitly and use human receiving rather than claiming statistical confidence.
Finite budget, reviewer capacity, and staged exposure
Each experiment has a finite budget and written stop rules. The budget covers model and judge cost, retrieval, human review time, latency impact, and reconciliation work. Stop rules name quantitative and qualitative triggers: maximum sensitive or refusal failure count, maximum repair queue depth, latency or cost ceiling, distribution shift, permission or consent change, and any prohibited action. Reviewer capacity is a binding constraint. If reviewers cannot inspect disagreements, repairs, abstentions, and canary alerts within the agreed window, the experiment pauses rather than accumulating unreviewed exposure.
Shadow comparison precedes any live effect. The candidate processes the same inputs as production but its consequential outputs are recorded and withheld. Shadow must enforce isolation, not merely hide the final answer. Substitute recording transports or isolated fixtures for consequential tools, disable production writes and sends, and constrain network access and data exposure. Evaluation artifacts may be committed to an authorized test store; that is distinct from mutating production records. Copying real inputs or calling an external model still has privacy and cost implications that require appropriate authorization. Mismatches against baseline and against human receiving are classified as improvement, neutral difference, repairable error, or unacceptable action. Only a shadow result without unacceptable actions and with manageable repair load becomes eligible for canary.
Canary exposure is bounded, with a tested stop and recovery plan; it is not necessarily reversible. It specifies population, duration, permitted actions, escalation path, and decision owner. Protected actions remain human-operated or prohibited during canary even if shadow performance looks strong. Staged rollout expands only when stage criteria are met; otherwise the team stops new exposure, reconciles in-flight attempts, restores the prior permitted version, and repairs downstream consequences. Rollback is versioned recovery, not automatic real-world approval: some effects cannot be recalled, compensation may itself require authorization, and a late reversal must preserve the lineage from original failure through recovery.
Late review can reverse an acceptance. Preserve the initial decision and publish a later disposition with the defect, affected bundle and cohort items, revised accepted count and any recovery cost. Sampled telemetry is useful for diagnosis but must not be treated as a complete action ledger. The cited OpenTelemetry sampling guidance concerns diagnostic trace selection; Netflix’s Kayenta article illustrates one canary-analysis approach, not approval for this workflow. Stripe’s retry contract and OWASP’s prompt-injection discussion inform separate safeguards, not a guarantee that a frozen harness is safe.
Tradeoffs, measurement, and a buyer invitation
The recurring tradeoff is between routine fluency and consequential reliability. A candidate can reduce repair work while increasing the exact failures a release must prevent. Additional tradeoffs include cost per accepted task versus reviewer load, median latency versus tail latency under retry and review, abstention precision versus user friction, and judge scale versus judge calibration error. Measurement therefore tracks accepted outcomes, correct abstentions, repair burden, unresolved recovery work, cost and latency distributions, and stratum-specific failure counts. Missing telemetry is reported as unknown with its collection gap, not as zero.
The engagement starts from one near-term tuning or release decision and a small set of representative successes, repairs, abstentions, and failures. I define the bundle versions, fix a reproducible cohort with risk strata, specify budget and stop rules, and connect shadow and canary evidence to a named owner decision. No cost reduction, performance gain, or production approval is promised.