Skip to content

FIX: Re-measure objective scorers so the default objective scorer is F1-ranked - #4234

Open
Richard Lundeen (richlundeen) wants to merge 1 commit into
microsoft:mainfrom
richlundeen:richlundeen-scorer-metrics-coverage
Open

Richard Lundeen (richlundeen) wants to merge 1 commit into
microsoft:mainfrom
richlundeen:richlundeen-scorer-metrics-coverage

Conversation

@richlundeen

@richlundeen Richard Lundeen (richlundeen) commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Description

PyRIT's default objective scorer is chosen by F1, but ScorerInitializer._tag_best_objective only ranks
registry entries with complete coverage counts (num_input_responses). Most objective entries predate that
field, so the only eligible candidate was acs_with_refusal (F1 0.366, below the always-true baseline of
0.652), and it became the default. This PR re-measures the strongest objective scorers with current code so
selection can see them. With it, the default changes from acs_with_refusal to inverted_refusal (F1 0.885).

  • Re-measured three registered scorers on the 395-row objective gold set (3 trials each, all 395/395
    responses determined). Identities and eval hashes are unchanged; each entry is replaced in place by
    replace_evaluation_results (it moves to the end of the file).
  • Removed one entry (19c69859…) that is inverted_refusal recorded with the unresolved placeholder
    {AZURE_OPENAI_GPT5_4_UNDERLYING_MODEL} as its underlying model name, which gave it an eval hash no
    scorer produces. That entry recorded F1 0.896 with complete coverage; the re-measured 0.885 is within
    noise of it, not a regression.
Scorer (judge) Before: accuracy / F1 After: accuracy / F1 Precision / recall Coverage after
inverted_refusal (gpt-5.4) 0.896 / 0.894, no coverage count 0.889 / 0.885 0.881 / 0.890 395/395
fallback (gpt-4o) 0.884 / 0.875, no coverage count 0.889 / 0.882 0.906 / 0.859 395/395
main (gpt-4o-unsafe) no metrics 0.863 / 0.859 0.855 / 0.864 395/395
acs_with_refusal (default before this PR; no longer selected) 0.623 / 0.366 not re-measured — 395/395

Constant-guess baselines on this set: accuracy 0.516, F1 0.652. The before/after differences for
inverted_refusal and fallback are within one combined standard error (about 0.022), so this is a
re-measurement, not an accuracy improvement; the user-visible change is which scorer is selected by default.
main is the inverted refusal scorer on objective_scorer_chat, which previously had no metrics; it trails
inverted_refusal by 0.025 accuracy, about 1.5 combined standard errors, so its lower ranking is suggestive
rather than conclusive.

Each entry was produced the way build_scripts/evaluate_scorers.py does it: the registered
ScorerInitializer instance (inverted_refusal, fallback, main) run with
evaluate_async(num_scorer_trials=3) against its own objective gold mapping, using Azure OpenAI judges.

🤖 Generated with Claude Code

Re-measure inverted_refusal (5d9c2551, gpt-5.4) and fallback (97da9dca,
gpt-4o) with three trials on all 14 objective gold files, and add first
metrics for main (0bba4802, gpt-4o-unsafe). Each entry now records
num_input_responses == num_responses == 395, so ScorerInitializer can rank
them for the default objective scorer, which moves from acs_with_refusal
(F1 0.366) to inverted_refusal (F1 0.885).

Remove the placeholder twin 19c69859, recorded under the unresolved
{AZURE_OPENAI_GPT5_4_UNDERLYING_MODEL} name; the re-measured 5d9c2551
entry supersedes it and no current code or deployment builds it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 12, 2026 05:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request. Copilot's per-file or total diff limits were exceeded. Try reducing the changed content or splitting the changes into smaller pull requests, then request a review from Copilot again.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants