Skip to content

Experiment records: hypothesis, prediction, measured gap, reflection - #28

Open
AdvayMonga wants to merge 2 commits into
feat/ceilingsfrom
feat/experiment-records
Open

AdvayMonga wants to merge 2 commits into
feat/ceilingsfrom
feat/experiment-records

Conversation

@AdvayMonga

Copy link
Copy Markdown
Owner

Stacked on #27. Decided 2026-10-11: no measured number without the agent's reasoning beside it, and no reasoning without the number.

What

  • New hypothesis and reflect tools write ledger kinds hypothesis (hypothesis, rationale, optional abandon_if and from_record) and reflection (record, reflection, optional alternative).

  • bench, equiv, submit, profile, trace, kernel and hostprof require:

    • hypothesis_id: an open hypothesis of this run;
    • expect: metric, value, unit (absolute or change_pct vs the run's baseline), why.

    They also refuse a call while the run's latest measured record has no reflection. So the order is always hypothesis → prediction → measurement → reflection.

  • The measured record carries experiment: the prediction, the measured value the lab resolved from the result, the gap, and the noise band. When the lab can't compute the measured value, actual_missing says why (e.g. a trace has no scalar metric; the reflection carries it).

  • Held-out submit records may carry the block; its gap comes from the agent-visible aggregate.

  • The tool's reply ends with the prediction, the measurement and the gap, as facts.

  • The brief lists the run's hypotheses with their measurements and reflections.

  • Enforcement is at the agent's tool boundary: direct harness calls (baseline, tests) are unaffected.

Tests: tests/test_lab_experiments.py covers schema, refusals, the gap for absolute, change and submit, blocking until reflected, and the summary. The scripted session tests now file hypotheses. Full suite passes; ruff clean.

🤖 Generated with Claude Code

AdvayMonga and others added 2 commits October 12, 2026 11:09
- New ledger kinds `hypothesis` and `reflection`, written by the agent's `hypothesis` and `reflect` tools.
- bench, equiv, submit, profile, trace, kernel and hostprof require `hypothesis_id` (an open hypothesis of the run)
  and `expect` {metric, value, unit: absolute|change_pct, why}; refused while the run's latest measured record has
  no reflection.
- The measured record carries `experiment`: the prediction, the measured value, the gap and the noise band, or why
  the lab could not compute the measured counterpart. Held-out records may carry it (gap from the aggregate).
- The brief lists the run's hypotheses with their measurements and reflections.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A refused call (nothing measured) carries no experiment and needs no reflection.
- A held-out record's experiment block is checked: known fields, scalar values only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@AdvayMonga
AdvayMonga force-pushed the feat/experiment-records branch from 69155f3 to beccf81 Compare October 12, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant