Repository navigation
FEAT: Add standalone ASSERT conversation scoring - #3539
Merged
Richard Lundeen (richlundeen) merged 5 commits intoNov 6, 2026
Merged
Richard Lundeen (richlundeen) merged 5 commits into
Richard Lundeen (richlundeen) merged 5 commits into
Conversation
Add direct and category-validated policy scoring with retained evidence. Reject unreadable conversation media before judging. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Integrate pinned main 36ad292 without changing the PR's scoring semantics. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Exercise both category orders, conversation and message triggers, and matching or corrected judge verdicts through persisted public scorer results. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Richard Lundeen (richlundeen)
left a comment
Contributor
Author
There was a problem hiding this comment.
Automated review completed. No blocking concerns remain. This review records source coverage; it does not authorize merge.
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the standalone ASSERT conversation-scoring changes.
No open issues 🎉
What changed in this PR
Adds standalone ASSERT policy-violation and overrefusal scoring for retained conversations, composing PyRIT’s existing true/false scorer and conversation wrapper without requiring an ASSERT generator or scenario.
Changes:
- Adds direct and category-validated judgment modes, with optional policy-verdict correction and retained evidence.
- Rejects unsupported conversation media before judging and adds tests for validation, persistence, retries, and replay.
- Adds usage examples and pinned ASSERT source attribution.
| File | Description |
|---|---|
third_party/assert-provenance.json |
Records scorer and prompt-template sources and adaptations. |
THIRD_PARTY_NOTICES.txt |
Extends ASSERT attribution to conversation scoring. |
tests/unit/score/test_assert_policy_scorer.py |
Tests scoring contracts, validation, evidence retention, and replay. |
pyrit/score/true_false/assert_policy_scorer.py |
Implements the builder, dimensions, judgment modes, and policy correction. |
pyrit/score/conversation_scorer.py |
Adds strict evidence validation and corresponding identifier fields. |
pyrit/score/__init__.py |
Exposes ASSERT scoring APIs through lazy exports. |
pyrit/datasets/score/true_false_question/assert_policy_system_prompt.yaml |
Defines direct failure-evaluation instructions and response schema. |
pyrit/datasets/score/true_false_question/assert_category_policy_system_prompt.yaml |
Defines category-level evaluation instructions and response schema. |
doc/code/scoring/1_true_false_scorers.py |
Documents scoring behavior and provides standalone usage examples. |
doc/code/scoring/1_true_false_scorers.ipynb |
Adds matching notebook examples with recorded scoring output. |
Review effort: Balanced
Roman Lutz (romanlutz)
approved these changes
Nov 6, 2026
Roman Lutz (romanlutz)
left a comment
Contributor
There was a problem hiding this comment.
This is great! Can't wait to have it in :-)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Preserve the 20 ms polling deadline while allowing database setup to complete on loaded CI runners. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.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.
Add standalone ASSERT policy-violation and overrefusal scoring over retained conversations, with optional category validation and policy-flag correction.
Preserve native scores and evidence, reject unreadable media before judging, and add executed usage examples and pinned source attribution.