Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,82 @@ Versions follow [Semantic Versioning](https://semver.org/).

## [Unreleased]

### Added — held-out confirmation that respects groups

Rows cut from one underlying item (frames of a clip, one prompt answered by
several models) are not independent. `evalrx explore --group-col COLUMN` and
`split_records(..., group_col=)` keep each group on one side of the split, and
`holdout_confirm(..., group_col=)` resamples whole groups for every interval.
`evalrx.stats.weighted_bootstrap` is the cluster bootstrap behind it, and
`compare(a, b, paired=False, cluster_by=(groups_a, groups_b))` is the clustered
two-group comparison. A `two_group` sufficient statistic may carry
`clusters_a` / `clusters_b`. When no group column is named, the profile
suggests columns that look like one (`DatasetProfile.suggested_group_columns`)
and a held-out run reports how many held-out rows share a group with an
explored row. `docs/holdout_confirmation.md` is the guide;
`docs/validation/holdout_calibration_20261121.md` has the calibration.

### Added — more comparisons a frozen recipe can ask for

A recipe may carry `where` (a subgroup condition), `design: stratified` with
`strata`, `design: did` with a `modifier`, `design: dose_response` with fixed
`bins`, and `expect` (`>`, `<`, `abs<` a bound, or `nonzero`). `abs<` is how a
control is written: it holds only when the whole interval is inside the bound.
Recipes may call `has_word(column, "word")` and `contains(column, "text")`.
A numeric outcome is supported (differences of means). Signals whose claim
holds list `representative_cases`, chosen at each side's median.
`evalrx.analysis.holdout_designs` implements the designs.

### Added — host-checked predictions and structured experiment plans

A hypothesis may carry `predictions` about named signals; the host checks them
on the held-out rows and reports `host_verdict` without a model. `experiment`
(`data_needed`, `operation`, `expected_result`, `falsified_by`) replaces a
free-text plan for an intervention. `HypothesisAgent` asks for both.

### Added — data card, leakage check, keyword recipes

`--data-card` (or `--row-unit`, `--row-extraction`, `--outcome-threshold`,
`--deployment-aggregation`) records what a row is and how the table was built;
answers and gaps are printed in the report's caveats. The profile flags
columns that almost fully determine the outcome
(`DatasetProfile.leakage_suspects`). `--group-col` / `--time-col` name column
roles explicitly, and calendar-like names and ISO date values are recognised
as time. `--text-col` freezes over-represented words as recipes on the
exploration half and re-tests them on the held-out half
(`evalrx.analysis.keywords`).

### Changed — every held-out claim is corrected, and the header says how

All held-out claims — one per adjudicated signal, one per hypothesis
prediction — share one Benjamini-Hochberg family; `reject` on a signal now
means its claim survived that correction, and `raw_reject` keeps the
uncorrected verdict. In-sample `two_group` candidates get a p-value and their
own BH family instead of an uncorrected interval check. `adjudication.method`
names the correction actually applied (`"BH"`, `"e-BH"`, `"e-BH + BH"`, or
`"none"` when nothing could be tested); it no longer says `e-BH` for an empty
family. Two-group comparisons of a binary outcome with independent rows use
the exact test for their p-value (`evalrx.stats.two_group_exact_p`).
`compare(..., paired=False)` reports its method as `two-sample bootstrap
(unpaired)` unless clusters were given.

### Changed — the held-out judge follows `--backend`

`--judge-backend` (default `same`) picks the judge; it no longer requires the
Claude CLI on a run that used another backend. `--judge-model` defaults to
`claude-opus-4-8` only on a Claude backend. `confirm_report.json` records
whether the judge is the model that proposed the hypotheses and warns when it
is or may be.

### Changed — row limit and sandbox

A host load that drops rows at `--max-rows` says how many were dropped and
that the kept rows are not a random sample
(`load_records_from_path(..., info=)`). `explore(..., out=)` deletes the
temporary sandbox, which holds a copy of the data, once the artifacts are
written; `--keep-sandbox` / `keep_sandbox=True` keeps it. Recipes are refused
if any of their expressions reads the outcome column, whatever its name.

### Changed — Stage 0 labels a sampled case by the majority of five answers

A sampling model can answer one case both ways, so one answer labelled the case
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@ evalrx explore ./results \

`codex` can be replaced with `claude_code`, `opencode`, `gemini_cli`,
`kimi_cli`, or `antigravity` — the selected coding-agent CLI must be installed
and authenticated separately. Then open the run, or export a portable file:
and authenticated separately. Add `--holdout-frac 0.4 --holdout-confirm` to
re-test what it finds on rows it never saw, and `--group-col` when several
rows come from one underlying item
([held-out confirmation](https://evalvitals.github.io/evalrx/holdout_confirmation/)).
Then open the run, or export a portable file:

```bash
evalrx serve evalrx_explore_output # local report server
Expand Down Expand Up @@ -221,7 +225,7 @@ raising it rather than climbing on its own.
| **L2** | Scaffolds around an unchanged model — multi-call, tools, aggregation | ✅ |
| **L3a** | Read internals — attention-guided cropping, contrastive decoding | ✅ |
| **L3b** | Write internals — attention reweighting, activation steering | ✅ |
| **L4** | **Parameter space — build a dataset, fine-tune, re-test; or write a training-free weight edit** | ✅ LoRA on the LLM ([`internals.py`](evalrx/eval_agent/stages/fix/internals.py)); ✅ rank-one weight edit, opt-in ([`weight_edit.py`](evalrx/eval_agent/stages/fix/weight_edit.py)); other recipe shapes recorded, not yet executed |
| **L4** | **Parameter space — build a dataset, fine-tune, re-test; or write a weight-space edit** | ✅ LoRA on the LLM ([`internals.py`](evalrx/eval_agent/stages/fix/internals.py)); ✅ rank-one weight edit, opt-in ([`weight_edit.py`](evalrx/eval_agent/stages/fix/weight_edit.py)); other recipe shapes recorded, not yet executed |

**L3b and L4 only exist for open weights** — you cannot modify a forward pass
or fine-tune through somebody's API.
Expand Down
10 changes: 8 additions & 2 deletions docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,21 @@ set.
| `--out` | `evalrx_explore_output` | Output directory for report/code/figures/tables. |
| `--backend` (`--coder-provider`) | `antigravity` | Coding-agent CLI: `antigravity`, `codex`, `claude_code`, `opencode`, `gemini_cli`, `kimi_cli`. Must be installed + authenticated separately. |
| `--model` (`--coder-model`) | backend default | Model name passed to the coding agent. |
| `--max-rows` / `--max-files` | `2000` / `200` | Sampling caps for large inputs. |
| `--group-col` | — | Column naming the unit rows were cut from. Keeps each group on one side of the held-out split and resamples whole groups for held-out intervals. See [Held-out Confirmation](holdout_confirmation.md). |
| `--time-col` | by name | Time column, when its name does not say so. |
| `--text-col` | — | Free-text column to mine for keyword recipes (chosen on the exploration half, re-tested on the held-out half). Needs `--holdout-frac`. |
| `--data-card FILE` | — | JSON/YAML answering `unit`, `extraction`, `threshold`, `aggregation`; printed in the report's caveats. Also `--row-unit`, `--row-extraction`, `--outcome-threshold`, `--deployment-aggregation`. |
| `--max-rows` / `--max-files` | `2000` / `200` | Caps on what the host loads. Rows dropped by `--max-rows` are reported with a warning. |
| `--timeout-sec` / `--max-attempts` | `120` / `2` | Per-attempt timeout and repair-retry budget. |
| `--serve-report` | off | Open the run's `report.html` in a browser when it finishes. |
| `--skill DIR` (repeatable) | — | Agent-Skill directory to style agent-authored figures. Implies `--allow-skills`. |
| `--no-skills` | off | Skip the package's bundled skills (e.g. `nature-figure`). |
| `--no-hypotheses` | off | Skip M3 — stop after M2's takeaways. |
| `--holdout-frac` | `0.0` | Fraction held out *before* exploration (outcome-stratified, deterministic). |
| `--holdout-confirm` | off | Re-test frozen recipes/hypotheses on the held-out rows (`confirm_report.json`). Requires `--holdout-frac > 0`. |
| `--judge-model` | `claude-opus-4-8` | Judge grading each hypothesis against the held-out table (only with `--holdout-confirm`). |
| `--judge-backend` | `same` | Backend of the judge grading each hypothesis against the held-out table (only with `--holdout-confirm`). `same` follows `--backend`; a judge that is also the proposer is flagged in the report. |
| `--judge-model` | per backend | That judge's model: `claude-opus-4-8` on a Claude backend, otherwise `--model`, otherwise the backend's default. |
| `--keep-sandbox` | off | Keep the temporary working directory (a copy of the data) instead of deleting it once artifacts are in `--out`. |
| `--no-narrate` | off | Don't print live per-stage terminal narration (see above). |
| `--progress-path PATH` | — | Also append durable JSONL progress events to `PATH`, for a separate workbench UI — independent of narration; both can run together. |

Expand Down
Loading
Loading