Skip to content

Commit b9c9c74

Browse files
authored
Merge pull request #17 from NingyuSUN/model-reviewers
Model reviewers on the blinded ClinVar packet, and their analysis (#17, #22)
2 parents f235f84 + fe8853d commit b9c9c74

10 files changed

Lines changed: 1267 additions & 2 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
## Unreleased
44

5+
- Add model reviewers for the blinded ClinVar review packet (#17, #22). `model_reviewers.py` gives the six benchmark
6+
models exactly what experts get, one isolated session per case, with tools disabled or detected, stops a model
7+
whose account is out of quota, and lets Claude run on a different install than Codex and Antigravity. All six
8+
reviewed all 190 cases with no tool use. `analyze_models.py` reports inter-model agreement now (alpha 0.49–0.53
9+
for the clinical and expert uses: the models often split), and, once the expert labels exist, scores per subset,
10+
error correlation, whether unanimous models are right, and a decision rule fixed before any label. Per-case model
11+
labels stay private until the expert review is complete; the published summary holds only what cannot unblind a
12+
reviewer.
513
- Add the real extraction experiment (#21, `examples/civic_extraction`, `evaluation/llm_benchmark/extraction_loop.py`).
614
Six models extract clinical evidence claims on their own from 50 openly licensed papers that CIViC curated (10
715
pilot, 40 test; protocol frozen before the test split). Each claim, written in the fields of `draft-schema`,

‎README.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,8 @@ context of use, model risk, credibility evidence, adequacy): the
290290

291291
Tracked in the [AI validation roadmap](https://github.com/NingyuSUN/bioai-evidence-validator/blob/main/docs/AI_VALIDATION_ROADMAP.md) (#26):
292292
- expert review of the benchmark cases (#23), including the 60-claim sample from the extraction experiment (#21);
293+
- scoring the six models' reviews of the 190 ClinVar cases against those expert labels. The models have reviewed
294+
them, and they often disagree with each other (#22);
293295
- an expert audit of admitted records with `bioevidence review audit-sample` and `audit-score`, which bound
294296
the error rate of what still gets through. The tool and a dry run are done (#24); the audit needs experts.
295297
- the [validation dossier](https://github.com/NingyuSUN/bioai-evidence-validator/blob/main/docs/VALIDATION_DOSSIER.md),

‎docs/AI_VALIDATION_ROADMAP.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ source → structured extraction → provenance → deterministic validation
4949
| Structured extraction | Did the AI turn the source into the right claim? | Draft format and per-profile JSON Schema for LLM output | Run with six models on 40 held-out openly licensed papers: no admitted claim with a wrong identifier, name or quote; semantic correctness awaits expert labels | [#21](https://github.com/NingyuSUN/bioai-evidence-validator/issues/21) |
5050
| Provenance | Can each item be traced to its source and method? | Source artifacts, locators, methods; PROV/ECO/VA-Spec mapping; locators and review tiers recomputed from pinned snapshots | Methods are self-declared | Signed attestations (future) |
5151
| Deterministic validation | Is the evidence sufficient for this use, by fixed rules? | Engine, profiles, per-type quality gates, audit reports | — | — |
52-
| Model/agent evaluation | What can model review replace, and where does it fail? | Blinded model-review runner (#17), pilot on 20 cases | No reference labels yet; error correlation unmeasured | [#22](https://github.com/NingyuSUN/bioai-evidence-validator/issues/22) |
52+
| Model/agent evaluation | What can model review replace, and where does it fail? | Blinded model-review runner: six models reviewed all 190 cases; the analysis (scores, error correlation, a decision rule fixed in advance) is ready | Agreement among the models is moderate (alpha 0.49–0.53 for the clinical and expert uses); correctness needs the expert labels | [#22](https://github.com/NingyuSUN/bioai-evidence-validator/issues/22) |
5353
| Trust boundary | What does the system still take on faith? | Source grounding recomputes identifiers, review tiers, completeness, retractions and quotes from pinned snapshots (0/80 structured-source forgeries and 0/489 literature controls admitted) | Whether a verbatim quote supports the claim | [#31](https://github.com/NingyuSUN/bioai-evidence-validator/issues/31) |
5454
| Human review | What do experts conclude, and how reliably? | Protocol, `bioevidence review` tooling, blinded ClinVar kit | **No expert labels yet** | [#23](https://github.com/NingyuSUN/bioai-evidence-validator/issues/23) |
5555

@@ -81,7 +81,7 @@ source → structured extraction → provenance → deterministic validation
8181
| Done | [#20](https://github.com/NingyuSUN/bioai-evidence-validator/issues/20) | Source grounding, phase 2: verify cited literature and quotes | #19 |
8282
| Now | [#31](https://github.com/NingyuSUN/bioai-evidence-validator/issues/31) | Semantic support check: does a verbatim quote support the claim's direction? | #20 |
8383
| Done | [#21](https://github.com/NingyuSUN/bioai-evidence-validator/issues/21) | Real AI extraction experiment on openly licensed sources (expert labels of the sample need #23) | #18, #20 |
84-
| Next | [#22](https://github.com/NingyuSUN/bioai-evidence-validator/issues/22) | Model and agent evaluation against expert labels | #17, #23 |
84+
| Now | [#22](https://github.com/NingyuSUN/bioai-evidence-validator/issues/22) | Model and agent evaluation against expert labels (models reviewed; scoring waits for #23) | #17, #23 |
8585
| Done | [#24](https://github.com/NingyuSUN/bioai-evidence-validator/issues/24) | Calibrated triage and audit of auto-admitted records (tooling, routing evidence and a dry run; the expert audit needs #23) | #23 |
8686
| Done | [#25](https://github.com/NingyuSUN/bioai-evidence-validator/issues/25) | Reproducible benchmark, funnel figure and validation dossier | all |
8787

‎evaluation/clinvar_review/README.md‎

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,103 @@ Then commit `annotations.csv`, `adjudications.csv`, `agreement.json`, `score.jso
113113
`manifest.json` and the key into `evaluation/clinvar_review/results/`, and update the ClinVar
114114
case README, which currently states that no independent expert annotation exists.
115115

116+
## Model reviewers (#22)
117+
118+
The same packet goes to the six models of the LLM benchmark, to measure which parts of expert review they could
119+
take over. `model_reviewers.py` drives three command-line agents: Claude Code (`claude`), Codex (`codex`) and
120+
Antigravity (`agy`, for Gemini). Each vendor contributes a frontier model and a fast one:
121+
- Claude Opus 5.5 and Claude Haiku 4.5;
122+
- GPT-6-Astra and GPT-5.6-Luna;
123+
- Gemini 3.1 Pro and Gemini 3.8 Flash.
124+
125+
Each model gets exactly what a human reviewer gets, the rubric and one case under its code, and answers through a
126+
JSON schema.
127+
128+
```bash
129+
# Where the CLIs are installed; reads only reviewer_packet/, never the key
130+
python3 evaluation/clinvar_review/model_reviewers.py run \
131+
--packet artifacts/clinvar-review/reviewer_packet --output artifacts/clinvar-review/models \
132+
--set calibration # start small; --limit N, --codes, --reviewers
133+
134+
# Maintainer, with the key: protocol annotations and predictions, then the analysis
135+
uv run --frozen python evaluation/clinvar_review/model_reviewers.py export \
136+
--output artifacts/clinvar-review/models --key artifacts/clinvar-review/maintainer/key.json
137+
uv run --frozen python evaluation/clinvar_review/analyze_models.py \
138+
--models artifacts/clinvar-review/models --output artifacts/clinvar-review/models/analysis
139+
```
140+
141+
- **Isolation.** One case per call. Every call is a fresh, non-interactive session in an empty temporary
142+
directory, so the model cannot read the key or other cases.
143+
- **No lookups.**
144+
- Claude Code runs with every tool disabled.
145+
- Codex runs without browser tools or your user config and MCP servers, in a read-only sandbox.
146+
- Antigravity cannot switch off web search. Its tool calls are detected from the event stream.
147+
- A case answered after a tool call is retried once. If a tool is used again, the case is kept but marked
148+
`later_information_seen = yes`.
149+
- **Quota.** A CLI whose account is out of quota stops that reviewer; nothing is recorded for its remaining cases,
150+
and the next run resumes them. The Claude models share one call slot. Several installs can write to one output
151+
folder (for example Claude on Windows and Codex and Antigravity in WSL); `manifest.json` records the CLI version
152+
and path that answered for each model.
153+
- **Record.** `manifest.json` records model IDs, CLI versions and hashes of the rubric, prompt and schema. `raw/`
154+
keeps every answer. `runs.csv` lists time, tokens and tool use per call. Re-running resumes.
155+
156+
### What is published, and when
157+
158+
Model labels could steer a human reviewer, so they follow the same rule as the key: **per-case model labels stay
159+
private until all expert reviews are in.** So does anything that compares models with the key, the validator or
160+
NCBI's review status. Until then `analyze_models.py --public` writes only:
161+
- how each model ran: answers, tool use, later information seen, time;
162+
- how much the models agree with each other, per use (Krippendorff's alpha, bootstrap interval);
163+
- the decision rule below;
164+
- the SHA-256 of the withheld per-case files.
165+
166+
The published summary is in [`results/models`](results/models/summary.md).
167+
168+
### Results so far
169+
170+
All six models reviewed all 190 cases.
171+
- **Clean runs.** No model used a tool or said it recognised later information.
172+
- **Two runs.** The calibration round (20 cases) ran on 2026-09-28; the rest ran on 2026-10-08. GPT-6-Astra's
173+
Codex CLI was updated in between, from 0.153.4 to 0.160.0.
174+
- **Two accounts' quotas.** Claude ran on the Windows install's account. Antigravity's account ran out of quota
175+
partway through, and its 35 unanswered cases were rerun after the reset.
176+
177+
On the 170 test cases, before any expert label:
178+
179+
| Label | All six agree | Krippendorff's alpha (95% CI) |
180+
|---|---:|---|
181+
| Research summary | 91.8% | 0.12 (0.03–0.21) |
182+
| Clinical reference | 55.3% | 0.53 (0.43–0.62) |
183+
| Expert reference | 38.2% | 0.49 (0.43–0.55) |
184+
| Statement correct? | 86.5% | 0.47 (0.24–0.62) |
185+
186+
- **High raw agreement means little where nearly every case gets one label.** For research summaries the six
187+
models agree on 92% of cases, but alpha is close to chance.
188+
- **For the uses that depend on the evidence, the models often split.** All six agree on about half the cases or
189+
fewer.
190+
191+
So their consensus cannot stand in for an expert's decision. Whether any of them is *right* is what the expert
192+
labels will show (#23).
193+
194+
### Analysis against the expert labels
195+
196+
Once the expert labels are resolved, `analyze_models.py --annotations … --adjudications … --predictions
197+
maintainer/predictions.csv` adds, on the test split:
198+
- **Scores** for each model, the models' majority (at least four of six), the validator and NCBI's review status,
199+
per use and per subset (divergent, control).
200+
- **Error correlation.** For each pair of models: their misses, the misses they share, P(B misses | A misses), and
201+
Cohen's kappa of the miss indicators. Shared misses make a second model's opinion worth little.
202+
- **Does agreement mean correctness?** How often the six models are wrong when they all agree, and when they split.
203+
- **Decision statement, by a rule fixed before any expert label exists.** Per use:
204+
- **Models alone**, if the models' majority wrongly admits cases that experts would not admit at a rate whose
205+
exact one-sided 95% upper bound is below 5%, and wrongly blocks fewer than 20% of the cases experts would
206+
admit, on the divergent and the control subset each.
207+
- **Deterministic rules**, if the validator meets the same two conditions.
208+
- **Experts** otherwise.
209+
210+
Model labels are **not independent human annotations**. Keep them in their own files, never in `annotations.csv`,
211+
and never use them to resolve an expert disagreement.
212+
116213
## Interpreting the result
117214

118215
- With two independent reviewers and adjudication this is an **independently reviewed

0 commit comments

Comments
 (0)