Chapter 48 of 60

Discriminating Experiments

Concepts

CHAPTER 48 โ€” Discriminating Experiments

PART VIII โ€” Building the AI Debugger

PURPOSE

Prices Ch47’s space into single-variable runs ordered by branches-closed-per-cost, so three cheap series (list inspection โ†’ k-expansion โ†’ wording-swap) decide what nine naive fix-first runs could not.

CENTRAL QUESTION

How do we design each experiment for maximum information per run โ€” splitting the hypothesis space fastest with the fewest single-variable interventions?

UNIQUE CLAIM

Only this chapter defines the run-as-space-split with a four-field pre-run contract (single variable, divergent pre-predictions, variance-set trials, kill-first order) plus the phase split: single-variable OFAT for discriminating attribution, small factorial for confirmation-phase interactions โ€” with re-tabling after every outcome.

DEBUGGING OBJECT

Stale (H1) vs demotion (H2) vs override (H3) RAG space: RUN A list-inspection (~0 cost, splits H1/H2) โ†’ RUN B k-expansion 5โ†’50 ร—3 โ†’ RUN C wording-swap ร—3; constructed A absent + B/C negative ร—3 converges on H1; naive plan’s re-index/retrain/5-rewrites moved two variables per run with post-hoc predictions.

CONCEPTS INTRODUCED (only genuinely new here)

  • Discrimination table (vary/freeze/trials/cost + per-H predictions + closes-on-A/B) with branches-closed-per-run pricing and kill-first ordering
  • Factorial discipline: evidence ร— wording ร— k cells with one factor per series, interpretable attribution; recycle/re-table step as the skipped discipline
  • Trial counts by variance (1 deterministic hash-verified; โ‰ฅ3 nondeterministic, stability not anecdote)

CONCEPTS DEVELOPED / REUSED (with source chapter)

  • Executes Ch47 spaces under Ch46 I-4/I-5; single-variable rule from Ch1 now priced in hours; confirmation factorial feeds Ch49 verification

PREREQUISITES

Enumerated Ch47 space + Ch45 manifest + per-run cost/variance notes; live branches listed with exonerated ones struck and cited.

LOCAL INVARIANTS

  • Exactly one factor per run, rest hash-frozen; every live H predicts distinctly, dated before running; kill-first order; re-table before the next run.

FAILURE MODES (this chapter’s specific ones)

  • Favorite-first runs; bundled two-change interventions; post-dated “predictions” (I-4 fail); single-trial closure on varying systems; score-watching (reranker deltas as outcomes); run-until-relief instead of branch closure.

DIAGNOSTIC METHOD (3-6 steps)

  1. List live branches with deciding runs cited for the dead.
  2. Design one variable per run with divergent pre-dated predictions.
  3. Set trials by variance (1 vs โ‰ฅ3).
  4. Order cheapest-most-splitting first; execute top row; record branches closed; re-table.

RESEARCH-DERIVED IDEAS (papers/findings with bounds)

  • Platt, Strong Inference, Science 1964 โ€” alternative hypotheses โ†’ crucial experiment excluding โ‰ฅ1 โ†’ clean result โ†’ recycle (conditional inductive tree); Ch47 built the tree, Ch48 designs each experiment; bounds: much-debated 1964 essay โ€” its documented limits (presumes a complete hypothesis set + a clean crucial experiment; under-weights prior evidence โ€” Fudge 2014 retrospective + critics Davis 2006, O’Donohue & Buchanan 2001) are answered by Ch47’s coverage and Ch49’s survival bar.
  • Fisher, Design of Experiments, 1935 โ€” factorial beats pure OFAT for efficiency + interactions (bearing-lifespan 5x example missed by decades of OFAT); hence OFAT to discriminate, small factorial to confirm; bounds: agricultural DOE, transfers in spirit.
  • Lindley, Information Provided by an Experiment, Ann Math Stat 1956 โ€” branches-closed-per-run as discrete expected information gain; the recycle-after-every-outcome loop is its SEQUENTIAL form (modern Bayesian OED formalizes the adaptive version).
  • Chamberlin, Multiple Working Hypotheses, J Geol 1897 โ€” don’t fall in love with one hypothesis.

EXPERIMENT / LAB (actual lab, H-structure)

Lab 48 (PROPOSED): redesign one naive run into a discriminating series. H1: table’s first run splits โ‰ฅ2 branches cheaper; H2: equal speed; H3: naive faster. Fill table (one variable, divergent priors, trial counts, kill-first), execute first series only (โ‰ฅ3 if nondeterministic), log branches-closed-per-run. Fix without table is not completion.

COMPANION TOOL (name + accepts/can-establish/cannot-establish)

Hypothesis Experiment Designer โ€” accepts: Ch47 space, manifest, cost/variance notes. Can establish: which run is next and what each outcome would close (this space only). Cannot establish: cause, cross-space optimality, future costs; never uses scores, confidences, agreement, single outcomes, relief.

PREVENTION ARTIFACT

Dated discrimination table + execution log (branches-closed-per-run) with overlapping-prediction rows redesigned before running.

READER OUTCOME (testable phrasing)

Given โ‰ฅ2 competing hypotheses, reader fills a one-variable-per-run table with divergent pre-dated predictions and variance-set trials, executes the cheapest-most-splitting series, and reports branches closed per run with a re-tabled next step.

DEPENDENCIES

Ch47 space; Ch46 invariants; Ch1 single-variable rule; Ch49 consumes the confirmation factorial.

FORWARD BRIDGE

Cheap splits leave survivors that may still be wrong (shared confounder, misfrozen variable); Ch49 sets the four-part verification bar (ledger, independence, reversal, sign-off) before anyone signs a diagnosis.

EVIDENCE / RESEARCH REQUIREMENTS

Reader’s own design table + execution log; constructed Aโ†’Bโ†’C table only, no measured runs.

ANTI-CLAIMS / LIMITS

One table covers one space under one bundle; warrants run-efficiency, not cause; version/index/prompt changes void frozen columns until re-tabled. UNKNOWN wherever variables moved together or predictions post-date outcomes.

Explain this chapter with AI

Copy this prompt into ChatGPT, Claude, Gemini, a local model, or another AI.

Apply this chapter with AI

Copy this prompt into ChatGPT, Claude, Gemini, a local model, or another AI.

Part VIII โ€” Building the AI Debugger

Three hypotheses, nine runs, one lesson

Chapter 47 mapped the space; this chapter prices the search. A practitioner holds three live hypotheses for a RAG fabrication โ€” stale snapshot (H1), reranker demotion (H2), prompt override (H3) โ€” and runs them naively: re-index (expensive, hours), retrain the reranker (days), rewrite the prompt five ways (scattershot). Nine runs later H1 is confirmed by accident โ€” the re-index fixed it โ€” but the prompt rewrites also “helped” once each, the reranker retrain changed scores without changing outcomes, and nobody can say which run proved what because two variables moved per run and predictions were written after seeing outputs.

OBSERVATION: nine interventions executed, multiple variables changed per run (re-index plus prompt edits together), predictions recorded post-hoc, trial counts of one per condition. HYPOTHESIS H1/H2/H3 (carried from Ch47): each predicts a distinct signature โ€” but the run log cannot assign outcomes to hypotheses because runs were not discriminating. INFERENCE: none yet โ€” the same nine runs, redesigned as three single-variable discriminating experiments with pre-written predictions, would have decided the space; as executed they established effort, not cause.

This chapter’s question: how do we design each experiment for maximum information per run โ€” splitting the hypothesis space fastest with the fewest single-variable interventions?

Why “try the most likely fix first” fails first

The obvious move โ€” intervening on the favorite hypothesis immediately โ€” fails because confirmatory runs teach little and confound much. Five defects hide behind fix-first experimentation:

  1. Multi-variable runs. Changing the index and the prompt together: any outcome is uninterpretable. One variable per run or the run teaches nothing (Ch01’s rule, now priced in hours).
  2. Confirmatory-only design. Testing H1 in a way H1 passes under every hypothesis (“re-run and see if it looks better”). Runs must be able to fail each hypothesis distinctly.
  3. Prediction-after-outcome. Writing “as expected” after seeing the result. Post-hoc predictions are storytelling with timestamps missing (I-4 fails).
  4. Single-trial verdicts on varying systems. One seed, one run, one conviction. Nondeterministic steps need โ‰ฅ3 trials per condition before any branch closes.
  5. No factorial discipline. Testing H3’s five prompt rewrites while H1/H2 stay uncontrolled, so prompt “effects” are retrieval noise. Factors vary one at a time or in a planned factorial โ€” never by drift.

OPINION: an experiment budget spent fix-first buys motion; the same budget spent discrimination-first buys decisions. Runs are currency โ€” spend each on eliminating branches, not on comforting favorites.

The mental model: each run is a question that splits the space. A discriminating experiment is designed so its possible outcomes assign differently across live hypotheses: outcome A exonerates H1 and keeps H2, outcome B the reverse. Information per run is the number of branches a single outcome closes. The best next run is the one whose outcomes partition the live set most evenly at the lowest cost โ€” cheap, decisive splits before expensive, confirmatory ones.

This is Platt’s strong inference, made concrete โ€” itself a sharpening of Chamberlin’s older method of multiple working hypotheses, which urged holding several explanations in mind at once precisely so that no single one captures the investigator’s loyalty before the evidence is in (Chamberlin, 1897). Platt argued that fast-moving sciences all run the same loop: devise alternative hypotheses, devise a crucial experiment that will exclude one or more of them, perform it cleanly, then recycle on what remains โ€” a “conditional inductive tree” like the branching table for qualitative chemical analysis (Platt, 1964). Chapter 47 built the tree; this chapter designs each crucial experiment. Formally, “branches closed per run” is a discrete stand-in for the expected information gain of an experiment (Lindley, 1956); the recycle-after-every-outcome loop is its sequential form, which modern Bayesian optimal experimental design formalizes. Strong inference has documented limits โ€” it presumes the true cause is among the enumerated hypotheses and that a clean crucial experiment exists, and it under-weights prior evidence in deciding which experiment is genuinely crucial (a retrospective at fifty years and its critics โ€” Fudge, 2014). This chapter is bracketed by the two that answer that: Chapter 47’s coverage discipline (is the true cause even on the list?) and Chapter 49’s survival bar (a branch can survive every split and still be wrong).

The method: discriminating power with factorial discipline

Design every run with four fields filled before execution:

  1. Single variable. Exactly one factor changes (evidence set, wording, seed, k, version pin); all else frozen to bundle hashes. Two changes โ†’ two runs, no bundling.
  2. Pre-written divergent predictions. Each live hypothesis predicts a distinct observable for this run. If two hypotheses predict the same outcome, the run cannot split them โ€” redesign.
  3. Trial count set by variance. Deterministic steps: 1 trial suffices with hashes verified. Nondeterministic steps (temperature > 0, unseeded sampling, racing tools): โ‰ฅ3 trials per condition, outcome reported as stability (3/3, 2/3) never as a single anecdote.
  4. Kill-first ordering. Run the cheapest intervention that exonerates the most branches first. Presence-checks (is the chunk in the list?) precede re-indexes; k-expansion precedes retrains; wording-swaps precede architecture changes.
    flowchart TD
    B["live branches from the Ch47 space (exonerated ones struck, deciding run cited)"] --> D["design one run: exactly one variable changes, all else frozen to bundle hashes"]
    D --> P{"each live hypothesis predicts a DISTINCT observable for this run?"}
    P -->|no| RD["redesign โ€” a run that can't split them teaches nothing"]
    P -->|yes| T["set trial count by variance: 1 if deterministic, >=3 if sampling / racing"]
    T --> O["order runs kill-first by (branches closed / cost): list inspections before re-indexes, k-expansion before retrains"]
    O --> RUN["run the cheapest most-splitting series; record branches closed per outcome"]
    RUN --> RT{"more than one live branch remains?"}
    RT -->|yes| RETAB["re-table before the next run (Platt's recycle step)"]
    RETAB --> D
    RT -->|"one branch"| CONF["route to Ch49 confirmation (small factorial over the surviving factors)"]
  
DISCRIMINATION TABLE (worked sketch; constructed, not a measured run):
Symptom: fabricated citation. Live: H1 stale / H2 demotion / H3 override.
RUN A (cheap): inspect ranked list for gold chunk (no execution).
  H1 predicts ABSENT | H2 predicts PRESENT-below-k | H3 predicts either.
  Cost ~0 โ†’ splits H1 vs H2 outright. RUN FIRST.
RUN B (cheap): k-expansion 5โ†’50, all else frozen, ร—3 trials.
  H1 predicts no change (absent stays absent) | H2 predicts citation returns.
  Splits H1/H2 behaviorally if A was ambiguous. RUN SECOND.
RUN C (cheap): wording-swap with evidence frozen, ร—3 trials.
  H3 predicts citation returns | H1/H2 predict unchanged fabrication.
  Splits instruction vs evidence layers. RUN THIRD.
RULE: Aโ†’Bโ†’C costs three cheap series; the naive re-index-first plan
cost one expensive run that H2/H3 could neither confirm nor kill.

OBSERVATION (constructed illustration, not a measured run): Run A shows the gold chunk absent; Run B changes nothing ร—3; Run C changes nothing ร—3. UPDATED BELIEF: H1 supported (absence + B/C negatives converge); H2 exonerated here (expansion cannot restore what absence explains); H3 exonerated here (wording inert with evidence frozen) โ€” three cheap series, one surviving branch, predictions pre-dated.

No reranker score delta, no confidence shift, no agreement between repeated assistant judgments, no single improved anecdote, and no downstream symptom quieting substitutes for a pre-registered split with trial counts. Tables, not impressions.

Example: the factorial the naive plan skipped

The naive nine runs changed index + prompt + k across overlapping trials. The discriminating redesign holds a factorial: evidence state (stale/fresh) ร— wording (orig/swap) ร— k (5/50), varying one factor per series with the others frozen, โ‰ฅ3 trials per cell where sampling varies. The table fills in four series instead of nine, and the H1 cell (fresh + orig + 5 โ†’ citation returns ร—3) with the stale-cell contrast is the intervention-effect confirmation Chapter 49 will formalize. The saving is not just runs โ€” it is interpretability: every cell’s outcome is assignable to exactly one factor.

Research lineage: one factor at a time, then a factorial

OFAT is for attribution; a factorial is for efficiency and interactions. Fisher’s argument against pure one-factor-at-a-time experimentation was that a factorial design learns as much about many factors in the same number of trials and reveals interactions that OFAT structurally cannot โ€” the classic example is three treatments whose combination multiplied a bearing’s lifespan fivefold, an effect decades of one-at-a-time testing missed (Fisher, 1935). This chapter’s rule is not “OFAT always.” It is: use single-variable runs for the discriminating phase, where the goal is clean attribution of which branch an outcome closes; then, in the confirmation phase (Chapter 49), run a small factorial over the surviving factors โ€” evidence state ร— wording ร— k โ€” because that is where an interaction (a wording that only matters under stale evidence) would hide.

The recycle step is the discipline people skip. Platt’s loop does not end at “perform the experiment”; it ends at “recycle on what remains.” The chapter’s “re-table after every outcome before the next run” is that step. A team that designs one discrimination table and then executes it front-to-back without re-tabling has stopped doing strong inference after the first branch.

Lab 48: redesign one naive run into a discriminating series (proposed)

PROPOSED, not executed: no author-measured results are reported. The evidence this chapter requires is the reader’s own design table.

Setup. Take one live symptom with โ‰ฅ2 competing hypotheses and one naive run you already performed or planned. The design regime (naive fix-first vs. this chapter’s discrimination table) is the independent variable; symptom, bundle, and system are controlled.

Task.

  1. Before redesigning, write H1/H2/H3 about the regimes with distinct predicted information outcomes: H1: “the table’s first run splits โ‰ฅ2 branches at lower cost than the naive run”; H2: “both designs decide equally fast”; H3: “the naive run decides faster (discrimination overhead wastes runs).”
  2. Fill the discrimination table: one variable per run, divergent pre-predictions per live hypothesis, trial counts by variance, kill-first order.
  3. Execute the table’s first series only (โ‰ฅ3 trials if nondeterministic); record branch closures per run.
Hypothesis Predicted information signature FORECAST OBSERVATION (ร—3) UPDATED BELIEF
H1 table wins first run closes โ‰ฅ1 branch, cheaper ___ ___ ___ ___ live/exonerated
H2 regime-neutral equal branches closed per run ___ ___ ___ ___ live/exonerated
H3 naive faster naive closes first ___ ___ ___ ___ live/exonerated

Success criterion. A filled discrimination table with pre-dated predictions plus an execution log showing branches-closed-per-run. A fix applied without the table is explicitly not completion.

Companion tool: Hypothesis Experiment Designer

What it accepts: the enumerated hypothesis space (Ch47), the bundle manifest, and the per-run cost/variance notes. What it performs: it enforces one variable per run, requires divergent pre-predictions per live hypothesis, sets trial counts (1 deterministic / โ‰ฅ3 nondeterministic), orders runs kill-first by (branches-closed รท cost), and emits the discrimination table above. What it can establish: which run to do next and what each possible outcome would close โ€” for the examined space only. What it cannot establish: the cause, cross-space optimality, or future cost estimates. It never treats scores, confidences, agreement, single outcomes, or symptom relief as design inputs. How its output changes your next action: table emitted โ†’ execute the first row with predictions locked; rows with overlapping predictions โ†’ redesign before running; no cheap splits remain โ†’ escalate to the expensive decisive run with full trial discipline.

Paper form, sufficient for this chapter:

Space: ___ (live H ___)  Bundle: ___
RUN ___: vary ___ freeze ___ trials ___ cost ___
  H1 predicts ___ | H2 predicts ___ | H3 predicts ___
  closes: ___ on outcome A / ___ on outcome B
ORDER (branches/cost): ___ โ†’ ___ โ†’ ___  PREDICTIONS DATED: ___

Where a software implementation does not yet exist in the reader’s stack, this record is the tool. Split, don’t splash.

Reusable procedure: price every run in branches closed

  1. List live branches โ€” from the Ch47 space, exonerated ones struck with their deciding run cited.
  2. Design one variable โ€” single factor, rest frozen to hashes.
  3. Pre-write divergences โ€” every live H predicts distinctly, dated before running.
  4. Set trials by variance โ€” 1 where deterministic, โ‰ฅ3 where sampling or racing varies.
  5. Kill-first order โ€” cheapest most-splitting run next; re-table after every outcome.

Failure modes

  • Favorite-first runs. Testing H1 because it is liked. Liked is not discriminating; splits order runs.
  • Bundled interventions. Two changes, one run, zero attribution. Unbundle or discard.
  • Post-dated predictions. “Predicted” after observed. Undated predictions are inadmissible (I-4).
  • Single-trial closure. One varying run exonerating a branch. Variance obligates repetition.
  • Score-watching. Tracking reranker scores across runs as the outcome. Scores are not intervention effects; behavior deltas are.
  • Run-until-relief. Stopping when the symptom quiets rather than when branches close. Relief ends toil; closure ends diagnosis.

Limits, per contract: one table covers one space under one bundle; it warrants run-efficiency, not cause; version/index/prompt changes after tabling void the frozen columns until re-tabled. UNKNOWN wherever variables moved together or predictions post-date outcomes.

References

Debugging Checklist

  • Live branches listed with exonerated ones struck and cited?
  • Exactly one variable per designed run (rest hash-frozen)?
  • Every live hypothesis predicts a distinct outcome, pre-dated?
  • Trial counts set by variance (โ‰ฅ3 where nondeterministic)?
  • Runs ordered cheapest-most-splitting-first?
  • No scores/confidences/agreements/single anecdotes as outcomes?
  • Branches-closed-per-run recorded after each execution?
  • Table re-issued after every outcome before the next run?

What This Chapter Established

  • Discriminating experiment design: single-variable runs with divergent pre-predictions, variance-set trial counts, and kill-first ordering priced in branches-closed-per-run โ€” demonstrated on the constructed Aโ†’Bโ†’C table, no measured runs claimed.
  • The run-as-space-split mental model with factorial discipline (one factor per series, interpretable cells).
  • Lab 48 as a proposed naive-to-discriminating redesign record the reader executes; the Hypothesis Experiment Designer contract (accepts/performs/can-establish/cannot-establish/next-action).
  • What was NOT proved: any cause, any cross-space optimality claim, or any cost generality. One table designed; nothing concluded.
  • Research grounding: this is Platt’s strong inference (sharpening Chamberlin’s older method of multiple working hypotheses) โ€” alternative hypotheses, a crucial experiment that excludes one or more, a clean result, then recycle (the conditional inductive tree); “branches closed per run” is a discrete expected-information-gain (Lindley), and the recycle loop is its sequential form (modern Bayesian OED); single-variable runs give clean attribution in the discriminating phase, but the confirmation phase (Ch 49) wants a small factorial because interactions hide from one-factor-at-a-time testing (Fisher); the recycle / re-table step is the one teams skip; and strong inference’s known limits (it presumes a complete hypothesis set and a clean crucial experiment โ€” Fudge and its critics) are answered by Ch 47’s coverage and Ch 49’s survival bar.

Next

Cheap splits decide most spaces โ€” but deciding is not verifying. A branch can survive every split yet still be wrong (shared confounder, misfrozen variable, mistaken signature). Survival demands a higher bar before anyone signs a diagnosis. Chapter 49, “How Do You Know the Diagnosis Is Right?,” sets that verification standard โ€” prediction-match ledgers and independence of verification evidence.