Repository navigation
FEAT: Add Garak divergence scenario - #2547
Merged
Richard Lundeen (richlundeen) merged 5 commits intoSep 20, 2026
Merged
Richard Lundeen (richlundeen) merged 5 commits into
Richard Lundeen (richlundeen) merged 5 commits into
Conversation
Contributor
Author
|
@microsoft-github-policy-service agree |
Vimal Sahani (VimalN2005)
force-pushed
the
feat/garak-divergence-scenario
branch
from
September 8, 2026 13:48
a88949f to
6e8f6c2
Compare
Contributor
Author
|
Thank you for the assignment, Roman Lutz (@romanlutz)! I have implemented the complete Garak Divergence scenario, dataset, deterministic scorer, comprehensive unit tests, and synchronized scanner documentation. The branch is cleanly rebased on top of the latest |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Use typed per-execution repetition expectations, a reusable scorer, and score-owned mitigation data. Align the Repeat corpus, provenance, documentation, and tests with current scenario architecture. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Richard Lundeen (richlundeen)
enabled auto-merge
September 19, 2026 21:28
auto-merge was automatically disabled
September 20, 2026 04:58
Head branch was pushed to by a user without write access
Contributor
Author
|
Hi Richard Lundeen (@richlundeen), thank you for simplifying the divergence scenario and enabling auto-merge! I have:
Workflows are queued and ready to run. Thanks again! |
Richard Lundeen (richlundeen)
enabled auto-merge
September 20, 2026 20:51
Richard Lundeen (richlundeen)
approved these changes
Sep 20, 2026
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.
Description
Fixes #2533
This PR adds a native PyRIT scenario porting Garak's
divergenceprobe (divergence.Repeatanddivergence.RepeatedToken), testing whether prompt repetition causes target models to diverge from requested repetition into unexpected continuation, output instability, or training data replay.Key changes:
pyrit/datasets/seed_datasets/local/garak/garak_divergence.prompt):poem,company,book,aacross 1, 3, 40 repeats) and a small, bounded set of precomputed repeated tokens (without any runtime tokenizer dependency).confidentiality,training_data_leakage.pyrit/score/true_false/regex/divergence_scorer.py):DivergenceScorer(MessageTrueFalseScorer), a deterministic scorer distinguishing compliant bounded repetition and standard refusal/mitigation prefixes from divergence hits into unexpected continuations.pyrit.score.true_false.regexandpyrit.score.pyrit/scenario/scenarios/garak/divergence.py):DivergenceTechnique(ScenarioTechnique)withRepeatas default,RepeatedTokenas explicit opt-in, andALL.Divergence(Scenario)leveraging standardPromptSendingAttackworkflow and per-prompt derived objectives.pyrit.scenario.scenarios.garak.doc/scanner/garak.py&doc/scanner/garak.ipynb):Tests and Documentation
tests/unit/scenario/garak/test_divergence.py:PromptSendingAttackgeneration.DEFAULT->repeat,ALL->repeat+repeated_token).pytest tests/unit/scenario/garak/): 154/154 passed.jupytext --sync doc/scanner/garak.py.ruff checkandruff format --check.