Skip to content

feat(eval): NLI bake-off harness and its first result - #12

Merged
Yigtwxx merged 10 commits into
mainfrom
feat/nli-bakeoff
Oct 1, 2026
Merged

Yigtwxx merged 10 commits into
mainfrom
feat/nli-bakeoff

Conversation

@Yigtwxx

@Yigtwxx Yigtwxx commented Oct 1, 2026

Copy link
Copy Markdown
Owner

What this changes

  • NLI bake-off harness (scripts/eval_nli_bakeoff.py, with src/proofpath/eval/bakeoff.py and bakeoff_data.py). It compares three NLI models × k ∈ {1,2,3} × three aggregation rules (max, max_nei, margin). Cut points are calibrated on SciFact train. Each combination is scored on SciFact dev and on a frozen AVeriTeC snapshot, and the winner is picked by a decision rule fixed before any number was seen (spec docs/superpowers/specs/2026-10-01-nli-bakeoff-design.md).
  • First result (docs/eval/2026-10-01-nli-bakeoff.md). The winner is MoritzLaurer/DeBERTa-v3-large-mnli-fever-anli-ling-wanli at k=2 with max aggregation.
    • SciFact dev macro-F1 is 0.697, against 0.580 for the current default and 0.608 for the best base row.
    • On AVeriTeC it scores 0.475 on claims with a readable source, still below the 0.708 majority baseline.
  • The report states its own limits.
    • Dev both chooses the winner and reports its score.
    • Rule-decided numeric rows set the high cut.
    • int8 scores depend on which pairs share a batch.
    • The AVeriTeC snapshot is new.
  • No product code changes. Next-work backlog: OPEN-ITEMS §20.

Why

Retrieving more passages had already been measured, and it does not help: k=3 scored 0.603 against 0.609 at k=1. The loss is in the NLI model, which is overconfident: the [0.9, 1.0] band is only 0.716 precise. So the next step was a measured model comparison rather than a code change.

Every task got an independent reviewer and a re-review, and a final whole-branch review answered READY TO MERGE. The reviewers caught a silent mis-scoring in margin, an ambiguous decision-rule order (the user chose the clarification), and a report that did not state its coverage.

Checklist

  • ruff check and ruff format --check are clean
  • pytest passes (2576 passed, 1 skipped)
  • Type annotations on every new function signature (mypy src/proofpath/eval clean)
  • No network access in unit tests
  • If a new reported state was added, spec section 15 is updated too (no new state)
  • This change does not make the tool sound more confident than its evidence

🤖 Generated with Claude Code

https://claude.ai/code/session_01KRNnJrkUuFNdBcR5vXRgTp

Yigtwxx and others added 10 commits October 1, 2026 11:18
k=3 was already measured and does not raise accuracy, so the next accuracy step
is a measured comparison of NLI models with a decision rule fixed in advance.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KRNnJrkUuFNdBcR5vXRgTp
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KRNnJrkUuFNdBcR5vXRgTp
The first wording left the step order open; read as "tie rule first" it let
a large model through on a 0.022 lead. Clarified before any number was seen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KRNnJrkUuFNdBcR5vXRgTp
The final review found the report under-stated its own limits: rule-decided
rows set the high cut, int8 scores move with the batch, the AVeriTeC snapshot
is new, and dev both chooses and reports. The report now says so in the file.

Result: MoritzLaurer large mnli-fever-anli-ling-wanli at k=2 wins on SciFact
dev macro-F1 (0.697 vs 0.580 baseline); AVeriTeC stays below its majority
baseline.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KRNnJrkUuFNdBcR5vXRgTp
@vercel

vercel Bot commented Oct 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
proofpath Ignored Ignored Oct 1, 2026 9:35am UTC

@Yigtwxx
Yigtwxx merged commit 92d5859 into main Oct 1, 2026
11 checks passed
@Yigtwxx
Yigtwxx deleted the feat/nli-bakeoff branch October 1, 2026 09:42
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