Repository navigation
Fix the underpowered eval gate: score direction, not magnitude - #965
Conversation
There was a problem hiding this comment.
Pull request overview
This PR stabilizes the evaluation gate by making verdicts depend on trial direction (win/tie/loss) rather than magnitude, replacing the t-interval gate with an exact one-sided sign test and introducing a minimum credible trial floor so underpowered evals can’t pass (or regress) by chance.
Changes:
- Replace the gate in
eng/vally-adapter/adapt.mjswith net-win + exact sign test (p ≤ 0.05) and emitunderpowered/regressed/signTestfields. - Enforce a repo-wide minimum trial floor (5) in
eng/eval-quality/check_eval_quality.py, backed by a shrink-only underpowered allowlist and--base-refgrowth ratchet. - Update renderers, workflows, scripts, tests, and docs to reflect the new verdict schema and
⚠️ underpowered semantics.
Show a summary per file
| File | Description |
|---|---|
| eng/vally-adapter/README.md | Documents underpowered as a separate non-regression signal tied to eval spec power. |
| eng/vally-adapter/InvestigatingResults.md | Updates investigation guide for net-win/sign-test gate and new verdict fields. |
| eng/vally-adapter/consolidate.mjs | Renders Net win / p / Δ Pref columns; treats underpowered as |
| eng/vally-adapter/adapt.test.mjs | Adds regression tests for the magnitude-instability defect and for the new sign-test gate/floor. |
| eng/vally-adapter/adapt.mjs | Implements sign-test-based gate, underpowered floor, argv parsing safety on import, and quoted vally command splitting. |
| eng/run-skill-evals.sh | Updates local runner messaging and summary classification for underpowered/inconclusive verdicts. |
| eng/eval-quality/underpowered-allowlist.txt | Introduces shrink-only ledger of pre-existing below-floor evals. |
| eng/eval-quality/selftest_eval_quality.py | Adds self-tests for the trial floor, allowlist behavior, and --base-ref ratchet/rename handling. |
| eng/eval-quality/README.md | Adds failing check #7 and rationale for direction-only gating + 5-trial floor. |
| eng/eval-quality/check_eval_quality.py | Enforces MIN_TRIALS=5, validates allowlist shrink-only rules, checks adapter floor agreement, adds --base-ref. |
| dotnet-skills.experiment.yaml | Removes experiment-level runs override to allow per-eval defaults.runs. |
| .github/workflows/evaluation.yml | Avoids investigation prompt on |
| .github/workflows/evaluation-run.yml | Updates step summary explanation and per-scenario table to use Net win basis + Δ Pref triage column. |
| .github/workflows/eval-quality.yml | Ensures eval-quality runs when adapter changes; uses full history for --base-ref checks and passes base ref in PRs. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comments suppressed due to low confidence (1)
eng/vally-adapter/adapt.mjs:726
- When the compare report is inconsistent (
summaryAgrees == false), the verdict’ssignTestis computed from the enumerated trials, but the top-levelwins/ties/losses/trialCount/winRateare still copied fromreport.summary. That can make the rendered W/T/L (and any downstream logic reading these fields) contradict the gate’s own counts, even though the verdict is already marked inconclusive.
Consider populating these top-level tally fields from the same computed directions counts used by signTest (they’ll be identical in the normal case, and self-consistent in the malformed-report case).
winRate: s.winRate,
wins: s.wins,
ties: s.ties,
losses: s.losses,
trialCount: s.trialCount,
- Files reviewed: 14/14 changed files
- Comments generated: 0
📊 Skill Evaluation Results8 skill(s) evaluated — 1 improved, 0 no credible improvement, 7 underpowered. A skill passes only on a credible net win over baseline (more wins than losses, by an exact one-sided sign test at p ≤ 0.05);
ℹ️ Column legend
|
| Scenario | Net win | Δ Pref | Trials (W/T/L) |
|---|---|---|---|
| ▲ Configure all three OpenTelemetry signals with correct OTLP export | +100.0% | +40.0% | 1/0/0 |
| = Propagate trace context across a message queue | +0.0% | +0.0% | 0/1/0 |
| ▲ Set up OpenTelemetry tracing and metrics with custom spans in ASP.NET Core | +100.0% | +40.0% | 1/0/0 |
⚠️ convert-blazor-server-to-webapp — details
Reason: Net win +100.0% (1W/0T/0L over 1 trial(s), sign test p=0.500), mean preference +40.0% — underpowered (1 counted trial(s); a credible verdict needs at least 5, and this eval won every one of them) — raise the eval's trial count with more scenarios or defaults.runs
| Scenario | Net win | Δ Pref | Trials (W/T/L) |
|---|---|---|---|
| ▲ Blazor Server app with CascadingAuthenticationState | +100.0% | +40.0% | 1/0/0 |
⚠️ dotnet-webapi — details
Reason: Net win +100.0% (3W/0T/0L over 3 trial(s), sign test p=0.125), mean preference +80.0% — underpowered (3 counted trial(s); a credible verdict needs at least 5, and this eval won every one of them) — raise the eval's trial count with more scenarios or defaults.runs
| Scenario | Net win | Δ Pref | Trials (W/T/L) |
|---|---|---|---|
| ▲ Add a new API endpoint to an existing controller-based project | +100.0% | +100.0% | 1/0/0 |
| ▲ Add error handling with ProblemDetails and IExceptionHandler | +100.0% | +100.0% | 1/0/0 |
| ▲ Create a CRUD Web API with minimal APIs, OpenAPI, and proper HTTP semantics | +100.0% | +40.0% | 1/0/0 |
⚠️ mcp-csharp-create — details
Reason: Net win +0.0% (1W/1T/1L over 3 trial(s), sign test p=0.750), mean preference +0.0% — underpowered (3 counted trial(s); a credible verdict needs at least 5) — raise the eval's trial count with more scenarios or defaults.runs
| Scenario | Net win | Δ Pref | Trials (W/T/L) |
|---|---|---|---|
| = Create an HTTP MCP server with tools and resources | +0.0% | +0.0% | 0/1/0 |
| ▼ Create an MCP server with tools, prompts, and proper logging | -100.0% | -40.0% | 0/0/1 |
| ▲ Implement MCP tools with proper attributes and DI | +100.0% | +40.0% | 1/0/0 |
⚠️ mcp-csharp-publish — details
Reason: Net win +66.7% (2W/1T/0L over 3 trial(s), sign test p=0.250), mean preference +26.7% — underpowered (3 counted trial(s); a credible verdict needs at least 5) — raise the eval's trial count with more scenarios or defaults.runs
| Scenario | Net win | Δ Pref | Trials (W/T/L) |
|---|---|---|---|
| ▲ Deploy an HTTP MCP server to Azure Container Apps | +100.0% | +40.0% | 1/0/0 |
| ▲ Publish an MCP server as a NuGet tool package | +100.0% | +40.0% | 1/0/0 |
| = Publish to the MCP Registry | +0.0% | +0.0% | 0/1/0 |
⚠️ mcp-csharp-test — details
Reason: Net win +66.7% (2W/1T/0L over 3 trial(s), sign test p=0.250), mean preference +66.7% — underpowered (3 counted trial(s); a credible verdict needs at least 5) — raise the eval's trial count with more scenarios or defaults.runs
| Scenario | Net win | Δ Pref | Trials (W/T/L) |
|---|---|---|---|
| ▲ Create evaluations for an MCP server | +100.0% | +100.0% | 1/0/0 |
| = Test an HTTP MCP server with WebApplicationFactory | +0.0% | +0.0% | 0/1/0 |
| ▲ Write unit and integration tests for an MCP server | +100.0% | +100.0% | 1/0/0 |
⚠️ minimal-api-file-upload — details
Reason: Net win +66.7% (2W/1T/0L over 3 trial(s), sign test p=0.250), mean preference +26.7% — underpowered (3 counted trial(s); a credible verdict needs at least 5) — raise the eval's trial count with more scenarios or defaults.runs
| Scenario | Net win | Δ Pref | Trials (W/T/L) |
|---|---|---|---|
| ▲ Implement secure file upload in ASP.NET Core 8 minimal API | +100.0% | +40.0% | 1/0/0 |
| = Stream very large file uploads without buffering | +0.0% | +0.0% | 0/1/0 |
| ▲ Upload multiple files with metadata in minimal API | +100.0% | +40.0% | 1/0/0 |
✅ technology-selection — details
Reason: Net win +83.3% (5W/1T/0L over 6 trial(s), sign test p=0.031), mean preference +43.3% — credibly better
| Scenario | Net win | Δ Pref | Trials (W/T/L) |
|---|---|---|---|
| ▲ Agentic workflow with guardrails | +100.0% | +40.0% | 1/0/0 |
| ▲ LLM integration with MEAI abstraction | +100.0% | +100.0% | 1/0/0 |
| ▲ ML.NET classification on tabular data | +100.0% | +40.0% | 1/0/0 |
| ▲ Natural-language scenario decomposition — RAG chatbot | +100.0% | +40.0% | 1/0/0 |
| = RAG pipeline with vector search | +0.0% | +0.0% | 0/1/0 |
| ▲ Reject LLM for tabular classification | +100.0% | +40.0% | 1/0/0 |
🔍 Full Results - additional metrics and failure investigation steps
▶ Sessions Visualisation -- interactive replay of all evaluation sessions
📊 Session Analytics (preview) -- aggregated metrics across evaluation sessions
|
👋 @Evangelink — this PR has merge conflict. When you're ready, please address the feedback and push an update; the triage bot will pick up the next state automatically. (Add the |
📊 Skill Evaluation Results13 skill(s) evaluated — 5 improved, 8 no credible improvement. A skill passes only on a credible improvement over baseline (mean preference > 0 with its 95% CI above 0);
ℹ️ Column legend
✅ author-component — detailsReason: Net win +100.0% (5W/0T/0L over 5 trial(s), sign test p=0.031), mean preference +52.0% — credibly better
❌ collect-user-input — detailsReason: Net win +100.0% (2W/0T/0L over 2 trial(s), sign test p=0.250), mean preference +40.0% — underpowered (2 counted trial(s); a credible verdict needs at least 5, and this eval won every one of them) — raise the eval's trial count with more scenarios or defaults.runs
❌ configure-auth — detailsReason: Net win +50.0% (1W/1T/0L over 2 trial(s), sign test p=0.500), mean preference +20.0% — underpowered (2 counted trial(s); a credible verdict needs at least 5) — raise the eval's trial count with more scenarios or defaults.runs
❌ coordinate-components — detailsReason: Net win +50.0% (1W/1T/0L over 2 trial(s), sign test p=0.500), mean preference +50.0% — underpowered (2 counted trial(s); a credible verdict needs at least 5) — raise the eval's trial count with more scenarios or defaults.runs
❌ create-blazor-project — detailsReason: Net win +0.0% (1W/1T/1L over 3 trial(s), sign test p=0.750), mean preference +0.0% — underpowered (3 counted trial(s); a credible verdict needs at least 5) — raise the eval's trial count with more scenarios or defaults.runs
❌ fetch-and-send-data — detailsReason: Net win +50.0% (1W/1T/0L over 2 trial(s), sign test p=0.500), mean preference +20.0% — underpowered (2 counted trial(s); a credible verdict needs at least 5) — raise the eval's trial count with more scenarios or defaults.runs
✅ migrate-mstest-v1v2-to-v3 — detailsReason: Net win +72.7% (8W/3T/0L over 11 trial(s), sign test p=0.004), mean preference +45.5% — credibly better
✅ migrate-vstest-to-mtp — detailsReason: Net win +100.0% (11W/0T/0L over 11 trial(s), sign test p=0.000), mean preference +72.7% — credibly better
❌ migrate-xunit-to-mstest — detailsReason: Net win +30.8% (5W/7T/1L over 13 trial(s), sign test p=0.109), mean preference +7.7% — not credible (sign test p=0.109 > 0.05)
✅ migrate-xunit-to-xunit-v3 — detailsReason: Net win +83.3% (10W/2T/0L over 12 trial(s), sign test p=0.001), mean preference +43.3% — credibly better
✅ plan-ui-change — detailsReason: Net win +100.0% (5W/0T/0L over 5 trial(s), sign test p=0.031), mean preference +100.0% — credibly better
❌ support-prerendering — detailsReason: Net win +50.0% (1W/1T/0L over 2 trial(s), sign test p=0.500), mean preference +20.0% — underpowered (2 counted trial(s); a credible verdict needs at least 5) — raise the eval's trial count with more scenarios or defaults.runs
❌ use-js-interop — detailsReason: Net win +75.0% (3W/1T/0L over 4 trial(s), sign test p=0.125), mean preference +30.0% — underpowered (4 counted trial(s); a credible verdict needs at least 5) — raise the eval's trial count with more scenarios or defaults.runs
🔍 Full Results - additional metrics and failure investigation steps
▶ Sessions Visualisation -- interactive replay of all evaluation sessions |
235881a to
12cf3c7
Compare
Checked whether anything actually regressed: noThe first eval run on this PR showed 7 of 8 skills as
One verdict of eight changed, and it is the case this PR exists to fix: Zero regressions. The other six But the presentation invited exactly that misreading, so I fixed itThe old headline — "1 improved, 0 no credible improvement, 7 underpowered" — puts an unjudgeable eval next to real failures with no signal about which is which. Now:
Also in this pushRebased onto 20/20 adapter tests, 20/20 gate self-tests, gate exit 0, actionlint and markdownlint clean. |
There was a problem hiding this comment.
Copilot's findings
Comments suppressed due to low confidence (3)
eng/eval-quality/check_eval_quality.py:318
check_power()re-reads each eval.yaml without handling YAML parse errors. If a spec is malformed, the earlier main parse pass records the error, but this second parse will raise and crash the gate instead of reporting a clean failure list.
with open(spec, encoding="utf-8") as fh:
doc = yaml.safe_load(fh) or {}
scenarios, runs, trials = eval_trial_count(doc)
eng/run-skill-evals.sh:201
- The local
run-skill-evals.shsummary doesn’t surface the newregressedverdict state, so a credible regression will be counted and printed as “no improvement”. Now that regressions are first-class in results.json (and in the PR comment), the local summary should report them separately.
PASS=0; NOIMPROVE=0; INDETERMINATE=0; FAIL=0
while IFS= read -r RESULTS_JSON; do
# "indeterminate" covers both an incomplete comparison and an eval with too
# few trials for the confidence interval to mean anything — neither is
# evidence that the skill failed to help.
STATE=$(node -e "
const v = JSON.parse(require('fs').readFileSync(process.argv[1], 'utf-8')).verdicts[0];
console.log(v.conclusive === false || v.underpowered === true ? 'indeterminate' : v.passed ? 'pass' : 'noimprove');
" "$RESULTS_JSON" 2>/dev/null || echo "")
case "$STATE" in
pass) PASS=$((PASS + 1)) ;;
noimprove) NOIMPROVE=$((NOIMPROVE + 1)) ;;
indeterminate) INDETERMINATE=$((INDETERMINATE + 1)) ;;
*) FAIL=$((FAIL + 1)) ;;
esac
done < <(find "$RESULTS_ROOT" -name results.json -not -path "$EXPERIMENT_OUT/*")
PRODUCED=$((PASS + NOIMPROVE + INDETERMINATE + FAIL))
echo -e "${BOLD}━━━ Summary ━━━${NC}"
echo -e " ${GREEN}✔ $PASS passed${NC}"
[ $NOIMPROVE -gt 0 ] && echo -e " ${CYAN}⊘ $NOIMPROVE no improvement${NC}"
[ $INDETERMINATE -gt 0 ] && echo -e " ${YELLOW}⚠ $INDETERMINATE underpowered or inconclusive${NC}"
[ $FAIL -gt 0 ] && echo -e " ${RED}✘ $FAIL unreadable${NC}"
.github/workflows/evaluation.yml:1114
- The comment says the investigation prompt is built when a skill “lost to its baseline”, but the jq condition triggers for any determinate non-pass (including “no credible change”), not just regressions. The comment should match the actual condition to avoid confusion when triaging results.
# If any skill genuinely lost to its baseline, build a copy-paste
# prompt for AI-assisted investigation. Underpowered and inconclusive
- Files reviewed: 14/14 changed files
- Comments generated: 0 new
|
Thanks for the incredibly thorough write-up here — reproducing all 22 verdicts from the formula alone is a really clean way to isolate the two defects, and moving the gate to score direction over magnitude is clearly the right call. The sign-test core looks solid to me; I ran the tail values independently ( A few things I'd love your take on before this goes in — all in the CI ratchet, none in the stats:
None of these block the core fix as far as I can see — the (Copilot, commenting on Abhitej's behalf.) |
📊 Skill Evaluation Results8 skill(s) evaluated — 0 improved, 8 no credible improvement. A skill passes only on a credible improvement over baseline (mean preference > 0 with its 95% CI above 0);
ℹ️ Column legend
❌ create-datadriven-aspnetcore — detailsReason: Net win +80.0% (4W/1T/0L over 5 trial(s), sign test p=0.063), mean preference +56.0% — not credible (sign test p=0.063 > 0.05)
❌ optimizing-ef-core-queries — detailsReason: Net win -100.0% (0W/0T/1L over 1 trial(s), sign test p=0.500), mean preference -40.0% — underpowered (1 counted trial(s); a credible verdict needs at least 5) — raise the eval's trial count with more scenarios or defaults.runs
❌ template-authoring — detailsReason: Net win +50.0% (1W/1T/0L over 2 trial(s), sign test p=0.500), mean preference +20.0% — underpowered (2 counted trial(s); a credible verdict needs at least 5) — raise the eval's trial count with more scenarios or defaults.runs
❌ template-comparison — detailsReason: Net win +0.0% (0W/3T/0L over 3 trial(s), sign test p=1.000), mean preference +0.0% — underpowered (3 counted trial(s); a credible verdict needs at least 5) — raise the eval's trial count with more scenarios or defaults.runs
❌ template-discovery — detailsReason: Net win +80.0% (4W/1T/0L over 5 trial(s), sign test p=0.063), mean preference +32.0% — not credible (sign test p=0.063 > 0.05)
❌ template-instantiation — detailsReason: Net win +0.0% (0W/1T/0L over 1 trial(s), sign test p=1.000), mean preference +0.0% — underpowered (1 counted trial(s); a credible verdict needs at least 5) — raise the eval's trial count with more scenarios or defaults.runs
❌ template-smart-defaults — detailsReason: Net win +75.0% (3W/1T/0L over 4 trial(s), sign test p=0.125), mean preference +30.0% — underpowered (4 counted trial(s); a credible verdict needs at least 5) — raise the eval's trial count with more scenarios or defaults.runs
❌ template-validation — detailsReason: Net win +100.0% (2W/0T/0L over 2 trial(s), sign test p=0.250), mean preference +70.0% — underpowered (2 counted trial(s); a credible verdict needs at least 5, and this eval won every one of them) — raise the eval's trial count with more scenarios or defaults.runs
🔍 Full Results - additional metrics and failure investigation steps
▶ Sessions Visualisation -- interactive replay of all evaluation sessions |
The skill evaluation gate flipped ~27% of its verdicts between runs on byte-identical inputs. Reproducing all 22 verdicts from the A/A test in The gate scored the judge's *magnitude*. Trial scores are a five-point ordinal scale (much-better +1.0, slightly-better +0.4, equal 0, ...), and a Student-t interval over those reads the 0.4 -> 1.0 step as variance, so a skill is punished for winning more decisively. Four wins and three ties over seven trials passes at ciLow +0.031 when every win is "slightly-better" and fails at -0.021 when one is "much-better" - same record, better outcome, reversed verdict. coverage-analysis failed five consecutive runs while winning 100% of its trials, then passed on a sixth with the same 3W/0T/0L record. The gate had no minimum sample size. vally returns ciLow = mean below two trials, so a single lucky judgment passed outright; a neutral skill passes ~30% of the time at one trial, and 18 of 94 gated evals sit there. adapt.mjs now reads only each trial's winner and decides with an exact one-sided sign test at 5%. The verdict is a deterministic function of the win/tie/loss record, so identical records always produce identical results. Collapsing to direction alone is not enough: a t-interval over win/tie/loss disagrees with the exact test on 12 records up to n=10 and is the permissive side in every one, passing 4W/0T/0L, 4W/3T/0L and 6W/0T/1L at p = 0.0625. MIN_CREDIBLE_TRIALS = 5 falls out of the same test rather than being chosen: the sign test cannot reach 5% below five discordant trials, and discordant trials can never exceed counted trials. Below it no record can pass, so the verdict is reported as underpowered - never a pass, never a regression - which is what stops "won every trial, failed anyway" being rediagnosed each run. check_eval_quality.py enforces the same floor on specs before they run, counting trials as scenarios x defaults.runs. The 60 existing evals below it are grandfathered in a ledger that can only shrink: the gate errors on a stale, duplicated or unnecessary entry, and --base-ref rejects entries new relative to the base branch, so a PR cannot add a below-floor eval and exempt it in the same change. Renames are read from git and are not growth. The experiment file no longer sets `runs` in `overrides:`. Precedence is CLI > experiment overrides > eval defaults and the merge is a plain spread, so that line did not default anything - it overwrote every eval's own defaults.runs and made per-eval trial counts impossible to express. No eval declares `defaults:` today, so this changes nothing until one opts in, and it is what makes raising a thin eval possible at all. Also fixes two latent bugs found while testing: --vally paths containing a space were split into separate argv entries (which made the adapter suite unrunnable on Windows, where process.execPath is under "Program Files"), and importing adapt.mjs made it parse its importer's command line. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 29c41814-d553-40fd-b50c-6590c88c9540
The first PR eval run showed 7 of 8 skills as a wall of warnings under the headline "1 improved, 0 no credible improvement, 7 underpowered", which reads as seven things breaking at once. Checking the old gate against the new one on that run's actual trial data, exactly one verdict changed: convert-blazor-server-to-webapp, 1W/0T/0L, which the old gate passed only because below two trials it computes no interval at all and lets a single judgment decide. The other six were already failing and simply moved from "no credible improvement", which blames the skill, to "underpowered", which correctly blames the eval's size. So the summary now leads with the three decided outcomes - improved, no credible change, regressed - and puts the unjudgeable ones in their own sentence that says plainly they are not regressions. "0 regressed" makes the question the old headline provoked answerable from the first line. `regressed` was already computed but never surfaced; it now has its own icon and sorts ahead of a no-change verdict when detail blocks compete for the comment budget, so a real regression cannot lose its place to an eval-size problem. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 29c41814-d553-40fd-b50c-6590c88c9540
12cf3c7 to
f0c5259
Compare
|
A couple more things surfaced when I dug into what we're trading away here — none of these block the fix, but they feel worth hashing out before or soon after this lands.
More broadly, the two things I'd love to hash out with you (probably beyond this PR):
Happy to prototype any of these against the branch if useful. (Copilot, commenting on Abhitej's behalf.) |
The red build was the new gate catching real drift, and it is green again
…and the same for That is the stale-entry check doing exactly its job, roughly two hours after it was written. It is also the reason that check is an error rather than a warning: a dead exemption is a path that a future eval could silently inherit. Rebased onto I also added a line to the allowlist header, because this will happen again to whoever retires an eval next:
Worth noting the failure mode is self-healing rather than a trap: All checks green: 20/20 adapter tests, 20/20 gate self-tests, gate exit 0, actionlint, lint, markdownlint, codeowners. |
There was a problem hiding this comment.
Copilot's findings
Comments suppressed due to low confidence (3)
.github/workflows/evaluation-run.yml:519
- The workflow step summary icon treats any non-passing conclusive verdict as ❌, which will mislabel credible regressions (now represented via
regressed: true). Consider surfacing 🔻 whenregressedis true so the step summary matches the PR comment semantics.
CONCLUSIVE=$(node -e "const r=JSON.parse(require('fs').readFileSync(process.argv[1],'utf-8')); console.log(r.verdicts[0].conclusive)" "$RESULTS_JSON")
UNDERPOWERED=$(node -e "const r=JSON.parse(require('fs').readFileSync(process.argv[1],'utf-8')); console.log(r.verdicts[0].underpowered === true)" "$RESULTS_JSON")
PASSED=$(node -e "const r=JSON.parse(require('fs').readFileSync(process.argv[1],'utf-8')); console.log(r.verdicts[0].passed)" "$RESULTS_JSON")
REASON=$(node -e "const r=JSON.parse(require('fs').readFileSync(process.argv[1],'utf-8')); console.log(r.verdicts[0].reason)" "$RESULTS_JSON")
if [ "$CONCLUSIVE" != "true" ] || [ "$UNDERPOWERED" = "true" ]; then
ICON="⚠️"
elif [ "$PASSED" = "true" ]; then
ICON="✅"
else
ICON="❌"
fi
dotnet-skills.experiment.yaml:26
- The comment still says the pass gate uses a confidence interval, but the gate is now an exact one-sided sign test over win/loss trials. This is misleading for anyone trying to adjust trial counts.
# Trials per eval = scenarios x runs, and that product is what the pass gate's
# confidence interval is computed over. See eng/eval-quality/README.md for the
# floor and why it sits where it does.
eng/run-skill-evals.sh:193
- The summary classification ignores credible regressions (
regressed: true) and counts them as "no improvement", which hides a distinct outcome under the new gate semantics.
PASS=0; NOIMPROVE=0; INDETERMINATE=0; FAIL=0
while IFS= read -r RESULTS_JSON; do
# "indeterminate" covers both an incomplete comparison and an eval with too
# few trials for the confidence interval to mean anything — neither is
# evidence that the skill failed to help.
STATE=$(node -e "
const v = JSON.parse(require('fs').readFileSync(process.argv[1], 'utf-8')).verdicts[0];
console.log(v.conclusive === false || v.underpowered === true ? 'indeterminate' : v.passed ? 'pass' : 'noimprove');
" "$RESULTS_JSON" 2>/dev/null || echo "")
case "$STATE" in
pass) PASS=$((PASS + 1)) ;;
noimprove) NOIMPROVE=$((NOIMPROVE + 1)) ;;
indeterminate) INDETERMINATE=$((INDETERMINATE + 1)) ;;
*) FAIL=$((FAIL + 1)) ;;
esac
- Files reviewed: 14/14 changed files
- Comments generated: 0 new
📊 Skill Evaluation Results8 skill(s) evaluated — 3 improved, 5 no credible improvement. A skill passes only on a credible improvement over baseline (mean preference > 0 with its 95% CI above 0);
ℹ️ Column legend
✅ analyzing-dotnet-performance — detailsReason: Net win +90.9% (10W/1T/0L over 11 trial(s), sign test p=0.001), mean preference +36.4% — credibly better
❌ android-tombstone-symbolication — detailsReason: Net win +37.5% (4W/3T/1L over 8 trial(s), sign test p=0.188), mean preference +15.0% — not credible (sign test p=0.188 > 0.05)
❌ apple-crash-symbolication — detailsReason: Net win +0.0% (1W/1T/1L over 3 trial(s), sign test p=0.750), mean preference +0.0% — underpowered (3 counted trial(s); a credible verdict needs at least 5) — raise the eval's trial count with more scenarios or defaults.runs
✅ clr-activation-debugging — detailsReason: Net win +71.4% (5W/2T/0L over 7 trial(s), sign test p=0.031), mean preference +37.1% — credibly better
✅ dotnet-trace-collect — detailsReason: Net win +82.4% (15W/1T/1L over 17 trial(s), sign test p=0.000), mean preference +54.1% — credibly better
❌ dump-collect — detailsReason: Net win +55.6% (6W/2T/1L over 9 trial(s), sign test p=0.063), mean preference +15.6% — not credible (sign test p=0.063 > 0.05)
❌ microbenchmarking — detailsReason: Net win +100.0% (1W/0T/0L over 1 trial(s), sign test p=0.500), mean preference +40.0% — underpowered (1 counted trial(s); a credible verdict needs at least 5, and this eval won every one of them) — raise the eval's trial count with more scenarios or defaults.runs
❌ setup-local-sdk — detailsReason: Net win +100.0% (3W/0T/0L over 3 trial(s), sign test p=0.125), mean preference +60.0% — underpowered (3 counted trial(s); a credible verdict needs at least 5, and this eval won every one of them) — raise the eval's trial count with more scenarios or defaults.runs
🔍 Full Results - additional metrics and failure investigation steps
▶ Sessions Visualisation -- interactive replay of all evaluation sessions |
|
✅ Evaluation passed for |
|
Thanks for landing this, @Evangelink — and nice touches in the final push, especially Since it's merged, I don't want to relitigate anything — just jotting down the gaps from the earlier review that this change intentionally didn't close, so we have them tracked rather than rediscovering them later. All of these are about the verdict itself (
None of this is blocking anything that shipped — the fix is a clear net improvement over the ciLow gate. Happy to open a follow-up issue and prototype the two magnitude-free pieces (net-win floor + completion gate) against a backtest on the #952 A/A set and the current evals, if that's useful. Curious whether you'd already thought about the completion gate and left it out on purpose, or if it just fell off in the rewrite. (Copilot, commenting on Abhitej's behalf.) |
Fixes #952.
The eval gate flipped ~27% of its verdicts between runs on byte-identical inputs. I reproduced all 22 verdicts from the A/A test in #952 from the gate's formula alone, which isolates two independent defects — only one of which the issue names.
Defect 1: the gate scored the judge's adjective
Trial scores are a five-point ordinal scale (
much-better+1.0,slightly-better+0.4,equal0, …). A Student's-t interval over those reads the 0.4 → 1.0 step as variance, so a skill is punished for winning more decisively. Four wins and three ties over seven trials:slightly-bettermuch-betterSame record, better outcome, reversed verdict.
coverage-analysisfailed five consecutive runs while winning 100% of its trials, then passed on a sixth with the same 3W/0T/0L record — its scores were[+0.4, +0.4, +1.0]in a failing run and[+0.4, +0.4, +0.4]in the passing one.Defect 2 (not in the issue): no minimum sample size
meanWithCireturnsciLow = meanbelow two trials, so a single lucky judgment passed outright. Simulated at 200k runs/cell, a skill with no real effect passes ~30% of the time at one trial — and 18 of 94 gated evals sit there. The gate was simultaneously too strict at n=3 and a rubber stamp at n=1.The fix
adapt.mjsreads only each trial'swinnerand decides with an exact one-sided sign test at 5%. The verdict is now a deterministic function of the win/tie/loss record: identical records always produce identical results.Collapsing to direction alone is not sufficient — I checked. A t-interval over win/tie/loss disagrees with the exact test on 12 records up to n=10, and in every one it is the permissive side, passing 4W/0T/0L, 4W/3T/0L and 6W/0T/1L at
p = 0.0625. The exact binomial tail has no such gap, so the ported interval code is gone entirely.MIN_CREDIBLE_TRIALS = 5falls out of that test rather than being chosen: the sign test cannot reach 5% below five discordant trials (0.5⁴ = 0.0625), and discordant trials can never exceed counted trials. Below it no record can pass, so the verdict is reported ascheck_eval_quality.pyenforces the same floor on specs before they ever run, countingtrials = scenarios × defaults.runs. The 60 existing evals below it are grandfathered in a ledger that can only shrink: the gate errors on a stale, duplicated or unnecessary entry, and--base-ref(passed by CI on every PR) rejects entries that are new relative to the base branch — so a PR cannot add a below-floor eval and exempt it in the same change. Renames are read from git and aren't treated as growth.The experiment file no longer sets
runsinoverrides:. Precedence is CLI > experiment overrides > eval defaults and the merge is a plain spread, so that line didn't default anything — it overwrote every eval's owndefaults.runs, making the issue's first recommendation impossible to implement. No eval declaresdefaults:today, so this changes nothing until one opts in.Cost
Zero additional CI minutes. Raising
runson specific evals is deliberately left as follow-up — it's the only part that costs money, and it's now expressible. For the record, a targetedruns = ceil(8/scenarios)policy measures at 1.62× fordotnet-test(~75 → ~121 min, inside the existing 180-minute timeout) and 1.82× repo-wide, versus 3.00× for the blanketruns: 3the issue rightly rejects.Also fixed (latent, found while testing)
--vallypaths containing a space were split into separate argv entries. This made the adapter test suite unrunnable on Windows, whereprocess.execPathlives underProgram Files. An unterminated quote now falls back to the old whitespace split so a bare apostrophe in a path can't be mangled either.adapt.mjsmade it parse its importer's command line./evaluateinvestigation prompt fired on everypassed == false, which would have attached "To investigate failures" to essentially every comment once 60 evals started reportingWhat reviewers will notice
The PR comment gains Net win and p columns;⚠️ underpowered on the first run. That is the honest state of the repo — none of them can currently produce a credible verdict — and ⚠️ fails no check.
Δ PreferencebecomesΔ Prefand is explicitly triage-only. 60 of 94 evals will rendereng/eval-quality/underpowered-allowlist.txtis the ledger for burning it down.Verification
ciLowfrom vally.check_eval_quality.pyexit 0,actionlintclean on all three workflows,bash -n,markdownlintclean.consolidate.mjsrender over four verdict shapes: new schema, legacy schema (pre-netWin/signTest), underpowered, and errored.Three rounds of code review and design review; every finding is addressed in the diff.
Docs:
eng/eval-quality/README.mdgains failing check 7 plus a "Why the gate scores direction, not magnitude" section;eng/vally-adapter/InvestigatingResults.mddocuments the new verdict fields and the underpowered failure mode.