superred-optimizer-pair
PAIR (Prompt Automatic Iterative Refinement) jailbreak optimizer for the superred red-teaming framework.
PAIR is a query-efficient, black-box jailbreak method: an attacker LLM iteratively refines an adversarial prompt against a target model, using a judge to score each attempt and feeding the target's response back as the next iteration's context.
Install
pip install superred-optimizer-pair
Credits / upstream
This optimizer is a faithful reimplementation of PAIR (Prompt Automatic Iterative Refinement) for the superred framework.
- PAIR - Chao et al., "Jailbreaking Black Box Large Language Models in
Twenty Queries" (arXiv:2310.08419),
https://github.com/patrickrchao/JailbreakingLLMs. MIT License, Copyright (c)
2023 PAIR Team. The attacker system prompts, the GPT-judge prompt and
Rating: [[n]]format, the init/feedback message formats, the GCG refusal keyword dictionary, and the runtime defaults are ported verbatim from this repository and are redistributed here under its MIT license. - Persuasion prompt examples - the logical-appeal and authority-endorsement worked examples derive from Zeng et al., "How Johnny Can Persuade LLMs to Jailbreak Them" (arXiv:2401.06373), reaching this module through the PAIR repository.
- Refusal dictionary - the
gcgjudge's refusal-string list originates from GCG (Zou et al., arXiv:2307.15043, https://github.com/llm-attacks/llm-attacks, MIT, Copyright (c) 2023 Andy Zou), via PAIR.
Our superred integration code is MIT-licensed (see LICENSE and NOTICE).
Metadata
Release files for superred-optimizer-pair 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| superred_optimizer_pair-0.1.0.tar.gz | 22.1 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| superred_optimizer_pair-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 41.0 kB
Release files / superred_optimizer_pair-0.1.0.tar.gz
| Download URL | superred_optimizer_pair-0.1.0.tar.gz |
|---|---|
| Size | 22.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c35a83c33580af20686249ba1fbf25b15917a03f73480888231db5d567d90d6d
|
|
BLAKE2b-256 checksum How to use checksums |
46223eba5f326066bc7be39efed078e55b923a2ea4e7b74d815b597b346f9e6b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 22, 2026.
Transparency logRelease files / superred_optimizer_pair-0.1.0-py3-none-any.whl
| Download URL | superred_optimizer_pair-0.1.0-py3-none-any.whl |
|---|---|
| Size | 18.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ec3280405ff33cb0ea085a5ff8b3189eb821205f6ddbe160f603b87e36b4f62b
|
|
BLAKE2b-256 checksum How to use checksums |
db8c78449140cd7c1b6f8e6fe4e7a7286bf2f650d279225a35989ded06e0de80
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 22, 2026.
Transparency logSecurity for superred-optimizer-pair 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for superred_optimizer_pair-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 22, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.