DOC: Scoring Docs Refactor#1892
Merged
Merged
Conversation
Replace the sprawled scoring docs with five focused pages (overview, true/false, float-scale, combining, metrics) plus an auto-generated scorer reference table backed by a new get_scorer_info() helper. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
# Conflicts: # doc/myst.yml
romanlutz
approved these changes
Jun 2, 2026
… get_scorer_info - Add silent=True to initialize_pyrit_async in the scoring overview page - Delete standalone owasp_llm02_scorers doc page; fold a concise OWASP LLM02 output-scorer subsection (with a live XSSOutputScorer example) into the regex section of 1_true_false_scorers - Make get_scorer_info defensive against mocked pyrit.score exports (spec=type MagicMocks make isinstance(obj, type) True but issubclass raise TypeError under test pollution); add a regression test Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The reference table's Uses LLM? column already conveys the speed/cost axis, so the prose section was redundant. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The section duplicated the sidebar/TOC navigation to the child pages. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
jsong468
reviewed
Jun 2, 2026
jsong468
reviewed
Jun 2, 2026
jsong468
reviewed
Jun 2, 2026
jsong468
reviewed
Jun 2, 2026
jsong468
approved these changes
Jun 2, 2026
Address PR review feedback: - Note that TextTarget records the prompt and returns no assistant content, so the attack example has nothing substantive to score; point readers to an LLM-backed target for a real response - Clarify that SelfAskRefusalScorer only short-circuits on a fully blocked response; partially blocked content is still scored by the LLM Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
romanlutz
added a commit
to romanlutz/PyRIT
that referenced
this pull request
Jun 4, 2026
Merge 26 commits from main, including: - MAINT Breaking: Convert ScenarioResult to Pydantic (microsoft#1908) - MAINT: Migrating Seed classes to Pydantic (microsoft#1898) - MAINT: Migrating AttackResult to Pydantic (microsoft#1899) - MAINT: Bump ty-pre-commit v0.0.32 -> 0.0.43 (microsoft#1919) - FEAT: Realtime streaming session support and server-side barge-in attack (microsoft#1766) - FEAT text adaptive scenario (microsoft#1760) - FIX: Integration Test Fixes (microsoft#1907) - DOC: Scoring Docs Refactor (microsoft#1892) - Various dependency bumps Conflicts (15 files) resolved by taking main's version + re-running ruff --fix to re-apply PEP 604 typing modernization on the incoming code (177 violations auto-fixed). All resolved files re-staged. Local verification: - ruff check: All checks passed - ruff format: clean - pytest tests/unit -n 8: 9550 passed, 6 skipped Known issue (pre-existing on main, not caused by this merge): - ty 0.0.43 enabled missing-override-decorator rule, which flags hundreds of pre-existing methods across the codebase. Main's own CI is currently failing on this. Our PR will inherit the same failure since touched files come into pre-commit scope. Fixing this rule globally is a separate, large mechanical change orthogonal to typing modernization. Co-authored-by: Copilot <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.
This PR attempts to make scoring docs a lot more cohesive and clearer. I really like the digestability more.
The intro and metrics stay close to the same, but the others are collapsed into three sections: true_false, float_scale, and combining.
One note is the
_ScorerInfoclass. It isn't ideal, I eventually want scorer capabilities. But for now I like it, and it's documented as temporary, and can keep our documentation up to date.