feat(compare): add normalized gain metric#1101
Merged
Conversation
Add Hake's normalized gain (g) to compare output, measuring improvement relative to remaining headroom rather than raw absolute delta. Formula: g = (score_candidate − score_baseline) / (1 − score_baseline) This separates genuine scaffolding from ceiling effects — a +5pp gain from a 90% baseline (g=0.5) is proportionally much larger than +5pp from a 10% baseline (g=0.056). Shown as "Norm. gain" in table output and "g" in matrix pairwise summary. Available as mean_normalized_gain in JSON output. Returns null when baseline is 1.0 (perfect score, no headroom). Closes #1100 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Deploying agentv with
|
| Latest commit: |
ea1e60a
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://38a450aa.agentv.pages.dev |
| Branch Preview URL: | https://feat-1100-normalized-gain.agentv.pages.dev |
Use 'g' consistently in both table summary and matrix pairwise output, matching the standard notation from Hake (1998) and SkillsBench paper. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add normalized gain (g) to compare docs: formula, interpretation table, updated table/JSON output examples, and tips section. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Hake's normalized gain (`g`) to `agentv compare` output, measuring improvement relative to remaining headroom.
The metric
```
g = (score_candidate − score_baseline) / (1 − score_baseline)
```
Raw delta (`Δ`) tells you how much scores changed. Normalized gain tells you how much of the available improvement was captured:
Returns `null` when baseline is already 1.0 (perfect score). Null values are excluded from mean computation.
Where it appears
Red/Green E2E
Before (main — no `g`):
```
Summary: 2 wins, 1 loss, 0 ties | Mean Δ: +0.267 | Status: improved
```
After (this branch):
```
Summary: 2 wins, 1 loss, 0 ties | Mean Δ: +0.267 | g: +0.256 | Status: improved
```
JSON output now includes `normalized_gain` per test and `mean_normalized_gain` in summary.
Changes
Test plan
Closes #1100
🤖 Generated with Claude Code