Skip to content

feat(nli): opt-in accurate NLI model with consent and a reported fallback - #14

Merged
Yigtwxx merged 7 commits into
mainfrom
feat/accurate-nli
Oct 1, 2026
Merged

Yigtwxx merged 7 commits into
mainfrom
feat/accurate-nli

Conversation

@Yigtwxx

@Yigtwxx Yigtwxx commented Oct 1, 2026

Copy link
Copy Markdown
Owner

What this changes

  • Opt-in accurate NLI profile. It is the winner of the NLI bake-off: MoritzLaurer/DeBERTa-v3-large-mnli-fever-anli-ling-wanli, int8, run with k=2 and its own cuts (decide 0.25, medium 0.252721, high 0.999142). The cuts were calibrated on SciFact train, and rule-decided rows were left out of the tier walk. Turn it on with [models] nli = "accurate", proofpath config set models.nli accurate, /config, or proofpath check --accurate for one run.
  • Consent for the 643 MB download (product rule 5). The new permission permissions.install_model (ask/allow/deny) works like the browser gate: once, always, no or never, and with no TTY ask means deny (rule 4). --accurate picks the profile but does not grant consent.
  • Reported fallback (rule 6). A refused or failed download falls back to the default profile, and the run says so three ways:
    • a note with advice that fits the reason;
    • nli_requested in the report's models block;
    • an nli line in the CLI that -q does not hide.
  • Tier honesty. A run whose medium cut sits on decide now says it has no real low tier. This applies to default runs too, since their medium cut is 0.008 above decide. The models block now records k.
  • TUI. /config has models.nli and permissions.install_model rows, and the permission prompt also asks the model question. /allow, the buttons and quit all answer it.
  • The default profile is unchanged. A test pins its verdict-cache key, which matches main byte for byte. The eval scripts are pinned to the default model.
  • Docs: README "Accurate model (opt-in)" section and Measured row, spec §7.1/§12/§14, CHANGELOG, OPEN-ITEMS §20, site Measured data.

Why

The bake-off measured SciFact dev macro-F1 at 0.697 for this model, against 0.580 for the default. It is not better on news and fact-check pages (AVeriTeC readable 0.475, against 0.537 for the default model at k=2; both are below the 0.708 majority baseline), so it ships as an opt-in for scientific sources rather than as the default. The default install stays small.

Every task had an independent reviewer and a re-review. A final whole-branch review answered READY TO MERGE after one Important fix: the eval scripts had followed the user's profile. Live runs were checked twice: --accurate with the model cached (k=2, accurate cuts), and with the model missing and no TTY (no download; fallback reported three ways).

Checklist

  • ruff check and ruff format --check are clean (and mypy --strict)
  • pytest passes (2667 passed, 1 skipped)
  • Type annotations on every new function signature
  • No network access in unit tests
  • If a new reported state was added, spec section 15 is updated too (no new state; a models entry and notes only)
  • 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 7 commits October 1, 2026 13:23
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KRNnJrkUuFNdBcR5vXRgTp
…er note

The accurate profile is the bake-off winner at k=2, with cuts calibrated on
SciFact train and rule-decided rows left out of the tier walk. A run whose
medium cut sits on decide now says it has no real low tier.

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

check --accurate or [models] nli = "accurate" selects the large model. It is
downloaded once, only with consent; when the download is refused or fails the
run uses the default model and says so in the report, as a note, and on a CLI
line that survives -q. The models block now records k.

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

The published AVeriTeC number describes the default install, so the eval
scripts no longer follow a user's models.nli. A cached accurate model no
longer adds a note to every run. The default verdict-cache key is pinned by a
test so it cannot drift.

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 Preview Oct 1, 2026 10:32am UTC

@Yigtwxx
Yigtwxx merged commit 044b0c9 into main Oct 1, 2026
11 checks passed
@Yigtwxx
Yigtwxx deleted the feat/accurate-nli branch October 1, 2026 10:39
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