Repository navigation
DOC: Explain the combined and gold-vs-model Krippendorff alphas - #4270
Conversation
Follow-up to microsoft#4181 (microsoft#4129), agreed with the maintainer on microsoft#4129. The combined alpha counts every scoring trial as a rater, so it rises with num_scorer_trials; the docs, the docstring and the GUI presented it as agreement between humans and the model. - Docstring of krippendorff_alpha_combined: say that trials count as raters and point to krippendorff_alpha_gold_model. - Scorer metrics doc page (.py and .ipynb): describe both alphas. - GUI: rename the "Agreement" column to "Combined alpha" with a tooltip that says what it pools, and add a label and description for krippendorff_alpha_gold_model. The column keeps the combined value, since the published registry entries predate the new field.
|
@microsoft-github-policy-service agree |
There was a problem hiding this comment.
🟡 Changes recommended
The alpha description incorrectly promises trial-count independence and needs to clarify across the documentation, frontend text, and test that only repeating identical trial results does not inflate it.
1 open issue
What changed in this PR
This follow-up to #4181 clarifies how PyRIT’s combined and gold-vs-model Krippendorff alphas differ, addressing the misleading presentation reported in #4129. Metric calculations remain unchanged.
Changes:
- Explain both metrics in the docstring and paired documentation.
- Rename the registry column to “Combined alpha” and add gold-vs-model display text, while retaining existing registry values.
- Update frontend tests for the revised labels and descriptions.
| File | Description |
|---|---|
pyrit/score/scorer_evaluation/scorer_metrics.py |
Clarifies the combined-alpha docstring. |
frontend/src/utils/scorerPresentation.ts |
Updates alpha labels and descriptions. |
frontend/src/utils/scorerPresentation.test.ts |
Adds assertions for both alpha descriptions and labels. |
frontend/src/components/Scorers/ScorerEvaluationDetails.test.tsx |
Updates the expected combined-alpha label. |
frontend/src/components/Registry/ScorerRegistry.tsx |
Renames the registry column to “Combined alpha.” |
frontend/src/components/Registry/ScorerRegistry.test.tsx |
Updates header and sorting checks for the renamed column. |
doc/code/scoring/4_scorer_metrics.py |
Explains combined and gold-vs-model alpha. |
doc/code/scoring/4_scorer_metrics.ipynb |
Mirrors the explanation in the notebook. |
Review effort: Balanced
More trials can still move the per-response median when the trials disagree, as the krippendorff_alpha_gold_model docstring says. Only repeating the same scores leaves it unchanged.
|
The combined-alpha explanation should say repeated trials can inflate the value, rather than that it necessarily rises. Using this PR's evaluator with three human raters each returning Suggested replacement for the frontend tooltip, metrics docstring, and both notebook formats:
Update the frontend assertion accordingly: expect(scorerMetricDescription('krippendorff_alpha_combined'))
.toContain('can inflate this value')Keep the gold-vs-model explanation: repeating identical scores leaves its two-row comparison unchanged. No calculation changes are needed. |
Repeated identical trials change the weight of model against human ratings in the combined alpha, which can raise it but can also lower it: with three raters scoring [0, 1] and every trial scoring [1, 0], it goes from 0.125 at one trial to -0.080 at two and -0.100 at three. Use the suggested wording in the docstring, the doc page (both formats) and the GUI description, and say the gold-vs-model alpha does not change, rather than does not rise, when trials repeat the same scores.
|
Thanks hannahwestra25, you're right. I reproduced your example (0.125 → -0.080 → -0.100), and it isn't monotonic either: with five identical trials it is back up to -0.004. I've used your wording in the docstring, both notebook formats and the GUI tooltip, updated the frontend assertion to |
hannahwestra25
left a comment
There was a problem hiding this comment.
thanks for contributing!

Description
Follow-up to #4181, as agreed on #4129.
krippendorff_alpha_combinedcounts every scoring trial as a rater, so it rises withnum_scorer_trials, but the docs page, its docstring and the GUI presented it as agreement between humans and the model.krippendorff_alpha_combined: say that trials count as raters, and point tokrippendorff_alpha_gold_model..pyand.ipynb): describe both alphas.krippendorff_alpha_gold_model, which the metrics details show when it is recorded.The registry column still shows the combined alpha, because the published registry entries were computed before
krippendorff_alpha_gold_modelexisted. Once they are regenerated, the column could switch to the gold-vs-model value; I left that for you to decide.