MAINT: Update scorer evaluation metrics for v1.1.0 - #2571
Merged
varunj-msft merged 1 commit intoSep 4, 2026
Merged
Conversation
Regenerates scorer evaluation metrics with `python -m build_scripts.evaluate_scorers` for the v1.1.0 release. Adds 20 rows tagged `pyrit_version: 1.1.0` across 8 registry files. The files are append-only, so all historical rows are preserved. 27 of the 29 registered scorers were evaluated. Seven are composite/threshold wrappers with no dataset, so they correctly produce no rows. The numbers sit inside the historical bands for every scorer: SelfAskRefusalScorer accuracy 0.971-0.990, SelfAskLikertScorer mean absolute error 0.169-0.374, and TrueFalseCompositeScorer stays high-precision/low-recall (0.979/0.241, against a historical recall range of 0.241-0.439). No scorer regression. likert_fairness_bias_gpt4o and likert_sexual_gpt4o are not included. Their datasets label the harm category `bias` and `sexual_content`, while the harm definitions declare `fairness_bias` and `sexual`, so evaluation raises before writing a row. Tracked in microsoft#2570. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
varunj-msft
force-pushed
the
varunj-msft/v1.1.0-Release-Scorer-Eval-Metrics
branch
from
September 4, 2026 05:34
284079f to
37cbef2
Compare
varunj-msft
marked this pull request as ready for review
September 4, 2026 05:38
Contributor
Author
|
Evaluation run is complete: Because the original run was killed mid-flight by a container restart (at 23/29) and these registry files are append-only, the two risks were double-written rows and a torn final line. Both were checked explicitly against the pushed commit
The 8 files on the branch were also confirmed byte-identical to the locally verified ones. Only |
varunj-msft
requested review from
Richard Lundeen (richlundeen)
and removed request for
Richard Lundeen (richlundeen)
September 4, 2026 05:40
Richard Lundeen (richlundeen)
approved these changes
Sep 4, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Sep 4, 2026
varunj-msft
deleted the
varunj-msft/v1.1.0-Release-Scorer-Eval-Metrics
branch
September 4, 2026 06:55
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
Regenerates the scorer evaluation metrics for the v1.1.0 release, per the "Before Publishing" checklist in
doc/contributing/10_release_process.md(python -m build_scripts.evaluate_scorers).Data only — 8 registry files,
+20 / −0, zero code. The registry files are append-only, so every historical row is preserved.Of the 29 registered scorers: 20 ran and wrote a row, 7 were skipped because the registry already held a sufficient matching entry (
RegistryUpdateBehavior.SKIP_IF_EXISTSskips when the dataset/harm-definition versions match and the existingnum_scorer_trialsis at least the requested 3), and 2 raised the error described below.Note on the 7 skipped: 3 are threshold wrappers, but 4 are
AzureContentFilterScorerharm baselines that do have datasets. Those 4 would hit the same category mismatch as #2570 if they were re-evaluated — the skip short-circuits before evaluation, so the bug is latent rather than fixed. See #2570.harm/{exploits,hate_speech,information_integrity,privacy,self_harm,violence}_metrics.jsonlSelfAskLikertScorerobjective/objective_achieved_metrics.jsonlTrueFalseCompositeScorer×2,TrueFalseInverterScorer×2,FloatScaleThresholdScorer,SelfAskTrueFalseScorer×2refusal_scorer/refusal_metrics.jsonlSelfAskRefusalScorerAll 20 rows are tagged
pyrit_version: 1.1.0.Validation
Verified programmatically rather than by eye — every row is a pure append (all pre-existing bytes unchanged), parses as valid JSON, and is unique by
(class_name, hash, eval_hash)so no scorer was written twice.Metric values were compared against every historical row for the same scorer class:
SelfAskRefusalScorer×7 — accuracy 0.971–0.990, F1 0.979–0.993 (historical 0.962–1.000).SelfAskLikertScorer×6 — mean absolute error 0.169–0.374 on a 1–5 Likert scale.TrueFalseInverterScorer×2 — accuracy 0.884 / 0.896 (historical 0.785–0.894).FloatScaleThresholdScorer— accuracy 0.747, recall 0.487 (historical 0.585–0.757 / 0.152–0.503).SelfAskTrueFalseScorer×2 — accuracy 0.625 / 0.729 (historical 0.628–0.800). These run at temperature 0.9, and 0.625 is within one standard error (~0.024 on 395 samples) of the historical floor.TrueFalseCompositeScorer×2 — accuracy 0.630 / 0.742, precision 0.979 / 0.989, recall 0.241 / 0.471. The low recall looks alarming in isolation, so it was checked against the full history for this scorer: recall has always been 0.241–0.439 with precision 0.940–0.988. It is inherently high-precision/low-recall (ANDaggregation).No scorer regression detected in this release.
Not included:
likert_fairness_bias_gpt4oandlikert_sexual_gpt4oTheir datasets label the harm category
biasandsexual_content, whilepyrit/datasets/harm_definition/{fairness_bias,sexual}.yamldeclarefairness_biasandsexual.ScorerEvaluator._select_evaluation_scorecompares the two and raises before a row can be written:This is a namespace collision rather than a typo —
sexual_contentandbiasare real names in PyRIT's harm taxonomy, whilefairness_biasandsexualare Likert scale identifiers. Tracked in #2570 with a suggested fix; deliberately not addressed here so this PR stays data-only. These two files keep their0.14.0.dev0metrics.Note on the release branch
These metrics files ship inside the wheel (
MANIFEST.in:recursive-include pyrit *.jsonl). Cherry-picking this intoreleases/v1.1.0would change the built artifact and invalidate the validation already completed atd9dae48ce. Recommendmainonly.