Dynamic Red Team Strategies
Dynamic strategies use an attacker LLM to mutate adversarial inputs through iterative refinement. Multiple calls to both attacker and target models determine the most effective attack vector. Higher success rates (40-90% ASR increase) than static strategies, but more resource-intensive. Stop after exhausting token budget or on successful harmful output.
Use this skill when
- Iteratively refining prompts to bypass security controls (
jailbreak) - Building custom attack taxonomies with persistent memory (
jailbreak:meta) - Chaining multiple jailbreak techniques from research papers (
jailbreak:composite) - Running Tree of Attacks branching exploration (
jailbreak:tree) - Using Best-of-N parallel sampling from Anthropic research (
best-of-n) - Testing academic authority bias framing (
citation,likert) - Testing mathematical notation-based attacks (
math-prompt) - Testing structured markup authority exploitation (
authoritative-markup-injection) - Running gradient-based GCG adversarial prompt search (
gcg)
Do not use this skill when
- You need deterministic, low-cost encoding bypasses → use
promptfoo-strategies-static - You need multi-turn conversation attacks → use
promptfoo-strategies-multi-turn - You need indirect prompt injection via web pages → use
promptfoo-strategies-indirect-injection - You need custom or regression strategies → use
promptfoo-strategies-custom-regression - Cloud access is unavailable AND the strategy requires it (
jailbreak:meta,jailbreak:hydra)
🛡️ Edge cases (mandatory handling)
- Medium-to-high cost — dynamic strategies make multiple API calls per test (attacker + target). Run on a smaller number of tests/plugins before a full test.
jailbreak:metarequires Promptfoo Cloud — maintains persistent memory and strategic reasoning across iterations. SetPROMPTFOO_REMOTE_GENERATION_URLor log into Promptfoo Cloud.- Token budget tracking — dynamic strategies stop after exhausting the configured token budget or on successful harmful output. Track token usage to prevent runaway costs.
numIterationsdefault is 4 forjailbreak— override viaconfig.numIterationsorPROMPTFOO_NUM_JAILBREAK_ITERATIONSenv var. Increase for deeper exploration, decrease for cost.jailbreak:metavsjailbreak— meta explores multiple DISTINCT attack types (broad coverage, higher cost); standard refines ONE approach (deep, lower cost). Choose based on need.- GCG has low ASR (0-10%) — gradient-based optimization is resource-intensive but often ineffective against modern models. Use for research, not primary testing.
jailbreak:compositeandjailbreakare recommended — 60-80% ASR increase, the highest single-turn success rates.- Session management with
transformVars— each iteration gets a new UUID viacontext.uuidto prevent conversation history from affecting subsequent attempts.
🎯 Core workflow
- Choose strategy — load
references/strategy-selection.mdfor the decision matrix (meta vs standard vs tree vs composite). - Configure iterative jailbreak — load
references/iterative-jailbreak.mdforjailbreakconfig,numIterations, session management. - Configure meta-agent — load
references/meta-agent.mdforjailbreak:metaconfig, Cloud requirement, broad vs deep. - Configure composite/tree — load
references/composite-tree.mdforjailbreak:compositeandjailbreak:treeconfigs. - Academic strategies — load
references/academic-strategies.mdforcitation,likert,math-prompt,best-of-n,authoritative-markup-injection. - GCG — load
references/gcg.mdfor gradient-based optimization config. - Configuration — load
references/configuration.mdfor plugin targeting, token budget, env vars. - Checklist — run
references/checklist.mdbefore declaring done.
🎯 Core principles (summary)
- Dynamic = LLM-as-attacker iteratively refining — multiple calls to attacker + target, higher ASR (40-90%), higher cost.
jailbreak(iterative) — refines a single prompt through multiple iterations using LLM-as-a-Judge. 60-80% ASR. Default 4 iterations.jailbreak:meta(recommended) — builds custom attack taxonomy, learns from all attempts, pivots to different approaches. 70-90% ASR. Requires Cloud.jailbreak:composite(recommended) — chains multiple jailbreak techniques from research papers. 60-80% ASR.jailbreak:tree— branching attack paths based on Tree of Attacks research. 60-80% ASR.best-of-n— parallel sampling from Anthropic research. 40-60% ASR. High cost.citation/likert— academic authority bias framing. 40-60% ASR.math-prompt— mathematical notation attacks (set theory, abstract algebra). 40-60% ASR.authoritative-markup-injection— structured format authority exploitation. 40-60% ASR.gcg— gradient-based optimization. 0-10% ASR. High cost, research use.- Token budget tracking prevents runaway costs; strategies stop on success or budget exhaustion.
📦 Strategy catalog
| Strategy | ID | ASR Increase | Cost | Description |
|---|---|---|---|---|
| Iterative Jailbreak | jailbreak |
60-80% | High | Lightweight iterative refinement via LLM-as-a-Judge |
| Meta-Agent | jailbreak:meta |
70-90% | High 🌐 | Strategic taxonomy builder with persistent memory |
| Composite | jailbreak:composite |
60-80% | Medium 🌐 | Chains multiple research techniques |
| Tree-based | jailbreak:tree |
60-80% | High | Branching attack paths (Tree of Attacks) |
| Best-of-N | best-of-n |
40-60% | High 🌐 | Parallel sampling (Anthropic research) |
| Citation | citation |
40-60% | Medium 🌐 | Academic authority bias framing |
| Likert | likert |
40-60% | Medium 🌐 | Academic evaluation framework framing |
| Math Prompt | math-prompt |
40-60% | Medium 🌐 | Mathematical notation attacks |
| Auth Markup Injection | authoritative-markup-injection |
40-60% | Medium 🌐 | Structured format authority exploitation |
| GCG | gcg |
0-10% | High 🌐 | Gradient-based optimization (research) |
🌐 = uses remote inference in Promptfoo Community edition
References
references/strategy-selection.md— decision matrix: which dynamic strategy for which goalreferences/iterative-jailbreak.md—jailbreakconfig,numIterations, session management, example scenarioreferences/meta-agent.md—jailbreak:metaconfig, Cloud requirement, meta vs standard comparison, when to usereferences/composite-tree.md—jailbreak:compositeandjailbreak:treeconfigs, research paper referencesreferences/academic-strategies.md—citation,likert,math-prompt,best-of-n,authoritative-markup-injectionreferences/gcg.md— GCG gradient-based optimization config and limitationsreferences/configuration.md— plugin targeting, token budget, env vars, cost managementreferences/checklist.md— strategy selection, config, cost, post-run checklist