Repository navigation
feat(novelty): skill novelty retest, a noise floor from two analyze runs - #841
Conversation
The novelty score has a per-run noise floor (the no_artifact_repeat arm), but none for the headline k0 score across whole runs. The S2 test-retest (10 skills, another seed and a fresh cache) was computed by hand. `skill novelty retest --baseline DIR --retest DIR` pairs the two runs by artifact ref and reports the floor (1.96 x the spread of second minus first on k0.lenient or strict), Pearson r, mean |diff|, mean shift, and the item pairs whose first-run scores differ by less than the floor. It makes no model call. It warns on a retest with the same seed or another model, and names items that are unmatched, partial or unscored. Corpus check against the S2 retest (REPORT.md S3m): r 0.86, mean |diff| 0.10, shift +0.067, floor about 0.21. The floor is not a default: a retest costs one full run per item. Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
- pair_runs warns when either run replayed calls from the response cache (cost.replayed_calls > 0) and when run_config differs beyond the seed. - Unmatched and unscored refs are named in the warnings, first five. - A retest of fewer than 10 items carries a small-sample caveat in the report and on stdout. - Non-object novelty files and non-finite k0 scores are refused or unscored, not a traceback. - _pearson is one shared dokimi.eval.stats.pearson (measure.py uses it). - Docs: run 2 disables DOKIMI_RESPONSE_CACHE; --cache-dir is the retention verdict cache and is not counted in replayed_calls; only novelty.json files are read. Corpus numbers cite the 2026-11-09 retest and the pinned S2_RETEST pairs. - Test pins the 26-of-45 count and the gap-equal-to-floor boundary. Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
CLI interface change detectedThis PR changes dokimi's user-facing CLI surface (commands and/or options): + added command `dokimi skill novelty retest`
+ option `--baseline`
+ option `--help/-h`
+ option `--out-dir`
+ option `--retest`
+ option `--scoring`
~ `dokimi runs list` parameters changed:
~ changed option `--kind`: choices: ["'answers'", "'arms'", "'baseline_manifest'", "'catalog_eval'", "'checklist'", "'cli_routes'", "'cross_judge'", "'dashboard'", "'docling_sources'", "'docs_run'", "'dokimi_config'", "'effective_instructions'", "'eval'", "'eval_coverage'", "'explore_runs'", "'grounding'", "'guidance_reach'", "'headroom'", "'judge_validity'", "'judge_wording'", "'leak'", "'matrix_rollup'", "'need_graph'", "'novelty'", "'novelty_atoms'", "'pairwise'", "'persona_analysis'", "'personas'", "'plan'", "'plugin_delta'", "'question_panel'", "'question_quality'", "'questions'", "'ragas'", "'reach_matrix'", "'redteam'", "'repo_budget'", "'repo_environment'", "'repo_hits_judged'", "'repo_ledger'", "'repo_readiness'", "'report_qa'", "'report_summary'", "'result'", "'run_context'", "'security_report'", "'skill_coverage'", "'skill_discovery'", "'skill_evidence'", "'subject_scorecard'", "'task_inspect'", "'task_runs'", "'tool_preference'"] -> ["'answers'", "'arms'", "'baseline_manifest'", "'catalog_eval'", "'checklist'", "'cli_routes'", "'cross_judge'", "'dashboard'", "'docling_sources'", "'docs_run'", "'dokimi_config'", "'effective_instructions'", "'eval'", "'eval_coverage'", "'explore_runs'", "'grounding'", "'guidance_reach'", "'headroom'", "'judge_validity'", "'judge_wording'", "'leak'", "'matrix_rollup'", "'need_graph'", "'novelty'", "'novelty_atoms'", "'novelty_retest'", "'pairwise'", "'persona_analysis'", "'personas'", "'plan'", "'plugin_delta'", "'question_panel'", "'question_quality'", "'questions'", "'ragas'", "'reach_matrix'", "'redteam'", "'repo_budget'", "'repo_environment'", "'repo_hits_judged'", "'repo_ledger'", "'repo_readiness'", "'report_qa'", "'report_summary'", "'result'", "'run_context'", "'security_report'", "'skill_coverage'", "'skill_discovery'", "'skill_evidence'", "'subject_scorecard'", "'task_inspect'", "'task_runs'", "'tool_preference'"]Updated on every push; the |
|
OpenCodeReview: Commit a1cf854 was not reviewed. This PR has reached its review limit (6 reviews). CI at `a1cf854`: 10 still running, 2 passing, 2 skipped
To review this commit: re-request review from exai-bot in the Reviewers list. <details><summary>Last review (e177656): no findings</summary> Open threads from the bot: 0 </details> |
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #841 +/- ##
==========================================
- Coverage 96.09% 96.06% -0.04%
==========================================
Files 472 478 +6
Lines 62278 63076 +798
Branches 10784 10931 +147
==========================================
+ Hits 59849 60595 +746
- Misses 1497 1530 +33
- Partials 932 951 +19
🚀 New features to boost your workflow:
|
vlad-perevezentsev
left a comment
There was a problem hiding this comment.
Review at 257277c. The statistics are right: the floor uses the spread of the paired differences, which is the same noise as a difference between two single-run scores of different items. The gaps are in what pair_runs accepts as a retest: a changed skill, a changed judge and an unmeasured k0 pass without a warning, and a tier run can warn when nothing changed.
Agreed with @exai-bot: the ref_digest check, the judge_model check, k0 = 0.0 with nothing probed, the warnings lost when no item pairs, and the non-string ref traceback (with a wider fix in its thread).
What I ran, at 257277c:
make ci-local --offline: 22,214 passed, 0 failed, 72 skipped; every check passed.- A repro on
pair_runsand the CLI for each finding: a digest drift and a judge drift give no warning, a run withn_paired == 0is paired as 0.0,tier_record(sampled=False)againstsampled=Truewarns "other settings (tier)", no shared item prints no unmatched refs, a list ref exits 5 with aTypeError, andpearson([0.1] * 3, ...)is-0.0.
Checked, no issues
- The floor: 1.96 × the sd of
second − first; a gap equal to the floor is not counted as below it, and the S2 test pins the numbers quoted in the docs and the changelog. - The
pearsonmove:measure.confidence_correlationkeeps the same result through the shared helper. - CLI surface and changelog: the leaf is FREE (no model calls), the CLI snapshot and the flags allowlist are updated, and the fragment says what to run.
vchamarthi
left a comment
There was a problem hiding this comment.
🟡 Not approved yet · reviewed 257277c
Next: @napetrov: answer 4 open threads from vlad-perevezentsev and settle 1 open question (below). 1 nit optional.
Blocking
- Open, not looked at in this review: thread by @vlad-perevezentsev.
- Open, not looked at in this review: thread by @vlad-perevezentsev.
- Open, not looked at in this review: thread by @vlad-perevezentsev.
- Still holds on this head: thread by @vlad-perevezentsev – A file passed by path is read under any name, while the doc at this line says a run saved under another name is not read.
- Open question for @napetrov:
load_runsreads a file given by path under any name (dokimi/novelty/retest.py:54), whiledocs/skill-novelty.mdsays a run saved under another name is not read. Refuse a path whose file is not namednovelty.json, or state in the docs and the--baselinehelp that a file given by path is read as is.
Verified on 257277c: ✅ changed tests: 24 passed, fail on main · ❌ full suite on the head fails at ci.yml:static / schema_compat vs the PR base ·
5 checks behind it, each with its evidence
| Area | What holds | How |
|---|---|---|
| Floor and pairing | The S2 retest pins r 0.86, mean |diff| 0.10, mean shift +0.067, floor about 0.21, 26 of 45 pairs below it, and a gap equal to the floor is not below it | tests on the head |
| Pair warnings | Same seed, another model, replayed calls, a run_config key other than seed, and unmatched or unscored refs each give a named warning, as the changed tests pin |
tests on the head |
| Refused input | An empty directory, a repeated ref, a file that is not an object, a file with no ref, and a run saved under another name are refused or not read, as the changed tests pin | tests on the head |
| Report files | --out-dir receives retest.json and retest.md, and the report has the floor line and the comparisons line, as the changed tests pin |
tests on the head |
| Floor branch | Inverting if floor is not None: in retest_summary (retest.py:161) fails tests/test_novelty_retest.py |
broke the code, tests caught it |
…ules Main has grown commands/novelty.py to 794 lines and eval/stats.py to 782; with the PR's additions both pass the 800-line growth cap once merged. cmd_novelty_retest moves to commands/novelty_retest.py and pearson to eval/correlation.py; no behaviour changes. Signed-off-by: Alexander Rybkin <alexander.rybkin@intel.com>
A retest graded by another judge_model, or by a judge panel with other judges or another aggregation rule, paired with no warning, so the grading change was reported as noise. Compare judge_model and the panel's judges and rule; measured panel values may vary between seeds. Signed-off-by: Alexander Rybkin <alexander.rybkin@intel.com>
|
Fixes in `skill novelty retest`: - print the pairing warnings before the no-pairs refusal, so the excluded refs are named - refuse a non-string artifact ref as bad input instead of a TypeError - warn when `artifact.ref_digest` differs between the two runs - leave a run with no probed atom out as unscored instead of k0 0.0 - compare `run_config.tier` by name and overrides, not by forfeits - `pearson` returns None for a constant side - docs and `--baseline` help: a file passed directly is read by any name - pin `confidence_correlation` with a known-value test Signed-off-by: vchamarthi <venkata.sai.gireesh.chamarthi@intel.com>
Signed-off-by: vchamarthi <venkata.sai.gireesh.chamarthi@intel.com>
|
🟡 Waiting on @napetrov · 2 commits on Next: @napetrov: answer the 1 question below. Changes
Needs @napetrov
Threads and comments
1 thread left as it is, and why
Verified on the new head: ✅ 7/7 tests fail before the fix, pass after · ✅ full suite with main merged in: 23779 passed · ✅ second reader: nothing raised · What each test shows
|
…loors - a run whose baseline grades all errored has no no_artifact mean in arms[scoring]; it is now unscored instead of paired as k0 0.0 - scores whose difference overflows no longer give a nan noise floor - a test pins the refusal of a non-UTF-8 novelty.json Signed-off-by: vchamarthi <venkata.sai.gireesh.chamarthi@intel.com>
|
🟡 Waiting on @napetrov · 1 commit on Next: @napetrov: answer the 1 question below. Changes
Needs @napetrov
Threads and comments
2 threads left as they are, and why
Verified on the new head: ✅ 4/4 tests fail before the fix, pass after · ✅ full suite with main merged in: 24264 passed · ✅ second reader: nothing raised What each test shows
|
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g864Zq4F Thread: IC_kwDOVBg7g88AAAABoSJ--A Thread: IC_kwDOVBg7g88AAAABpA8F4w Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g866bntk Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
vchamarthi
left a comment
There was a problem hiding this comment.
@napetrov: fix the 4 new must-fix items in the line comments and settle 1 open question, then push for a re-review. 1 nit in line comments is optional.
Open threads and questions:
- Open question for napetrov: An item whose
ref_digestdiffers between the two runs gets the content warning and still enters the floor (dokimi/dokimi/novelty/retest.py:116-119, paired inpair_runs). Decide whether such an item is kept or left out, and say so indocs/skill-novelty.mdnext to the warning list, which now says only that the runs measured different text.
Re-reviewed at e177656: changed tests: 235 passed, fail on main; full suite with main merged in: 24576 passed, its only failures are main's too; merges onto main; 12 broken variants of the changed code, all caught by the tests; 1 mutation and 10 edge inputs tried.
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Signed-off-by: vchamarthi <123653452+vchamarthi@users.noreply.github.com>
Fixes the below-floor check using sd and floor rounded to 4 places, so a gap of 0.1999 under a true floor of 0.1999896 was not flagged. The sd and floor are rounded only where reported. Shows Pearson r as not measured below 3 items, and as not defined when a run is constant, on stdout and in retest.md instead of None. Refuses an --out-dir that is an existing file as bad input, with a test. Fixes the mypy errors in test_novelty_retest.py (SimpleNamespace rows and the pair_runs star call). Signed-off-by: vchamarthi <123653452+vchamarthi@users.noreply.github.com>
|
Ready for re-review: 2 commits on Changes:
Threads and comments:
Checked on the new head:
What each test shows
|
vchamarthi
left a comment
There was a problem hiding this comment.
@napetrov: settle 1 open question.
Approval waits on that.
Open threads and questions:
- Open question for napetrov: An item whose
artifact.ref_digestdiffers between the two runs gets the content warning and still enters the floor (dokimi/dokimi/novelty/retest.py:116-119, paired inpair_runs). Decide whether such an item is kept in the floor or left out, and state it indokimi/docs/skill-novelty.mdnext to the warning list.
Re-reviewed at 0bff315: changed tests: 242 passed, fail on main; full suite with main merged in: 30917 passed, its only failures are main's too; merges onto main; 12 broken variants of the changed code, all caught by the tests; 5 mutations and 7 edge inputs tried.
…oise Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
…y write Thread: PRRT_kwDOVBg7g866mpYt Thread: PRR_kwDOVBg7g88AAAABZiQTww Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
|
|
vlad-perevezentsev
left a comment
There was a problem hiding this comment.
🟡 Open questions · re-checked 004a116
To answer: the open question of @vchamarthi below; nothing else is left from my side.
✅ make ci-local --offline: 26,001 passed, 0 failed (the warn-only mutation step ran past 10 min here and was stopped) · ✅ mkdocs build --strict · ✅ a panel change ([j1, j2]/median to [j1, j3]/majority) warns · ✅ a gap of 0.1999 under the unrounded floor 0.19999 is counted below it
The floor statistics and the retest checks are right; the earlier points are fixed, and retest.json is now a versioned artifact.
Agreed with @vchamarthi on the changed-content item: it warns but still enters the floor, and since the warning says the runs measure different items, leaving it out as unscored fits it.
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
|
Re: review by vlad-perevezentsev
|
|
The floor and output changes have been rechecked. The outstanding decision is whether an item whose content changed belongs in the noise estimate. |
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Review: PRR_kwDOVBg7g88AAAABZnIYgA Review: PRR_kwDOVBg7g88AAAABZshxMg Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
|
|
Re: review by vlad-perevezentsev
|
|
The digest decision is implemented. Edited artifacts are listed in |
vchamarthi
left a comment
There was a problem hiding this comment.
🔴 Changes needed: 2 must-fixes · re-reviewed d35fb50
Next: @napetrov: fix the 2 must-fix findings and settle 1 open question; then push for a re-review.
Blocking
- Open question for @napetrov: when every shared item has a changed digest, the refusal says
no item scored in both runs, though each of those items was scored in both runs. Name the content change in the refusal, or say indocs/skill-novelty.mdthat the refusal also follows exclusions for changed content.
Verified on d35fb50: ✅ changed tests: 244 passed, fail on main · ✅ full suite with main merged in: 31934 passed · ✅ merges onto main · ✅ 12 broken variants of the changed code: 12 caught by the tests · 3 mutations tried · 10 edge inputs tried
15 checks behind it, each with its evidence
| Area | What holds | How |
|---|---|---|
| Changed tests | the changed test files pass on the head: 244 passed, 1 skipped | tests on the head |
| Changed tests on main | the same test files do not collect on main, where the retest command is absent | same tests on main |
| Full run | with main merged in, the full test and static-check run passes: 31934 passed, no failing step | full suite, main merged in |
| Merge | the PR merges onto main with no conflict | merge onto main |
| Digest exclusion | an item whose ref_digest differs between the runs is unscored, left out of the pairs, and out of the floor: two stable items and one edited item give floor 0 |
ran it |
| Digest types | ref_digest values that are objects or lists are compared and excluded, with no error |
ran it, edge input (structured) |
| One-sided digest | a digest on one run only pairs by ref with the one run has no ref_digest warning, as docs/skill-novelty.md says |
ran it, edge input (structured) |
| Non-ascii ref | a ref with ß is named in its exclusion warning |
ran it, edge input (text) |
| Excluded refs | seven excluded refs are all named in sorted order, with no cap at five | ran it, edge input (collections) |
| Non-finite scores | nan and inf scores are unscored, not paired, and raise no error |
ran it, edge input (numbers) |
| Missing baseline | a baseline directory with no novelty.json is refused as bad input naming the directory |
ran it, edge input (paths) |
| Out-dir created | a missing --out-dir with its parents is created, and retest.json is stamped novelty_retest.v1 |
ran it, edge input (paths) |
| Cli refusal | skill novelty retest with a directory named retest.md under --out-dir exits 2 and names it on stderr |
ran it, edge input (cli) |
| Model sdks | the retest command and module load no LLM SDK module | ran it |
| Digest comparison | breaking the digest comparison at dokimi/dokimi/novelty/retest.py:164 (!= to ==) is caught by the changed tests: 6 failed |
broke the code, tests caught it |
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g867MVml Thread: PRRT_kwDOVBg7g867MVmx Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRR_kwDOVBg7g88AAAABZ6JmrQ Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
|
vlad-perevezentsev
left a comment
There was a problem hiding this comment.
🟢 LGTM · checked a1cf854 · nothing required from @napetrov
🔀 Merge: safe now · merges cleanly into current main, 12 commits behind, and its tests pass on the merge · after it, #1132, #1131, #1129 and #1082 need a rebase (docs/reference/cli-interface.json)
✅ make ci-local --offline: 27,136 passed, 0 failed · ✅ on the merge with main: retest, artifact, schema and runs tests 511 passed
The earlier points are fixed; an edited item is now left out of the floor, and the docs say so.
Summary
New
dokimi skill novelty retest --baseline DIR --retest DIR [--scoring lenient|strict] [--out-dir OUT]: pairs twoskill novelty analyzeruns by artifact ref and reports a test-retest noise floor for the headline k0 score — floor (1.96 × SD of the per-item difference), Pearson r, mean |diff|, mean shift, and the item pairs whose gap is below the floor. No model calls. Opt-in, per decision D2 (noise floor is not a default cost).Warnings: same seed, different model, replayed calls (
cost.replayed_calls > 0, e.g. reusedDOKIMI_RESPONSE_CACHE), anyrun_configdrift besides seed, unmatched/unscored refs (named), n < 10.When both runs record different content digests for an artifact, retest lists the ref in
unscoredand excludes it from every statistic.Evidence
GitSkills corpus S2 retest (10 skills, Haiku 5.5 measured / Sonnet 5.5 judge, seed 2, fresh cache): r 0.86, mean |diff| 0.10, shift +0.067, floor ≈ 0.21; 26 of 45 S2 pair gaps fall below it. Pinned in tests.
--max-tokens: #452 already set the default to 16384, no change needed.Decisions
analyze --noise-floor N: N extra analyses of one artifact give no r; two-run retest is cheaper and more informative.--retestname kept (vs--candidateused elsewhere for a changed artifact; here the artifact is the same).Follow-ups (not in this PR)
retest.jsondescribes two runs and is saved under thenovelty_retest.v1schema.tierwhen only atom-cap forfeits differ; no test for nestedtiercomparison.Merge danger
Low: new subcommand and module; shared
pearsonmoved toeval/stats(callers updated). Local self-review: 2 passes (lenses + verify), 0 blocking.make ci-localon the reviewed head: 0 failed, 36 passed, 14 skipped.🤖 Generated with Claude Code