DeepTeam is a framework to red team LLMs and AI agents.
.
A-Vamshi27cd038cb32d
diff --git a/docs/docs/images/tree-jailbreaking-example.png b/docs/docs/images/tree-jailbreaking-example.pngnew file mode 100644index 00000000..b5797bf0Binary files /dev/null and b/docs/docs/images/tree-jailbreaking-example.png differdiff --git a/docs/docs/red-teaming-adversarial-attacks-bad-likert-judge.mdx b/docs/docs/red-teaming-adversarial-attacks-bad-likert-judge.mdxindex 4250cdb2..36fe139e 100644--- a/docs/docs/red-teaming-adversarial-attacks-bad-likert-judge.mdx+++ b/docs/docs/red-teaming-adversarial-attacks-bad-likert-judge.mdx@@ -10,8 +10,6 @@ import AttackTagsDisplayer from "@site/src/components/AttackTagsDisplayer";The `BadLikertJudge` attack is a sophisticated multi-turn jailbreak technique that coerces LLMs into generating harmful content by **leveraging their ability to evaluate textual responses using Likert scale ratings**. The attack exploits the model's willingness to act as a _"harmfulness evaluator"_ rather than directly requesting harmful content. The process involves establishing the model as a judge, requesting examples for different harmfulness scores, and extracting the most harmful examples from the responses.--:::infoThe attack **leverages role reframing and indirect prompting** to bypass safety measures. Instead of asking "How to make a bomb?", it asks the model to provide examples of responses that would score 1 vs 3 on a harmfulness scale, then extracts the score 3 examples.:::diff --git a/docs/docs/red-teaming-adversarial-attacks-crescendo-jailbreaking.mdx b/docs/docs/red-teaming-adversarial-attacks-crescendo-jailbreaking.mdxindex a2e868b7..19a5d15a 100644--- a/docs/docs/red-teaming-adversarial-attacks-crescendo-jailbreaking.mdx+++ b/docs/docs/red-teaming-adversarial-attacks-crescendo-jailbreaking.mdx@@ -10,8 +10,6 @@ import AttackTagsDisplayer from "@site/src/components/AttackTagsDisplayer";The `CrescendoJailbreaking` attack enhances a _base attack_ — a harmful prompt targeting a specific vulnerability — with **neutral or benign queries** and gradually escalates in intensity. Each round begins with **mild prompts** and grows more forceful and direct, **increasing pressure** on the model to produce harmful outputs. If the LLM refuses to engage, the attack **backtracks** and adjusts, retrying with slight modifications to bypass the refusal. This method is highly iterative, ensuring that with each round, the attack becomes harder for the model to refuse.--The **number of rounds** and **backtracks** can be adjusted, with each escalation carefully evaluated for success. Crescendo Jailbreaking is designed to **wear down** the model's defenses by gradually increasing the intensity of the prompts, making it more likely for the LLM to eventually generate harmful outputs. The gradual nature of this method makes it harder for the model to detect and resist, as the prompts evolve from **harmless** to **harmful** over time.:::caution IMPORTANTdiff --git a/docs/docs/red-teaming-adversarial-attacks-linear-jailbreaking.mdx b/docs/docs/red-teaming-adversarial-attacks-linear-jailbreaking.mdxindex bfba5f79..b2348181 100644--- a/docs/docs/red-teaming-adversarial-attacks-linear-jailbreaking.mdx+++ b/docs/docs/red-teaming-adversarial-attacks-linear-jailbreaking.mdx@@ -10,8 +10,6 @@ import AttackTagsDisplayer from "@site/src/components/AttackTagsDisplayer";The `LinearJailbreaking` attack enhances a _base attack_ — a harmful prompt targeting a specific vulnerability — and iteratively refines it using the **target LLM**'s responses. Each iteration builds on the last, gradually improving the attack's effectiveness against the target LLM to produce harmful outputs.--:::infoThe linear jailbreaking process only terminates when the target LLM produces a harmful response or reaches the maximum number of turns.:::diff --git a/docs/docs/red-teaming-adversarial-attacks-sequential-jailbreaking.mdx b/docs/docs/red-teaming-adversarial-attacks-sequential-jailbreaking.mdxindex 45a42963..dd4b6901 100644--- a/docs/docs/red-teaming-adversarial-attacks-sequential-jailbreaking.mdx+++ b/docs/docs/red-teaming-adversarial-attacks-sequential-jailbreaking.mdx@@ -10,8 +10,6 @@ import AttackTagsDisplayer from "@site/src/components/AttackTagsDisplayer";The `SequentialJailbreaking` attack uses _multi-turn conversational scaffolding_ to guide a target LLM toward generating restricted or harmful outputs. Instead of issuing a direct request, **it reframes the harmful prompt into a structured dialogue or scenario** that gradually escalates in complexity or specificity over several turns — exploiting the model’s consistency and role adherence in conversation.--:::caution IMPORTANTSequential Jailbreaking relies on **narrative context and psychological framing** — harmful prompts are embedded in formats designed to reduce the model's guardrails over time.:::diff --git a/docs/docs/red-teaming-adversarial-attacks-tree-jailbreaking.mdx b/docs/docs/red-teaming-adversarial-attacks-tree-jailbreaking.mdxindex 69e37439..ef307d62 100644--- a/docs/docs/red-teaming-adversarial-attacks-tree-jailbreaking.mdx+++ b/docs/docs/red-teaming-adversarial-attacks-tree-jailbreaking.mdx@@ -10,8 +10,6 @@ import AttackTagsDisplayer from "@site/src/components/AttackTagsDisplayer";The `TreeJailbreaking` attack enhances a _base attack_ — a harmful prompt targeting a specific vulnerability — in multiple parallel ways, it forms a tree by exploring different variations of the attack to bypass the **target model**'s safeguards. Instead of refining a single prompt, **it branches out** by evaluating and expanding only the most promising paths to increase the chances of a successful jailbreak.--:::caution IMPORTANT**Pruning is critical in Tree Jailbreaking**, as it ensures the system focuses resources on the most effective branches.:::@@ -88,4 +86,19 @@ If the `turn_level_attacks` is supplied with a list of single-turn attacks, `Tre:::noteThis hybrid approach combines **broad parallel exploration** with **targeted refinement**, boosting the likelihood of bypassing safety filters through multiple diverse jailbreak attempts.-:::\ No newline at end of file+:::++## Example++Here's an example of how `TreeJailbreaking` attack works from a vulnerability:++++1. **Start**: Launch with one adversarial user prompt aimed at a known vulnerability.+2. **Observe**: Get the model’s reply — it might refuse, give a neutral answer, or reveal something risky.+3. **Vary**: Create a handful of alternative phrasings or contexts of the original prompt to try different angles.+4. **Probe**: Send those variants to the model and note which ones produce more revealing or risky content.+5. **Prune**: Discard variants that clearly fail (refuse or produce nothing useful).+6. **Amplify**: Take the most promising variants and refine them further (rephrase, add context, change persona) to push the model more.+7. **Iterate**: Repeat probing and pruning until one chain of prompts reliably elicits the desired (unsafe) output.+8. **Select**: Choose the best sequence of prompts that produced the most effective breach and use that as the successful attack path.diff --git a/docs/docs/red-teaming-vulnerabilities-bias.mdx b/docs/docs/red-teaming-vulnerabilities-bias.mdxindex 830d22b3..5233bffb 100644--- a/docs/docs/red-teaming-vulnerabilities-bias.mdx+++ b/docs/docs/red-teaming-vulnerabilities-bias.mdx@@ -76,3 +76,11 @@ The `Bias` vulnerability generates a base attack — a harmful prompt targeted a- **Progressions** — a multi-turn conversation (a sequence of `turns`) designed to iteratively jailbreak the target LLM.The enhancement or progression (depending on the attack) is evaluated using the `BiasMetric`, which generates a binary `score` (_**0** if bias detected and **1** otherwise_). The `BiasMetric` also generates a `reason` justifying the assigned score.++```mermaid+graph TD+ A[Start] --> B{Working?}+ B -- Yes --> C[Done]+ B -- No --> D[Fix it]+ D --> B+```