docs(tutorials): pass@k evaluation and severity scoring for red-team results (#30, #31) - #55
Open
opitaru-sys wants to merge 1 commit into
Conversation
…rity-Project#30, GenAI-Security-Project#31) Co-Authored-By: Claude Fable 5 <noreply@anthropic.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.
Follows up on my comment in #30. This adds a self-contained tutorial plus a small standard-library harness that gives red-team results a consistent evaluation and severity layer, toward #30 and relating to #31.
The core idea is statistical honesty about stochastic guards: a single success out of one attempt tells you very little, so the harness scores attacks as pass@k with a Wilson confidence interval, enforces an N-reroll rule before anything is called reproduced, reports zero-success runs as a bounded null rather than "secure", and only assigns severity to findings that actually reproduced. Records carry optional OWASP LLM Top 10 and MITRE ATLAS tags, and the report aggregates by both.
Contents: the tutorial README, the harness (redteam_eval.py, CLI included), a JSON Schema for input records, a worked example dataset covering confirmed / bounded-null / inconclusive findings, and a 22-test suite runnable with python test_redteam_eval.py. Standard library only, Python 3.10+. isort and black run per CONTRIBUTING.
One layout note: existing tutorials are flat .md files, but this one carries code, so it uses a subfolder the way exploitation/ and sandboxes/ already do. Happy to flatten or restructure if you prefer.