DeepTeam is a framework to red team LLMs and AI agents.
updated vulnerability docs
A-Vamshia2651969d1ec
diff --git a/docs/docs/red-teaming-agentic-vulnerabilities-goal-theft.mdx b/docs/docs/red-teaming-agentic-vulnerabilities-goal-theft.mdxindex 1c55c07c..1e7325e6 100644--- a/docs/docs/red-teaming-agentic-vulnerabilities-goal-theft.mdx+++ b/docs/docs/red-teaming-agentic-vulnerabilities-goal-theft.mdx@@ -11,16 +11,41 @@ The goal theft vulnerability evaluates whether an AI agent can **protect its int```pythonfrom deepteam.vulnerabilities.agentic import GoalTheft-goal_theft = GoalTheft(types=["escalating_probing"])+goal_theft = GoalTheft(purpose="General assistant")```-You must at least specify **ONE** of the **THREE** `types` of `GoalTheft` to test through a list of strings:+There is **ONE** mandatory and **FIVE** optional parameters when creating a `GoalTheft` vulnerability:-- [`"escalating_probing"`](#escalating-probing): Tests whether the agent resists revealing internal objectives under repeated probing attempts.-- [`"cooperative_dialogue"`](#cooperative-dialogue): Tests whether the agent maintains confidentiality during seemingly helpful or collaborative conversations.-- [`"social_engineering"`](#social-engineering): Tests whether the agent resists social engineering tactics designed to extract mission details.+- `purpose`: The purpose of your LLM application.+- [Optional] `simulator_model`: a string specifying which of OpenAI's GPT models to use, **OR** [any custom LLM model](https://deepeval.com/guides/guides-using-custom-llms) of type `DeepEvalBaseLLM`. Defaulted to 'gpt-3.5-turbo-0125'.+- [Optional] `evaluation_model`: a string specifying which of OpenAI's GPT models to use, **OR** [any custom LLM model](https://deepeval.com/guides/guides-using-custom-llms) of type `DeepEvalBaseLLM`. Defaulted to 'gpt-4o'.+- [Optional] `async_mode`: a boolean which when set to `True`, enables concurrent execution. Defaulted to `True`.+- [Optional] `verbose_mode`: a boolean which when set to `True`, prints the intermediate steps used to assess said vulnerability to the console. Defaulted to `False`.+- [Optional] `types`: a list of `types` of `GoalTheft` to test through. Defaulted to all `types` available. Here are the list of `types` available for `GoalTheft`:+ - [`"escalating_probing"`](#escalating-probing): Tests whether the agent resists revealing internal objectives under repeated probing attempts.+ - [`"cooperative_dialogue"`](#cooperative-dialogue): Tests whether the agent maintains confidentiality during seemingly helpful or collaborative conversations.+ - [`"social_engineering"`](#social-engineering): Tests whether the agent resists social engineering tactics designed to extract mission details.-To use the `GoalTheft` vulnerability, supply it to the `red_team()` method:+### As a standalone++You can assess your model for a single vulnerability through the `assess` method:++```python+...+result = goal_theft.assess(model_callback=your_model_callback)++for vulnerability_type in result.keys():+ for assessment in result[vulnerability_type]:+ print(f"{vulnerability_type}: {assessment}")+```++:::info+This is great for debugging or if you wish to build your own red teaming pipeline, but you will **NOT** get the benefits (assessment reports, Confident AI platform) and all the optimizations (speed, caching, computation) the `red_team()` function offers.+:::++### In `red_team()`++You can supply the `GoalTheft` vulnerability in the `red_team` method as follows:```pythonfrom deepteam import red_teamdiff --git a/docs/docs/red-teaming-agentic-vulnerabilities-recursive-hijacking.mdx b/docs/docs/red-teaming-agentic-vulnerabilities-recursive-hijacking.mdxindex c6a2a656..0428d9e1 100644--- a/docs/docs/red-teaming-agentic-vulnerabilities-recursive-hijacking.mdx+++ b/docs/docs/red-teaming-agentic-vulnerabilities-recursive-hijacking.mdx@@ -11,16 +11,41 @@ The recursive hijacking vulnerability evaluates whether an AI agent can **resist```pythonfrom deepteam.vulnerabilities.agentic import RecursiveHijacking-recursive_hijacking = RecursiveHijacking(types=["self_modifying_goals"])+recursive_hijacking = RecursiveHijacking(purpose="General assistant")```-You must at least specify **ONE** of the **THREE** `types` of `RecursiveHijacking` to test through a list of strings:+There is **ONE** mandatory and **FIVE** optional parameters when creating a `RecursiveHijacking` vulnerability:-- [`"self_modifying_goals"`](#self-modifying-goals): Tests whether the agent resists creating goals that modify its own objective structure.-- [`"recursive_objective_chaining"`](#recursive-objective-chaining): Tests whether the agent prevents recursive chains of objectives that could lead to goal drift.-- [`"goal_propagation_attacks"`](#goal-propagation-attacks): Tests whether the agent resists malicious goals that spread or replicate through its objective hierarchy.+- `purpose`: The purpose of your LLM application.+- [Optional] `simulator_model`: a string specifying which of OpenAI's GPT models to use, **OR** [any custom LLM model](https://deepeval.com/guides/guides-using-custom-llms) of type `DeepEvalBaseLLM`. Defaulted to 'gpt-3.5-turbo-0125'.+- [Optional] `evaluation_model`: a string specifying which of OpenAI's GPT models to use, **OR** [any custom LLM model](https://deepeval.com/guides/guides-using-custom-llms) of type `DeepEvalBaseLLM`. Defaulted to 'gpt-4o'.+- [Optional] `async_mode`: a boolean which when set to `True`, enables concurrent execution. Defaulted to `True`.+- [Optional] `verbose_mode`: a boolean which when set to `True`, prints the intermediate steps used to assess said vulnerability to the console. Defaulted to `False`.+- [Optional] `types`: a list of `types` of `RecursiveHijacking` to test through. Defaulted to all `types` available. Here are the list of `types` available for `RecursiveHijacking`:+ - [`"self_modifying_goals"`](#self-modifying-goals): Tests whether the agent resists creating goals that modify its own objective structure.+ - [`"recursive_objective_chaining"`](#recursive-objective-chaining): Tests whether the agent prevents recursive chains of objectives that could lead to goal drift.+ - [`"goal_propagation_attacks"`](#goal-propagation-attacks): Tests whether the agent resists malicious goals that spread or replicate through its objective hierarchy.-To use the `RecursiveHijacking` vulnerability, supply it to the `red_team()` method:+### As a standalone++You can assess your model for a single vulnerability through the `assess` method:++```python+...+result = recursive_hijacking.assess(model_callback=your_model_callback)++for vulnerability_type in result.keys():+ for assessment in result[vulnerability_type]:+ print(f"{vulnerability_type}: {assessment}")+```++:::info+This is great for debugging or if you wish to build your own red teaming pipeline, but you will **NOT** get the benefits (assessment reports, Confident AI platform) and all the optimizations (speed, caching, computation) the `red_team()` function offers.+:::++### In `red_team()`++You can supply the `RecursiveHijacking` vulnerability in the `red_team` method as follows:```pythonfrom deepteam import red_teamdiff --git a/docs/docs/red-teaming-vulnerabilities-bfla.mdx b/docs/docs/red-teaming-vulnerabilities-bfla.mdxindex 086c3905..21b977fa 100644--- a/docs/docs/red-teaming-vulnerabilities-bfla.mdx+++ b/docs/docs/red-teaming-vulnerabilities-bfla.mdx@@ -11,16 +11,41 @@ The BFLA (Broken Function Level Authorization) vulnerability evaluates whether a```pythonfrom deepteam.vulnerabilities import BFLA-bfla = BFLA(types=["privilege_escalation"])+bfla = BFLA(purpose="General assistant")```-You must at least specify **ONE** of the **THREE** `types` of `BFLA` to test through a list of strings:+There is **ONE** mandatory and **FIVE** optional parameters when creating a `BFLA` vulnerability:-- [`"privilege_escalation"`](#privilege-escalation): Tests whether the agent resists unauthorized access to admin functions and elevated privileges.-- [`"function_bypass"`](#function-bypass): Tests whether the agent properly validates function-level authorization controls.-- [`"authorization_bypass"`](#authorization-bypass): Tests whether the agent maintains proper authorization validation across different interaction contexts.+- `purpose`: The purpose of your LLM application.+- [Optional] `simulator_model`: a string specifying which of OpenAI's GPT models to use, **OR** [any custom LLM model](https://deepeval.com/guides/guides-using-custom-llms) of type `DeepEvalBaseLLM`. Defaulted to 'gpt-3.5-turbo-0125'.+- [Optional] `evaluation_model`: a string specifying which of OpenAI's GPT models to use, **OR** [any custom LLM model](https://deepeval.com/guides/guides-using-custom-llms) of type `DeepEvalBaseLLM`. Defaulted to 'gpt-4o'.+- [Optional] `async_mode`: a boolean which when set to `True`, enables concurrent execution. Defaulted to `True`.+- [Optional] `verbose_mode`: a boolean which when set to `True`, prints the intermediate steps used to assess said vulnerability to the console. Defaulted to `False`.+- [Optional] `types`: a list of `types` of `BFLA` to test through. Defaulted to all `types` available. Here are the list of `types` available for `BFLA`:+ - [`"privilege_escalation"`](#privilege-escalation): Tests whether the agent resists unauthorized access to admin functions and elevated privileges.+ - [`"function_bypass"`](#function-bypass): Tests whether the agent properly validates function-level authorization controls.+ - [`"authorization_bypass"`](#authorization-bypass): Tests whether the agent maintains proper authorization validation across different interaction contexts.-To use the `BFLA` vulnerability, supply it to the `red_team()` method:+### As a standalone++You can assess your model for a single vulnerability through the `assess` method:++```python+...+result = bfla.assess(model_callback=your_model_callback)++for vulnerability_type in result.keys():+ for assessment in result[vulnerability_type]:+ print(f"{vulnerability_type}: {assessment}")+```++:::info+This is great for debugging or if you wish to build your own red teaming pipeline, but you will **NOT** get the benefits (assessment reports, Confident AI platform) and all the optimizations (speed, caching, computation) the `red_team()` function offers.+:::++### In `red_team()`++You can supply the `BFLA` vulnerability in the `red_team` method as follows:```pythonfrom deepteam import red_teamdiff --git a/docs/docs/red-teaming-vulnerabilities-bias.mdx b/docs/docs/red-teaming-vulnerabilities-bias.mdxindex 768c1832..b537058e 100644--- a/docs/docs/red-teaming-vulnerabilities-bias.mdx+++ b/docs/docs/red-teaming-vulnerabilities-bias.mdx@@ -11,17 +11,42 @@ The bias vulnerability is designed to test whether an LLM can **identify, mitiga```pythonfrom deepteam.vulnerabilities import Bias-bias = Bias(types=["race"])+bias = Bias(purpose="General assistant")```-You must at least specify **ONE** of the **FOUR** `types` of `Bias` to test through a list of strings:+There is **ONE** mandatory and **FIVE** optional parameters when creating a `Bias` vulnerability:-- [`"race"`](#race): Tests for racial biases, including the perpetuation of stereotypes or unfair treatment based on race.-- [`"gender"`](#gender): Tests for biases related to gender, such as reinforcing stereotypes or exhibiting unfair treatment based on gender identity.-- [`"religion"`](#religion): Tests for biases in handling religious topics, such as promoting or discriminating against particular beliefs.-- [`"politics"`](#politics): Tests for political biases, including favoritism or reinforcement of political stereotypes.+- `purpose`: The purpose of your LLM application.+- [Optional] `simulator_model`: a string specifying which of OpenAI's GPT models to use, **OR** [any custom LLM model](https://deepeval.com/guides/guides-using-custom-llms) of type `DeepEvalBaseLLM`. Defaulted to 'gpt-3.5-turbo-0125'.+- [Optional] `evaluation_model`: a string specifying which of OpenAI's GPT models to use, **OR** [any custom LLM model](https://deepeval.com/guides/guides-using-custom-llms) of type `DeepEvalBaseLLM`. Defaulted to 'gpt-4o'.+- [Optional] `async_mode`: a boolean which when set to `True`, enables concurrent execution. Defaulted to `True`.+- [Optional] `verbose_mode`: a boolean which when set to `True`, prints the intermediate steps used to assess said vulnerability to the console. Defaulted to `False`.+- [Optional] `types`: a list of `types` of `Bias` to test through. Defaulted to all `types` available. Here are the list of `types` available for `Bias`:+ - [`"race"`](#race): Tests for racial biases, including the perpetuation of stereotypes or unfair treatment based on race.+ - [`"gender"`](#gender): Tests for biases related to gender, such as reinforcing stereotypes or exhibiting unfair treatment based on gender identity.+ - [`"religion"`](#religion): Tests for biases in handling religious topics, such as promoting or discriminating against particular beliefs.+ - [`"politics"`](#politics): Tests for political biases, including favoritism or reinforcement of political stereotypes.-To use the `Bias` vulnerability, supply it to the `red_team()` method:+### As a standalone++You can assess your model for a single vulnerability through the `assess` method:++```python+...+result = bias.assess(model_callback=your_model_callback)++for vulnerability_type in result.keys():+ for assessment in result[vulnerability_type]:+ print(f"{vulnerability_type}: {assessment}")+```++:::info+This is great for debugging or if you wish to build your own red teaming pipeline, but you will **NOT** get the benefits (assessment reports, Confident AI platform) and all the optimizations (speed, caching, computation) the `red_team()` function offers.+:::++### In `red_team()`++You can supply the `Bias` vulnerability in the `red_team` method as follows:```pythonfrom deepteam import red_teamdiff --git a/docs/docs/red-teaming-vulnerabilities-bola.mdx b/docs/docs/red-teaming-vulnerabilities-bola.mdxindex 0b6dbb6b..51d7389c 100644--- a/docs/docs/red-teaming-vulnerabilities-bola.mdx+++ b/docs/docs/red-teaming-vulnerabilities-bola.mdx@@ -11,16 +11,41 @@ The BOLA (Broken Object Level Authorization) vulnerability evaluates whether an```pythonfrom deepteam.vulnerabilities import BOLA-bola = BOLA(types=["object_access_bypass"])+bola = BOLA(purpose="General assistant")```-You must at least specify **ONE** of the **THREE** `types` of `BOLA` to test through a list of strings:+There is **ONE** mandatory and **FIVE** optional parameters when creating a `BOLA` vulnerability:-- [`"object_access_bypass"`](#object-access-bypass): Tests whether the agent prevents unauthorized access to objects and records.-- [`"cross_customer_access"`](#cross-customer-access): Tests whether the agent maintains proper isolation between different customers or users.-- [`"unauthorized_object_manipulation"`](#unauthorized-object-manipulation): Tests whether the agent prevents unauthorized modification of objects.+- `purpose`: The purpose of your LLM application.+- [Optional] `simulator_model`: a string specifying which of OpenAI's GPT models to use, **OR** [any custom LLM model](https://deepeval.com/guides/guides-using-custom-llms) of type `DeepEvalBaseLLM`. Defaulted to 'gpt-3.5-turbo-0125'.+- [Optional] `evaluation_model`: a string specifying which of OpenAI's GPT models to use, **OR** [any custom LLM model](https://deepeval.com/guides/guides-using-custom-llms) of type `DeepEvalBaseLLM`. Defaulted to 'gpt-4o'.+- [Optional] `async_mode`: a boolean which when set to `True`, enables concurrent execution. Defaulted to `True`.+- [Optional] `verbose_mode`: a boolean which when set to `True`, prints the intermediate steps used to assess said vulnerability to the console. Defaulted to `False`.+- [Optional] `types`: a list of `types` of `BOLA` to test through. Defaulted to all `types` available. Here are the list of `types` available for `BOLA`:+ - [`"object_access_bypass"`](#object-access-bypass): Tests whether the agent prevents unauthorized access to objects and records.+ - [`"cross_customer_access"`](#cross-customer-access): Tests whether the agent maintains proper isolation between different customers or users.+ - [`"unauthorized_object_manipulation"`](#unauthorized-object-manipulation): Tests whether the agent prevents unauthorized modification of objects.-To use the `BOLA` vulnerability, supply it to the `red_team()` method:+### As a standalone++You can assess your model for a single vulnerability through the `assess` method:++```python+...+result = bola.assess(model_callback=your_model_callback)++for vulnerability_type in result.keys():+ for assessment in result[vulnerability_type]:+ print(f"{vulnerability_type}: {assessment}")+```++:::info+This is great for debugging or if you wish to build your own red teaming pipeline, but you will **NOT** get the benefits (assessment reports, Confident AI platform) and all the optimizations (speed, caching, computation) the `red_team()` function offers.+:::++### In `red_team()`++You can supply the `BFLA` vulnerability in the `red_team` method as follows:```pythonfrom deepteam import red_teamdiff --git a/docs/docs/red-teaming-vulnerabilities-competition.mdx b/docs/docs/red-teaming-vulnerabilities-competition.mdxindex a8f391dd..4cf97c2b 100644--- a/docs/docs/red-teaming-vulnerabilities-competition.mdx+++ b/docs/docs/red-teaming-vulnerabilities-competition.mdx@@ -11,17 +11,42 @@ The competition vulnerability is designed to test whether an LLM can **resist ge```pythonfrom deepteam.vulnerabilities import Competition-competition = Competition(types=["competitor mention"])+competition = Competition(purpose="General assistant")```-You must at least specify **ONE** of the **FOUR** `types` of `Competition` to test through a list of strings:+There is **ONE** mandatory and **FIVE** optional parameters when creating a `Competition` vulnerability:-- [`"competitor mention"`](#competitor-mention): Tests for outputs that reveal or discuss information about competitors.-- [`"market manipulation"`](#market-manipulation): Tests for outputs that influence market perceptions or competitor standing unfairly.-- [`"discreditation"`](#discreditation): Tests for outputs that spread false or discrediting information about competitors.-- [`"confidential strategies"`](#confidential-strategies): Tests for outputs that infer or disclose confidential business strategies, such as product roadmaps or marketing plans, about competitors.+- `purpose`: The purpose of your LLM application.+- [Optional] `simulator_model`: a string specifying which of OpenAI's GPT models to use, **OR** [any custom LLM model](https://deepeval.com/guides/guides-using-custom-llms) of type `DeepEvalBaseLLM`. Defaulted to 'gpt-3.5-turbo-0125'.+- [Optional] `evaluation_model`: a string specifying which of OpenAI's GPT models to use, **OR** [any custom LLM model](https://deepeval.com/guides/guides-using-custom-llms) of type `DeepEvalBaseLLM`. Defaulted to 'gpt-4o'.+- [Optional] `async_mode`: a boolean which when set to `True`, enables concurrent execution. Defaulted to `True`.+- [Optional] `verbose_mode`: a boolean which when set to `True`, prints the intermediate steps used to assess said vulnerability to the console. Defaulted to `False`.+- [Optional] `types`: a list of `types` of `Competition` to test through. Defaulted to all `types` available. Here are the list of `types` available for `Competition`:+ - [`"competitor mention"`](#competitor-mention): Tests for outputs that reveal or discuss information about competitors.+ - [`"market manipulation"`](#market-manipulation): Tests for outputs that influence market perceptions or competitor standing unfairly.+ - [`"discreditation"`](#discreditation): Tests for outputs that spread false or discrediting information about competitors.+ - [`"confidential strategies"`](#confidential-strategies): Tests for outputs that infer or disclose confidential business strategies, such as product roadmaps or marketing plans, about competitors.-To use the `Competition` vulnerability, supply it to the `red_team()` method:+### As a standalone++You can assess your model for a single vulnerability through the `assess` method:++```python+...+result = competition.assess(model_callback=your_model_callback)++for vulnerability_type in result.keys():+ for assessment in result[vulnerability_type]:+ print(f"{vulnerability_type}: {assessment}")+```++:::info+This is great for debugging or if you wish to build your own red teaming pipeline, but you will **NOT** get the benefits (assessment reports, Confident AI platform) and all the optimizations (speed, caching, computation) the `red_team()` function offers.+:::++### In `red_team()`++You can supply the `Competition` vulnerability in the `red_team` method as follows:```pythonfrom deepteam import red_teamdiff --git a/docs/docs/red-teaming-vulnerabilities-custom.mdx b/docs/docs/red-teaming-vulnerabilities-custom.mdxindex 3086b30c..670aa7cb 100644--- a/docs/docs/red-teaming-vulnerabilities-custom.mdx+++ b/docs/docs/red-teaming-vulnerabilities-custom.mdx@@ -22,14 +22,38 @@ api_security = CustomVulnerability()```-There are **THREE** mandatory and **ONE** optional parameter when creating a `CustomVulnerability`:+There are **THREE** mandatory and **SIX** optional parameter when creating a `CustomVulnerability`:- `name`: A string that identifies your custom vulnerability. This should clearly reflect the specific security concern you're red teaming.- `criteria`: A string that defines what should be evaluated - this is the rule or requirement that the AI should follow or violate.- `types`: A list of strings that specifies the specific aspects of the vulnerability you wish to red team on. You can define as many types as possible that make sense for your use case.- [Optional] `custom_prompt`: A string that defines a custom template for generating attack scenarios. If not provided, a default template will be used.+- [Optional] `metric`: A `BaseRedTeamingMetric` that will be used to evaluate your model's responses for this vulnerability.+- [Optional] `simulator_model`: a string specifying which of OpenAI's GPT models to use, **OR** [any custom LLM model](https://deepeval.com/guides/guides-using-custom-llms) of type `DeepEvalBaseLLM`. Defaulted to 'gpt-3.5-turbo-0125'.+- [Optional] `evaluation_model`: a string specifying which of OpenAI's GPT models to use, **OR** [any custom LLM model](https://deepeval.com/guides/guides-using-custom-llms) of type `DeepEvalBaseLLM`. Defaulted to 'gpt-4o'.+- [Optional] `async_mode`: a boolean which when set to `True`, enables concurrent execution. Defaulted to `True`.+- [Optional] `verbose_mode`: a boolean which when set to `True`, prints the intermediate steps used to assess said vulnerability to the console. Defaulted to `False`.-To use a `CustomVulnerability`, supply it to the `red_team()` method:+### As a standalone++You can assess your model for a single vulnerability through the `assess` method:++```python+...+result = api_security.assess(model_callback=your_model_callback)++for vulnerability_type in result.keys():+ for assessment in result[vulnerability_type]:+ print(f"{vulnerability_type}: {assessment}")+```++:::info+This is great for debugging or if you wish to build your own red teaming pipeline, but you will **NOT** get the benefits (assessment reports, Confident AI platform) and all the optimizations (speed, caching, computation) the `red_team()` function offers.+:::++### In `red_team()`++You can supply the `CustomVulnerability` vulnerability in the `red_team` method as follows:```pythonfrom deepteam import red_teamdiff --git a/docs/docs/red-teaming-vulnerabilities-debug-access.mdx b/docs/docs/red-teaming-vulnerabilities-debug-access.mdxindex f489f463..b2db1454 100644--- a/docs/docs/red-teaming-vulnerabilities-debug-access.mdx+++ b/docs/docs/red-teaming-vulnerabilities-debug-access.mdx@@ -11,16 +11,40 @@ The Debug Access vulnerability evaluates whether an AI agent can **prevent unaut```pythonfrom deepteam.vulnerabilities import DebugAccess-debug_access = DebugAccess(types=["debug_mode_bypass"])+debug_access = DebugAccess()```-You must at least specify **ONE** of the **THREE** `types` of `DebugAccess` to test through a list of strings:+There are **FIVE** optional parameters when creating a `DebugAccess` vulnerability:-- [`"debug_mode_bypass"`](#debug-mode-bypass): Tests whether the agent prevents unauthorized access to debug modes.-- [`"development_endpoint_access"`](#development-endpoint-access): Tests whether the agent blocks access to development endpoints.-- [`"administrative_interface_exposure"`](#administrative-interface-exposure): Tests whether the agent prevents exposure of administrative interfaces.+- [Optional] `simulator_model`: a string specifying which of OpenAI's GPT models to use, **OR** [any custom LLM model](https://deepeval.com/guides/guides-using-custom-llms) of type `DeepEvalBaseLLM`. Defaulted to 'gpt-3.5-turbo-0125'.+- [Optional] `evaluation_model`: a string specifying which of OpenAI's GPT models to use, **OR** [any custom LLM model](https://deepeval.com/guides/guides-using-custom-llms) of type `DeepEvalBaseLLM`. Defaulted to 'gpt-4o'.+- [Optional] `async_mode`: a boolean which when set to `True`, enables concurrent execution. Defaulted to `True`.+- [Optional] `verbose_mode`: a boolean which when set to `True`, prints the intermediate steps used to assess said vulnerability to the console. Defaulted to `False`.+- [Optional] `types`: a list of `types` of `DebugAccess` to test through. Defaulted to all `types` available. Here are the list of `types` available for `DebugAccess`:+ - [`"debug_mode_bypass"`](#debug-mode-bypass): Tests whether the agent prevents unauthorized access to debug modes.+ - [`"development_endpoint_access"`](#development-endpoint-access): Tests whether the agent blocks access to development endpoints.+ - [`"administrative_interface_exposure"`](#administrative-interface-exposure): Tests whether the agent prevents exposure of administrative interfaces.-To use the `DebugAccess` vulnerability, supply it to the `red_team()` method:+### As a standalone++You can assess your model for a single vulnerability through the `assess` method:++```python+...+result = debug_access.assess(model_callback=your_model_callback)++for vulnerability_type in result.keys():+ for assessment in result[vulnerability_type]:+ print(f"{vulnerability_type}: {assessment}")+```++:::info+This is great for debugging or if you wish to build your own red teaming pipeline, but you will **NOT** get the benefits (assessment reports, Confident AI platform) and all the optimizations (speed, caching, computation) the `red_team()` function offers.+:::++### In `red_team()`++You can supply the `DebugAccess` vulnerability in the `red_team` method as follows:```pythonfrom deepteam import red_teamdiff --git a/docs/docs/red-teaming-vulnerabilities-excessive-agency.mdx b/docs/docs/red-teaming-vulnerabilities-excessive-agency.mdxindex 89b342c2..cc78530c 100644--- a/docs/docs/red-teaming-vulnerabilities-excessive-agency.mdx+++ b/docs/docs/red-teaming-vulnerabilities-excessive-agency.mdx@@ -11,16 +11,41 @@ The excessive agency vulnerability is designed to test whether an LLM can **resi```pythonfrom deepteam.vulnerabilities import ExcessiveAgency-excessive_agency = ExcessiveAgency(types=["functionality"])+excessive_agency = ExcessiveAgency(purpose="General assistant")```-You must at least specify **ONE** of the **THREE** `types` of `ExcessiveAgency`` to test through a list of strings:+There is **ONE** mandatory and **FIVE** optional parameters when creating a `ExcessiveAgency` vulnerability:-- [`"functionality"`](#functionality): Tests whether the output enables or complies with requests to use unnecessary features or capabilities beyond the system’s intended scope.-- [`"permissions"`](#permissions): Tests whether the output enables or complies with requests to grant permissions exceeding what is necessary for the system’s tasks.-- [`"automony"`](#automony): Tests whether the output enables or complies with requests to allow the system to act autonomously without safeguards, leading to high-impact actions being performed without proper validation or oversight.+- `purpose`: The purpose of your LLM application.+- [Optional] `simulator_model`: a string specifying which of OpenAI's GPT models to use, **OR** [any custom LLM model](https://deepeval.com/guides/guides-using-custom-llms) of type `DeepEvalBaseLLM`. Defaulted to 'gpt-3.5-turbo-0125'.+- [Optional] `evaluation_model`: a string specifying which of OpenAI's GPT models to use, **OR** [any custom LLM model](https://deepeval.com/guides/guides-using-custom-llms) of type `DeepEvalBaseLLM`. Defaulted to 'gpt-4o'.+- [Optional] `async_mode`: a boolean which when set to `True`, enables concurrent execution. Defaulted to `True`.+- [Optional] `verbose_mode`: a boolean which when set to `True`, prints the intermediate steps used to assess said vulnerability to the console. Defaulted to `False`.+- [Optional] `types`: a list of `types` of `ExcessiveAgency` to test through. Defaulted to all `types` available. Here are the list of `types` available for `ExcessiveAgency`:+ - [`"functionality"`](#functionality): Tests whether the output enables or complies with requests to use unnecessary features or capabilities beyond the system’s intended scope.+ - [`"permissions"`](#permissions): Tests whether the output enables or complies with requests to grant permissions exceeding what is necessary for the system’s tasks.+ - [`"automony"`](#automony): Tests whether the output enables or complies with requests to allow the system to act autonomously without safeguards, leading to high-impact actions being performed without proper validation or oversight.-To use the `ExcessiveAgency` vulnerability, supply it to the `red_team()` method:+### As a standalone++You can assess your model for a single vulnerability through the `assess` method:++```python+...+result = excessive_agency.assess(model_callback=your_model_callback)++for vulnerability_type in result.keys():+ for assessment in result[vulnerability_type]:+ print(f"{vulnerability_type}: {assessment}")+```++:::info+This is great for debugging or if you wish to build your own red teaming pipeline, but you will **NOT** get the benefits (assessment reports, Confident AI platform) and all the optimizations (speed, caching, computation) the `red_team()` function offers.+:::++### In `red_team()`++You can supply the `ExcessiveAgency` vulnerability in the `red_team` method as follows:```pythonfrom deepteam import red_teamdiff --git a/docs/docs/red-teaming-vulnerabilities-graphic-content.mdx b/docs/docs/red-teaming-vulnerabilities-graphic-content.mdxindex 7c6cfcd7..9b8ef649 100644--- a/docs/docs/red-teaming-vulnerabilities-graphic-content.mdx+++ b/docs/docs/red-teaming-vulnerabilities-graphic-content.mdx@@ -11,16 +11,41 @@ The graphic content vulnerability is designed to test whether an LLM can **resis```pythonfrom deepteam.vulnerabilities import GraphicContent-graphic_content = GraphicContent(types=["sexual content"])+graphic_content = GraphicContent(graphic_category="Your category")```-You must at least specify **ONE** of the **THREE** `types` of `GraphicContent` to test through a list of strings:+There is **ONE** mandatory and **FIVE** optional parameters when creating a `GraphicContent` vulnerability:-- [`"sexual content"`](#sexual-content): Tests for outputs that include explicit sexual content or inappropriate references.-- [`"graphic content"`](#graphic-content): Tests for outputs that contain violent, gory, or disturbing material.-- [`"pornographic content"`](#pornographic-content): Tests for outputs that include or promote pornographic material.+- `graphic_category`: The category of the attacks to be generated.+- [Optional] `simulator_model`: a string specifying which of OpenAI's GPT models to use, **OR** [any custom LLM model](https://deepeval.com/guides/guides-using-custom-llms) of type `DeepEvalBaseLLM`. Defaulted to 'gpt-3.5-turbo-0125'.+- [Optional] `evaluation_model`: a string specifying which of OpenAI's GPT models to use, **OR** [any custom LLM model](https://deepeval.com/guides/guides-using-custom-llms) of type `DeepEvalBaseLLM`. Defaulted to 'gpt-4o'.+- [Optional] `async_mode`: a boolean which when set to `True`, enables concurrent execution. Defaulted to `True`.+- [Optional] `verbose_mode`: a boolean which when set to `True`, prints the intermediate steps used to assess said vulnerability to the console. Defaulted to `False`.+- [Optional] `types`: a list of `types` of `GraphicContent` to test through. Defaulted to all `types` available. Here are the list of `types` available for `GraphicContent`:+ - [`"sexual content"`](#sexual-content): Tests for outputs that include explicit sexual content or inappropriate references.+ - [`"graphic content"`](#graphic-content): Tests for outputs that contain violent, gory, or disturbing material.+ - [`"pornographic content"`](#pornographic-content): Tests for outputs that include or promote pornographic material.-To use the `GraphicContent` vulnerability, supply it to the `red_team()` method:+### As a standalone++You can assess your model for a single vulnerability through the `assess` method:++```python+...+result = graphic_content.assess(model_callback=your_model_callback)++for vulnerability_type in result.keys():+ for assessment in result[vulnerability_type]:+ print(f"{vulnerability_type}: {assessment}")+```++:::info+This is great for debugging or if you wish to build your own red teaming pipeline, but you will **NOT** get the benefits (assessment reports, Confident AI platform) and all the optimizations (speed, caching, computation) the `red_team()` function offers.+:::++### In `red_team()`++You can supply the `GraphicContent` vulnerability in the `red_team` method as follows:```pythonfrom deepteam import red_teamdiff --git a/docs/docs/red-teaming-vulnerabilities-illegal-activity.mdx b/docs/docs/red-teaming-vulnerabilities-illegal-activity.mdxindex 224a2784..0679bc1c 100644--- a/docs/docs/red-teaming-vulnerabilities-illegal-activity.mdx+++ b/docs/docs/red-teaming-vulnerabilities-illegal-activity.mdx@@ -11,20 +11,45 @@ The illegal activity vulnerability is designed to test whether an LLM can **resi```pythonfrom deepteam.vulnerabilities import IllegalActivity-illegal_activity = IllegalActivity(types=["violent crimes"])+illegal_activity = IllegalActivity(illegal_category="Your category")```-You must at least specify **ONE** of the **SEVEN** `types` of `IllegalActivity` to test through a list of strings:+There is **ONE** mandatory and **FIVE** optional parameters when creating a `IllegalActivity` vulnerability:-- [`"weapons"`](#weapons): Tests for outputs providing instructions, recipes, or methods for creating weapons.-- [`"illegal drugs"`](#illegal-drugs): Tests for outputs offering methods or plans for buying, selling, or laundering money from illegal drug activities.-- [`"violent crime"`](#violent-crime): Tests for outputs providing methods or plans for committing violent crimes.-- [`"nonviolent crime"`](#nonviolent-crime): Tests for outputs providing methods or plans for committing non-violent crimes.-- [`"sex crime"`](#sex-crime): Tests for outputs facilitating sexual exploitation or blackmail.-- [`"cybercrime"`](#cybercrime): Tests for outputs providing methods or plans for committing cybercrime and hacking systems.-- [`"child exploitation"`](#child-exploitation):Tests for outputs providing methods or plans for exploiting children.+- `illegal_category`: The category of the attacks to be generated.+- [Optional] `simulator_model`: a string specifying which of OpenAI's GPT models to use, **OR** [any custom LLM model](https://deepeval.com/guides/guides-using-custom-llms) of type `DeepEvalBaseLLM`. Defaulted to 'gpt-3.5-turbo-0125'.+- [Optional] `evaluation_model`: a string specifying which of OpenAI's GPT models to use, **OR** [any custom LLM model](https://deepeval.com/guides/guides-using-custom-llms) of type `DeepEvalBaseLLM`. Defaulted to 'gpt-4o'.+- [Optional] `async_mode`: a boolean which when set to `True`, enables concurrent execution. Defaulted to `True`.+- [Optional] `verbose_mode`: a boolean which when set to `True`, prints the intermediate steps used to assess said vulnerability to the console. Defaulted to `False`.+- [Optional] `types`: a list of `types` of `IllegalActivity` to test through. Defaulted to all `types` available. Here are the list of `types` available for `IllegalActivity`:+ - [`"weapons"`](#weapons): Tests for outputs providing instructions, recipes, or methods for creating weapons.+ - [`"illegal drugs"`](#illegal-drugs): Tests for outputs offering methods or plans for buying, selling, or laundering money from illegal drug activities.+ - [`"violent crime"`](#violent-crime): Tests for outputs providing methods or plans for committing violent crimes.+ - [`"nonviolent crime"`](#nonviolent-crime): Tests for outputs providing methods or plans for committing non-violent crimes.+ - [`"sex crime"`](#sex-crime): Tests for outputs facilitating sexual exploitation or blackmail.+ - [`"cybercrime"`](#cybercrime): Tests for outputs providing methods or plans for committing cybercrime and hacking systems.+ - [`"child exploitation"`](#child-exploitation):Tests for outputs providing methods or plans for exploiting children.-To use the `IllegalActivity` vulnerability, supply it to the `red_team()` method:+### As a standalone++You can assess your model for a single vulnerability through the `assess` method:++```python+...+result = illegal_activity.assess(model_callback=your_model_callback)++for vulnerability_type in result.keys():+ for assessment in result[vulnerability_type]:+ print(f"{vulnerability_type}: {assessment}")+```++:::info+This is great for debugging or if you wish to build your own red teaming pipeline, but you will **NOT** get the benefits (assessment reports, Confident AI platform) and all the optimizations (speed, caching, computation) the `red_team()` function offers.+:::++### In `red_team()`++You can supply the `IllegalActivity` vulnerability in the `red_team` method as follows:```pythonfrom deepteam import red_teamdiff --git a/docs/docs/red-teaming-vulnerabilities-intellectual-property.mdx b/docs/docs/red-teaming-vulnerabilities-intellectual-property.mdxindex f22290a8..3897f919 100644--- a/docs/docs/red-teaming-vulnerabilities-intellectual-property.mdx+++ b/docs/docs/red-teaming-vulnerabilities-intellectual-property.mdx@@ -11,17 +11,42 @@ The intellectual property vulnerability is designed to test whether an LLM can *```pythonfrom deepteam.vulnerabilities import IntellectualProperty-intellectual_property = IntellectualProperty(types=["copyright violations"])+intellectual_property = IntellectualProperty(purpose="General assistant")```-You must at least specify **ONE** of the **FOUR** `types` of `IntellectualProperty` to test through a list of strings:+There is **ONE** mandatory and **FIVE** optional parameters when creating a `IntellectualProperty` vulnerability:-- [`"copyright violations"`](#copyright-violations): Tests for outputs that generate content infringing on copyrighted material or intellectual property rights.-- [`"trademark infringement"`](#trademark-infringement): Tests for outputs that misuse or replicate trademarks without proper authorization.-- [`"patent disclosure"`](#patent-disclosure): Tests for outputs that reveal details about patented inventions or processes without rights or authorization.-- [`"imitation"`](#imitation): Tests for outputs that closely imitate proprietary works, creating potential ethical or legal risks.+- `purpose`: The purpose of your LLM application.+- [Optional] `simulator_model`: a string specifying which of OpenAI's GPT models to use, **OR** [any custom LLM model](https://deepeval.com/guides/guides-using-custom-llms) of type `DeepEvalBaseLLM`. Defaulted to 'gpt-3.5-turbo-0125'.+- [Optional] `evaluation_model`: a string specifying which of OpenAI's GPT models to use, **OR** [any custom LLM model](https://deepeval.com/guides/guides-using-custom-llms) of type `DeepEvalBaseLLM`. Defaulted to 'gpt-4o'.+- [Optional] `async_mode`: a boolean which when set to `True`, enables concurrent execution. Defaulted to `True`.+- [Optional] `verbose_mode`: a boolean which when set to `True`, prints the intermediate steps used to assess said vulnerability to the console. Defaulted to `False`.+- [Optional] `types`: a list of `types` of `IntellectualProperty` to test through. Defaulted to all `types` available. Here are the list of `types` available for `IntellectualProperty`:+ - [`"copyright violations"`](#copyright-violations): Tests for outputs that generate content infringing on copyrighted material or intellectual property rights.+ - [`"trademark infringement"`](#trademark-infringement): Tests for outputs that misuse or replicate trademarks without proper authorization.+ - [`"patent disclosure"`](#patent-disclosure): Tests for outputs that reveal details about patented inventions or processes without rights or authorization.+ - [`"imitation"`](#imitation): Tests for outputs that closely imitate proprietary works, creating potential ethical or legal risks.-To use the `IntellectualProperty` vulnerability, supply it to the `red_team()` method:+### As a standalone++You can assess your model for a single vulnerability through the `assess` method:++```python+...+result = intellectual_property.assess(model_callback=your_model_callback)++for vulnerability_type in result.keys():+ for assessment in result[vulnerability_type]:+ print(f"{vulnerability_type}: {assessment}")+```++:::info+This is great for debugging or if you wish to build your own red teaming pipeline, but you will **NOT** get the benefits (assessment reports, Confident AI platform) and all the optimizations (speed, caching, computation) the `red_team()` function offers.+:::++### In `red_team()`++You can supply the `IntellectualProperty` vulnerability in the `red_team` method as follows:```pythonfrom deepteam import red_teamdiff --git a/docs/docs/red-teaming-vulnerabilities-misinformation.mdx b/docs/docs/red-teaming-vulnerabilities-misinformation.mdxindex e4936f51..a191cebe 100644--- a/docs/docs/red-teaming-vulnerabilities-misinformation.mdx+++ b/docs/docs/red-teaming-vulnerabilities-misinformation.mdx@@ -11,16 +11,41 @@ The misinformation vulnerability is designed to test whether an LLM can **accura```pythonfrom deepteam.vulnerabilities import Misinformation-misinformation = Misinformation(types=["factual errors"])+misinformation = Misinformation(misinformation_category="Your category")```-You must at least specify **ONE** of the **THREE** `types` of `Misinformation` to test through a list of strings:+There is **ONE** mandatory and **FIVE** optional parameters when creating a `Misinformation` vulnerability:-- [`"factual errors"`](#factual-errors): Tests for outputs that contradict real, verified, and established facts, leading to objective inaccuracies.-- [`"unsupported claims"`](#unsupported-claims): Tests for outputs that make assertions or arguments without providing adequate evidence or references to back them up.-- [`"expertize misrepresentation"`](#expertize-misrepresentation): Tests for outputs that provide specialized advice, particularly in domains like medicine, finance, or law, that is incorrect, incomplete, or beyond your LLM's intended purpose.+- `misinformation_category`: The category of the attacks to be generated.+- [Optional] `simulator_model`: a string specifying which of OpenAI's GPT models to use, **OR** [any custom LLM model](https://deepeval.com/guides/guides-using-custom-llms) of type `DeepEvalBaseLLM`. Defaulted to 'gpt-3.5-turbo-0125'.+- [Optional] `evaluation_model`: a string specifying which of OpenAI's GPT models to use, **OR** [any custom LLM model](https://deepeval.com/guides/guides-using-custom-llms) of type `DeepEvalBaseLLM`. Defaulted to 'gpt-4o'.+- [Optional] `async_mode`: a boolean which when set to `True`, enables concurrent execution. Defaulted to `True`.+- [Optional] `verbose_mode`: a boolean which when set to `True`, prints the intermediate steps used to assess said vulnerability to the console. Defaulted to `False`.+- [Optional] `types`: a list of `types` of `Misinformation` to test through. Defaulted to all `types` available. Here are the list of `types` available for `Misinformation`:+ - [`"factual errors"`](#factual-errors): Tests for outputs that contradict real, verified, and established facts, leading to objective inaccuracies.+ - [`"unsupported claims"`](#unsupported-claims): Tests for outputs that make assertions or arguments without providing adequate evidence or references to back them up.+ - [`"expertize misrepresentation"`](#expertize-misrepresentation): Tests for outputs that provide specialized advice, particularly in domains like medicine, finance, or law, that is incorrect, incomplete, or beyond your LLM's intended purpose.-To use the `Misinformation` vulnerability, supply it to the `red_team()` method:+### As a standalone++You can assess your model for a single vulnerability through the `assess` method:++```python+...+result = misinformation.assess(model_callback=your_model_callback)++for vulnerability_type in result.keys():+ for assessment in result[vulnerability_type]:+ print(f"{vulnerability_type}: {assessment}")+```++:::info+This is great for debugging or if you wish to build your own red teaming pipeline, but you will **NOT** get the benefits (assessment reports, Confident AI platform) and all the optimizations (speed, caching, computation) the `red_team()` function offers.+:::++### In `red_team()`++You can supply the `Misinformation` vulnerability in the `red_team` method as follows:```pythonfrom deepteam import red_teamdiff --git a/docs/docs/red-teaming-vulnerabilities-personal-safety.mdx b/docs/docs/red-teaming-vulnerabilities-personal-safety.mdxindex c500b8a7..eb3391b6 100644--- a/docs/docs/red-teaming-vulnerabilities-personal-safety.mdx+++ b/docs/docs/red-teaming-vulnerabilities-personal-safety.mdx@@ -11,17 +11,42 @@ The personal safety vulnerability is designed to test whether an LLM can **resis```pythonfrom deepteam.vulnerabilities import PersonalSafety-personal_safety = PersonalSafety(types=["self-harm"])+personal_safety = PersonalSafety(safety_category="Your category")```-You must at least specify **ONE** of the **FOUR** `types` of `PersonalSafety` to test through a list of strings:+There is **ONE** mandatory and **FIVE** optional parameters when creating a `PersonalSafety` vulnerability:-- [`"bullying"`](#bullying): Tests for outputs that facilitate or promote harassment, intimidation, or targeting of individuals or groups.-- [`"self-harm"`](#self-harm): Tests for outputs that support, encourage, or provide methods for self-harm.-- [`"dangerous challenges"`](#dangerous-challenges): Tests for outputs that promote or suggest participation in harmful or life-threatening social challenges.-- [`"stalking"`](#stalking): Tests for outputs that support or suggest methods for tracking, monitoring, or stalking individuals.+- `safety_category`: The category of the attacks to be generated.+- [Optional] `simulator_model`: a string specifying which of OpenAI's GPT models to use, **OR** [any custom LLM model](https://deepeval.com/guides/guides-using-custom-llms) of type `DeepEvalBaseLLM`. Defaulted to 'gpt-3.5-turbo-0125'.+- [Optional] `evaluation_model`: a string specifying which of OpenAI's GPT models to use, **OR** [any custom LLM model](https://deepeval.com/guides/guides-using-custom-llms) of type `DeepEvalBaseLLM`. Defaulted to 'gpt-4o'.+- [Optional] `async_mode`: a boolean which when set to `True`, enables concurrent execution. Defaulted to `True`.+- [Optional] `verbose_mode`: a boolean which when set to `True`, prints the intermediate steps used to assess said vulnerability to the console. Defaulted to `False`.+- [Optional] `types`: a list of `types` of `PersonalSafety` to test through. Defaulted to all `types` available. Here are the list of `types` available for `PersonalSafety`:+ - [`"bullying"`](#bullying): Tests for outputs that facilitate or promote harassment, intimidation, or targeting of individuals or groups.+ - [`"self-harm"`](#self-harm): Tests for outputs that support, encourage, or provide methods for self-harm.+ - [`"dangerous challenges"`](#dangerous-challenges): Tests for outputs that promote or suggest participation in harmful or life-threatening social challenges.+ - [`"stalking"`](#stalking): Tests for outputs that support or suggest methods for tracking, monitoring, or stalking individuals.-To use the `PersonalSafety` vulnerability, supply it to the `red_team()` method:+### As a standalone++You can assess your model for a single vulnerability through the `assess` method:++```python+...+result = personal_safety.assess(model_callback=your_model_callback)++for vulnerability_type in result.keys():+ for assessment in result[vulnerability_type]:+ print(f"{vulnerability_type}: {assessment}")+```++:::info+This is great for debugging or if you wish to build your own red teaming pipeline, but you will **NOT** get the benefits (assessment reports, Confident AI platform) and all the optimizations (speed, caching, computation) the `red_team()` function offers.+:::++### In `red_team()`++You can supply the `PersonalSafety` vulnerability in the `red_team` method as follows:```pythonfrom deepteam import red_teamdiff --git a/docs/docs/red-teaming-vulnerabilities-pii-leakage.mdx b/docs/docs/red-teaming-vulnerabilities-pii-leakage.mdxindex c315f142..e40512fc 100644--- a/docs/docs/red-teaming-vulnerabilities-pii-leakage.mdx+++ b/docs/docs/red-teaming-vulnerabilities-pii-leakage.mdx@@ -17,17 +17,42 @@ PII leakage is either a model weaknesses (direct disclosure), or a system weakne```pythonfrom deepteam.vulnerabilities import PIILeakage-pii_leakage = PIILeakage(types=["direct disclosure"])+pii_leakage = PIILeakage(purpose="General assistant")```-You must at least specify **ONE** of the **FOUR** `types` of `PIILeakage` to test through a list of strings:+There is **ONE** mandatory and **FIVE** optional parameters when creating a `PIILeakage` vulnerability:-- [`"direct disclosure"`](#direct-disclosure): Tests for outputs that disclose PII directly in response to explicit user prompts, such as revealing names, addresses, phone numbers, or other personal details.-- [`"api and database access"`](#api-and-database-access): Tests for outputs that disclose PII by providing unauthorized access to databases or querying stored personal information, potentially revealing sensitive records.-- [`"session leak"`](#session-leak): Tests for outputs that disclose PII from other users' active or past sessions, such as inadvertently exposing personal details associated with session-based interactions.-- [`"social manipulation"`](#social-manipulation): Tests for outputs that enable or facilitate social engineering attacks, tricking individuals into revealing their own or others' PII.+- `purpose`: The purpose of your LLM application.+- [Optional] `simulator_model`: a string specifying which of OpenAI's GPT models to use, **OR** [any custom LLM model](https://deepeval.com/guides/guides-using-custom-llms) of type `DeepEvalBaseLLM`. Defaulted to 'gpt-3.5-turbo-0125'.+- [Optional] `evaluation_model`: a string specifying which of OpenAI's GPT models to use, **OR** [any custom LLM model](https://deepeval.com/guides/guides-using-custom-llms) of type `DeepEvalBaseLLM`. Defaulted to 'gpt-4o'.+- [Optional] `async_mode`: a boolean which when set to `True`, enables concurrent execution. Defaulted to `True`.+- [Optional] `verbose_mode`: a boolean which when set to `True`, prints the intermediate steps used to assess said vulnerability to the console. Defaulted to `False`.+- [Optional] `types`: a list of `types` of `PIILeakage` to test through. Defaulted to all `types` available. Here are the list of `types` available for `PIILeakage`:+ - [`"direct disclosure"`](#direct-disclosure): Tests for outputs that disclose PII directly in response to explicit user prompts, such as revealing names, addresses, phone numbers, or other personal details.+ - [`"api and database access"`](#api-and-database-access): Tests for outputs that disclose PII by providing unauthorized access to databases or querying stored personal information, potentially revealing sensitive records.+ - [`"session leak"`](#session-leak): Tests for outputs that disclose PII from other users' active or past sessions, such as inadvertently exposing personal details associated with session-based interactions.+ - [`"social manipulation"`](#social-manipulation): Tests for outputs that enable or facilitate social engineering attacks, tricking individuals into revealing their own or others' PII.-To use the `PIILeakage` vulnerability, supply it to the `red_team()` method:+### As a standalone++You can assess your model for a single vulnerability through the `assess` method:++```python+...+result = pii_leakage.assess(model_callback=your_model_callback)++for vulnerability_type in result.keys():+ for assessment in result[vulnerability_type]:+ print(f"{vulnerability_type}: {assessment}")+```++:::info+This is great for debugging or if you wish to build your own red teaming pipeline, but you will **NOT** get the benefits (assessment reports, Confident AI platform) and all the optimizations (speed, caching, computation) the `red_team()` function offers.+:::++### In `red_team()`++You can supply the `PIILeakage` vulnerability in the `red_team` method as follows:```pythonfrom deepteam import red_teamdiff --git a/docs/docs/red-teaming-vulnerabilities-prompt-leakage.mdx b/docs/docs/red-teaming-vulnerabilities-prompt-leakage.mdxindex 41c4bff9..5101309b 100644--- a/docs/docs/red-teaming-vulnerabilities-prompt-leakage.mdx+++ b/docs/docs/red-teaming-vulnerabilities-prompt-leakage.mdx@@ -13,17 +13,42 @@ This includes safeguarding secrets and credentials, internal instructions, guard```pythonfrom deepteam.vulnerabilities import PromptLeakage-prompt_leakage = PromptLeakage(types=["secrets and credentials"])+prompt_leakage = PromptLeakage(purpose="General assistant")```-You must at least specify **ONE** of the **FOUR** `types` of `PromptLeakage` to test through a list of strings:+There is **ONE** mandatory and **FIVE** optional parameters when creating a `PromptLeakage` vulnerability:-- [`"secrets and credentials"`](#secrets-and-credentials): Tests for outputs that reveal sensitive details embedded in the system prompt, such as API keys, database credentials, or system architecture.-- [`"instructions"`](#instructions): Tests for outputs that disclose internal instructions or rules described in the prompt, such as transaction limits, operational procedures, or user policies.-- [`"guard exposure"`](#guard-exposure): Tests for outputs that expose guard mechanisms, such as rejection rules or criteria for sensitive requests, potentially enabling users to bypass safeguards.-- [`"permissions and roles"`](#permissions-and-roles): Tests for outputs that reveal role-based permissions, access controls, or internal configurations mentioned in the system prompt.+- `purpose`: The purpose of your LLM application.+- [Optional] `simulator_model`: a string specifying which of OpenAI's GPT models to use, **OR** [any custom LLM model](https://deepeval.com/guides/guides-using-custom-llms) of type `DeepEvalBaseLLM`. Defaulted to 'gpt-3.5-turbo-0125'.+- [Optional] `evaluation_model`: a string specifying which of OpenAI's GPT models to use, **OR** [any custom LLM model](https://deepeval.com/guides/guides-using-custom-llms) of type `DeepEvalBaseLLM`. Defaulted to 'gpt-4o'.+- [Optional] `async_mode`: a boolean which when set to `True`, enables concurrent execution. Defaulted to `True`.+- [Optional] `verbose_mode`: a boolean which when set to `True`, prints the intermediate steps used to assess said vulnerability to the console. Defaulted to `False`.+- [Optional] `types`: a list of `types` of `PromptLeakage` to test through. Defaulted to all `types` available. Here are the list of `types` available for `PromptLeakage`:+ - [`"secrets and credentials"`](#secrets-and-credentials): Tests for outputs that reveal sensitive details embedded in the system prompt, such as API keys, database credentials, or system architecture.+ - [`"instructions"`](#instructions): Tests for outputs that disclose internal instructions or rules described in the prompt, such as transaction limits, operational procedures, or user policies.+ - [`"guard exposure"`](#guard-exposure): Tests for outputs that expose guard mechanisms, such as rejection rules or criteria for sensitive requests, potentially enabling users to bypass safeguards.+ - [`"permissions and roles"`](#permissions-and-roles): Tests for outputs that reveal role-based permissions, access controls, or internal configurations mentioned in the system prompt.-To use the `PromptLeakage` vulnerability, supply it to the `red_team()` method:+### As a standalone++You can assess your model for a single vulnerability through the `assess` method:++```python+...+result = prompt_leakage.assess(model_callback=your_model_callback)++for vulnerability_type in result.keys():+ for assessment in result[vulnerability_type]:+ print(f"{vulnerability_type}: {assessment}")+```++:::info+This is great for debugging or if you wish to build your own red teaming pipeline, but you will **NOT** get the benefits (assessment reports, Confident AI platform) and all the optimizations (speed, caching, computation) the `red_team()` function offers.+:::++### In `red_team()`++You can supply the `PromptLeakage` vulnerability in the `red_team` method as follows:```pythonfrom deepteam import red_teamdiff --git a/docs/docs/red-teaming-vulnerabilities-rbac.mdx b/docs/docs/red-teaming-vulnerabilities-rbac.mdxindex c80b3bf2..33d7041f 100644--- a/docs/docs/red-teaming-vulnerabilities-rbac.mdx+++ b/docs/docs/red-teaming-vulnerabilities-rbac.mdx@@ -11,16 +11,41 @@ The RBAC (Role-Based Access Control) vulnerability evaluates whether an AI agent```pythonfrom deepteam.vulnerabilities import RBAC-rbac = RBAC(types=["role_bypass"])+rbac = RBAC(purpose="General assistant")```-You must at least specify **ONE** of the **THREE** `types` of `RBAC` to test through a list of strings:+There is **ONE** mandatory and **FIVE** optional parameters when creating a `RBAC` vulnerability:-- [`"role_bypass"`](#role-bypass): Tests whether the agent properly enforces role restrictions.-- [`"privilege_escalation"`](#privilege-escalation): Tests whether the agent prevents unauthorized privilege escalation.-- [`"unauthorized_role_assumption"`](#unauthorized-role-assumption): Tests whether the agent resists attempts to assume unauthorized roles.+- `purpose`: The purpose of your LLM application.+- [Optional] `simulator_model`: a string specifying which of OpenAI's GPT models to use, **OR** [any custom LLM model](https://deepeval.com/guides/guides-using-custom-llms) of type `DeepEvalBaseLLM`. Defaulted to 'gpt-3.5-turbo-0125'.+- [Optional] `evaluation_model`: a string specifying which of OpenAI's GPT models to use, **OR** [any custom LLM model](https://deepeval.com/guides/guides-using-custom-llms) of type `DeepEvalBaseLLM`. Defaulted to 'gpt-4o'.+- [Optional] `async_mode`: a boolean which when set to `True`, enables concurrent execution. Defaulted to `True`.+- [Optional] `verbose_mode`: a boolean which when set to `True`, prints the intermediate steps used to assess said vulnerability to the console. Defaulted to `False`.+- [Optional] `types`: a list of `types` of `RBAC` to test through. Defaulted to all `types` available. Here are the list of `types` available for `RBAC`:+ - [`"role_bypass"`](#role-bypass): Tests whether the agent properly enforces role restrictions.+ - [`"privilege_escalation"`](#privilege-escalation): Tests whether the agent prevents unauthorized privilege escalation.+ - [`"unauthorized_role_assumption"`](#unauthorized-role-assumption): Tests whether the agent resists attempts to assume unauthorized roles.-To use the `RBAC` vulnerability, supply it to the `red_team()` method:+### As a standalone++You can assess your model for a single vulnerability through the `assess` method:++```python+...+result = rbac.assess(model_callback=your_model_callback)++for vulnerability_type in result.keys():+ for assessment in result[vulnerability_type]:+ print(f"{vulnerability_type}: {assessment}")+```++:::info+This is great for debugging or if you wish to build your own red teaming pipeline, but you will **NOT** get the benefits (assessment reports, Confident AI platform) and all the optimizations (speed, caching, computation) the `red_team()` function offers.+:::++### In `red_team()`++You can supply the `RBAC` vulnerability in the `red_team` method as follows:```pythonfrom deepteam import red_teamdiff --git a/docs/docs/red-teaming-vulnerabilities-robustness.mdx b/docs/docs/red-teaming-vulnerabilities-robustness.mdxindex a8a4b863..a3b88f18 100644--- a/docs/docs/red-teaming-vulnerabilities-robustness.mdx+++ b/docs/docs/red-teaming-vulnerabilities-robustness.mdx@@ -13,15 +13,40 @@ This includes ensuring the system does not excessively rely on unverified user i```pythonfrom deepteam.vulnerabilities import Robustness-robustness = Robustness(types=["hijacking"])+robustness = Robustness(purpose="General assistant")```-You must at least specify **ONE** of the **THREE** `types` of `Robustness` to test through a list of strings:+There is **ONE** mandatory and **FIVE** optional parameters when creating a `Robustness` vulnerability:-- [`"hijacking"`](#hijacking): Tests whether the output enables or complies with malicious or crafted inputs that redirect or alter the system’s intended behavior.-- [`"input overreliance"`](#input-overreliance): Tests whether the output is excessively influenced by user input, leading to misleading and undesirable responses or behaviors that reflect user-provided content.+- `purpose`: The purpose of your LLM application.+- [Optional] `simulator_model`: a string specifying which of OpenAI's GPT models to use, **OR** [any custom LLM model](https://deepeval.com/guides/guides-using-custom-llms) of type `DeepEvalBaseLLM`. Defaulted to 'gpt-3.5-turbo-0125'.+- [Optional] `evaluation_model`: a string specifying which of OpenAI's GPT models to use, **OR** [any custom LLM model](https://deepeval.com/guides/guides-using-custom-llms) of type `DeepEvalBaseLLM`. Defaulted to 'gpt-4o'.+- [Optional] `async_mode`: a boolean which when set to `True`, enables concurrent execution. Defaulted to `True`.+- [Optional] `verbose_mode`: a boolean which when set to `True`, prints the intermediate steps used to assess said vulnerability to the console. Defaulted to `False`.+- [Optional] `types`: a list of `types` of `Robustness` to test through. Defaulted to all `types` available. Here are the list of `types` available for `Robustness`:+ - [`"hijacking"`](#hijacking): Tests whether the output enables or complies with malicious or crafted inputs that redirect or alter the system’s intended behavior.+ - [`"input overreliance"`](#input-overreliance): Tests whether the output is excessively influenced by user input, leading to misleading and undesirable responses or behaviors that reflect user-provided content.-To use the `Robustness` vulnerability, supply it to the `red_team()` method:+### As a standalone++You can assess your model for a single vulnerability through the `assess` method:++```python+...+result = robustness.assess(model_callback=your_model_callback)++for vulnerability_type in result.keys():+ for assessment in result[vulnerability_type]:+ print(f"{vulnerability_type}: {assessment}")+```++:::info+This is great for debugging or if you wish to build your own red teaming pipeline, but you will **NOT** get the benefits (assessment reports, Confident AI platform) and all the optimizations (speed, caching, computation) the `red_team()` function offers.+:::++### In `red_team()`++You can supply the `Robustness` vulnerability in the `red_team` method as follows:```pythonfrom deepteam import red_teamdiff --git a/docs/docs/red-teaming-vulnerabilities-shell-injection.mdx b/docs/docs/red-teaming-vulnerabilities-shell-injection.mdxindex 04a99a6a..f8f85165 100644--- a/docs/docs/red-teaming-vulnerabilities-shell-injection.mdx+++ b/docs/docs/red-teaming-vulnerabilities-shell-injection.mdx@@ -11,16 +11,40 @@ The Shell Injection vulnerability evaluates whether an AI agent can **prevent ex```pythonfrom deepteam.vulnerabilities import ShellInjection-shell_injection = ShellInjection(types=["command_injection"])+shell_injection = ShellInjection()```-You must at least specify **ONE** of the **THREE** `types` of `ShellInjection` to test through a list of strings:+There are **FIVE** optional parameters when creating a `ShellInjection` vulnerability:-- [`"command_injection"`](#command-injection): Tests whether the agent prevents unauthorized command execution.-- [`"system_command_execution"`](#system-command-execution): Tests whether the agent blocks malicious system command execution.-- [`"shell_escape_sequences"`](#shell-escape-sequences): Tests whether the agent prevents shell escape sequence attacks.+- [Optional] `simulator_model`: a string specifying which of OpenAI's GPT models to use, **OR** [any custom LLM model](https://deepeval.com/guides/guides-using-custom-llms) of type `DeepEvalBaseLLM`. Defaulted to 'gpt-3.5-turbo-0125'.+- [Optional] `evaluation_model`: a string specifying which of OpenAI's GPT models to use, **OR** [any custom LLM model](https://deepeval.com/guides/guides-using-custom-llms) of type `DeepEvalBaseLLM`. Defaulted to 'gpt-4o'.+- [Optional] `async_mode`: a boolean which when set to `True`, enables concurrent execution. Defaulted to `True`.+- [Optional] `verbose_mode`: a boolean which when set to `True`, prints the intermediate steps used to assess said vulnerability to the console. Defaulted to `False`.+- [Optional] `types`: a list of `types` of `ShellInjection` to test through. Defaulted to all `types` available. Here are the list of `types` available for `ShellInjection`:+ - [`"command_injection"`](#command-injection): Tests whether the agent prevents unauthorized command execution.+ - [`"system_command_execution"`](#system-command-execution): Tests whether the agent blocks malicious system command execution.+ - [`"shell_escape_sequences"`](#shell-escape-sequences): Tests whether the agent prevents shell escape sequence attacks.-To use the `ShellInjection` vulnerability, supply it to the `red_team()` method:+### As a standalone++You can assess your model for a single vulnerability through the `assess` method:++```python+...+result = shell_injection.assess(model_callback=your_model_callback)++for vulnerability_type in result.keys():+ for assessment in result[vulnerability_type]:+ print(f"{vulnerability_type}: {assessment}")+```++:::info+This is great for debugging or if you wish to build your own red teaming pipeline, but you will **NOT** get the benefits (assessment reports, Confident AI platform) and all the optimizations (speed, caching, computation) the `red_team()` function offers.+:::++### In `red_team()`++You can supply the `ShellInjection` vulnerability in the `red_team` method as follows:```pythonfrom deepteam import red_teamdiff --git a/docs/docs/red-teaming-vulnerabilities-sql-injection.mdx b/docs/docs/red-teaming-vulnerabilities-sql-injection.mdxindex 9935ae0f..21847f26 100644--- a/docs/docs/red-teaming-vulnerabilities-sql-injection.mdx+++ b/docs/docs/red-teaming-vulnerabilities-sql-injection.mdx@@ -11,16 +11,40 @@ The SQL Injection vulnerability evaluates whether an AI agent can **prevent SQL```pythonfrom deepteam.vulnerabilities import SQLInjection-sql_injection = SQLInjection(types=["blind_sql_injection"])+sql_injection = SQLInjection()```-You must at least specify **ONE** of the **THREE** `types` of `SQLInjection` to test through a list of strings:+There are **FIVE** optional parameters when creating a `SQLInjection` vulnerability:-- [`"blind_sql_injection"`](#blind-sql-injection): Tests whether the agent prevents blind SQL injection attacks.-- [`"union_based_injection"`](#union-based-injection): Tests whether the agent blocks union-based SQL injection attempts.-- [`"error_based_injection"`](#error-based-injection): Tests whether the agent prevents error-based SQL injection attacks.+- [Optional] `simulator_model`: a string specifying which of OpenAI's GPT models to use, **OR** [any custom LLM model](https://deepeval.com/guides/guides-using-custom-llms) of type `DeepEvalBaseLLM`. Defaulted to 'gpt-3.5-turbo-0125'.+- [Optional] `evaluation_model`: a string specifying which of OpenAI's GPT models to use, **OR** [any custom LLM model](https://deepeval.com/guides/guides-using-custom-llms) of type `DeepEvalBaseLLM`. Defaulted to 'gpt-4o'.+- [Optional] `async_mode`: a boolean which when set to `True`, enables concurrent execution. Defaulted to `True`.+- [Optional] `verbose_mode`: a boolean which when set to `True`, prints the intermediate steps used to assess said vulnerability to the console. Defaulted to `False`.+- [Optional] `types`: a list of `types` of `SQLInjection` to test through. Defaulted to all `types` available. Here are the list of `types` available for `SQLInjection`:+ - [`"blind_sql_injection"`](#blind-sql-injection): Tests whether the agent prevents blind SQL injection attacks.+ - [`"union_based_injection"`](#union-based-injection): Tests whether the agent blocks union-based SQL injection attempts.+ - [`"error_based_injection"`](#error-based-injection): Tests whether the agent prevents error-based SQL injection attacks.-To use the `SQLInjection` vulnerability, supply it to the `red_team()` method:+### As a standalone++You can assess your model for a single vulnerability through the `assess` method:++```python+...+result = sql_injection.assess(model_callback=your_model_callback)++for vulnerability_type in result.keys():+ for assessment in result[vulnerability_type]:+ print(f"{vulnerability_type}: {assessment}")+```++:::info+This is great for debugging or if you wish to build your own red teaming pipeline, but you will **NOT** get the benefits (assessment reports, Confident AI platform) and all the optimizations (speed, caching, computation) the `red_team()` function offers.+:::++### In `red_team()`++You can supply the `SQLInjection` vulnerability in the `red_team` method as follows:```pythonfrom deepteam import red_teamdiff --git a/docs/docs/red-teaming-vulnerabilities-ssrf.mdx b/docs/docs/red-teaming-vulnerabilities-ssrf.mdxindex 3d6a3b44..ece951ff 100644--- a/docs/docs/red-teaming-vulnerabilities-ssrf.mdx+++ b/docs/docs/red-teaming-vulnerabilities-ssrf.mdx@@ -11,16 +11,41 @@ The SSRF (Server-Side Request Forgery) vulnerability evaluates whether an AI age```pythonfrom deepteam.vulnerabilities import SSRF-ssrf = SSRF(types=["internal_service_access"])+ssrf = SSRF(purpose="General assistant")```-You must at least specify **ONE** of the **THREE** `types` of `SSRF` to test through a list of strings:+There is **ONE** mandatory and **FIVE** optional parameters when creating a `SSRF` vulnerability:-- [`"internal_service_access"`](#internal-service-access): Tests whether the agent prevents unauthorized access to internal services.-- [`"cloud_metadata_access"`](#cloud-metadata-access): Tests whether the agent blocks access to cloud metadata endpoints.-- [`"port_scanning"`](#port-scanning): Tests whether the agent prevents port scanning and network reconnaissance.+- `purpose`: The purpose of your LLM application.+- [Optional] `simulator_model`: a string specifying which of OpenAI's GPT models to use, **OR** [any custom LLM model](https://deepeval.com/guides/guides-using-custom-llms) of type `DeepEvalBaseLLM`. Defaulted to 'gpt-3.5-turbo-0125'.+- [Optional] `evaluation_model`: a string specifying which of OpenAI's GPT models to use, **OR** [any custom LLM model](https://deepeval.com/guides/guides-using-custom-llms) of type `DeepEvalBaseLLM`. Defaulted to 'gpt-4o'.+- [Optional] `async_mode`: a boolean which when set to `True`, enables concurrent execution. Defaulted to `True`.+- [Optional] `verbose_mode`: a boolean which when set to `True`, prints the intermediate steps used to assess said vulnerability to the console. Defaulted to `False`.+- [Optional] `types`: a list of `types` of `SSRF` to test through. Defaulted to all `types` available. Here are the list of `types` available for `SSRF`:+ - [`"internal_service_access"`](#internal-service-access): Tests whether the agent prevents unauthorized access to internal services.+ - [`"cloud_metadata_access"`](#cloud-metadata-access): Tests whether the agent blocks access to cloud metadata endpoints.+ - [`"port_scanning"`](#port-scanning): Tests whether the agent prevents port scanning and network reconnaissance.-To use the `SSRF` vulnerability, supply it to the `red_team()` method:+### As a standalone++You can assess your model for a single vulnerability through the `assess` method:++```python+...+result = ssrf.assess(model_callback=your_model_callback)++for vulnerability_type in result.keys():+ for assessment in result[vulnerability_type]:+ print(f"{vulnerability_type}: {assessment}")+```++:::info+This is great for debugging or if you wish to build your own red teaming pipeline, but you will **NOT** get the benefits (assessment reports, Confident AI platform) and all the optimizations (speed, caching, computation) the `red_team()` function offers.+:::++### In `red_team()`++You can supply the `SSRF` vulnerability in the `red_team` method as follows:```pythonfrom deepteam import red_teamdiff --git a/docs/docs/red-teaming-vulnerabilities-toxicity.mdx b/docs/docs/red-teaming-vulnerabilities-toxicity.mdxindex 5aeba9d3..ea35ad12 100644--- a/docs/docs/red-teaming-vulnerabilities-toxicity.mdx+++ b/docs/docs/red-teaming-vulnerabilities-toxicity.mdx@@ -11,17 +11,42 @@ The toxicity vulnerability evaluates whether an LLM can **resist generating or a```pythonfrom deepteam.vulnerabilities import Toxicity-toxicity = Toxicity(types=["profanity"])+toxicity = Toxicity(toxicity_category="Your toxicity category")```-You must at least specify **ONE** of the **FOUR** `types` of `Toxicity` to test through a list of strings:+There is **ONE** mandatory and **FIVE** optional parameters when creating a `Toxicity` vulnerability:-- [`"insults"`](#insults): Tests for outputs that include insults, demeaning, or belittling language, or responses that teach how to insult someone effectively.-- [`"profanity"`](#profanity): Tests for outputs that include offensive or vulgar language, or responses that encourage or normalize such language.-- [`"threats"`](#threats):Tests for outputs that issue direct threats, provide instructions to intimidate, or suggest ways to harm others verbally or physically.-- [`"mockery"`](#mockery): Tests for outputs that ridicule or mock someone, or teach methods to humiliate or undermine others through ridicule.+- `toxicity_category`: The category of the attacks to be generated.+- [Optional] `simulator_model`: a string specifying which of OpenAI's GPT models to use, **OR** [any custom LLM model](https://deepeval.com/guides/guides-using-custom-llms) of type `DeepEvalBaseLLM`. Defaulted to 'gpt-3.5-turbo-0125'.+- [Optional] `evaluation_model`: a string specifying which of OpenAI's GPT models to use, **OR** [any custom LLM model](https://deepeval.com/guides/guides-using-custom-llms) of type `DeepEvalBaseLLM`. Defaulted to 'gpt-4o'.+- [Optional] `async_mode`: a boolean which when set to `True`, enables concurrent execution. Defaulted to `True`.+- [Optional] `verbose_mode`: a boolean which when set to `True`, prints the intermediate steps used to assess said vulnerability to the console. Defaulted to `False`.+- [Optional] `types`: a list of `types` of `Toxicity` to test through. Defaulted to all `types` available. Here are the list of `types` available for `Toxicity`:+ - [`"insults"`](#insults): Tests for outputs that include insults, demeaning, or belittling language, or responses that teach how to insult someone effectively.+ - [`"profanity"`](#profanity): Tests for outputs that include offensive or vulgar language, or responses that encourage or normalize such language.+ - [`"threats"`](#threats):Tests for outputs that issue direct threats, provide instructions to intimidate, or suggest ways to harm others verbally or physically.+ - [`"mockery"`](#mockery): Tests for outputs that ridicule or mock someone, or teach methods to humiliate or undermine others through ridicule.-To use the `Toxicity` vulnerability, supply it to the `red_team()` method:+### As a standalone++You can assess your model for a single vulnerability through the `assess` method:++```python+...+result = toxicity.assess(model_callback=your_model_callback)++for vulnerability_type in result.keys():+ for assessment in result[vulnerability_type]:+ print(f"{vulnerability_type}: {assessment}")+```++:::info+This is great for debugging or if you wish to build your own red teaming pipeline, but you will **NOT** get the benefits (assessment reports, Confident AI platform) and all the optimizations (speed, caching, computation) the `red_team()` function offers.+:::++### In `red_team()`++You can supply the `Toxicity` vulnerability in the `red_team` method as follows:```pythonfrom deepteam import red_teamdiff --git a/docs/docs/red-teaming-vulnerabilities.mdx b/docs/docs/red-teaming-vulnerabilities.mdxindex 17ca54ca..cda0e1bf 100644--- a/docs/docs/red-teaming-vulnerabilities.mdx+++ b/docs/docs/red-teaming-vulnerabilities.mdx@@ -6,13 +6,13 @@ sidebar_label: Introduction## Quick Summary-Vulnerabilities enable you to **specify which aspect of your LLM you wish to red-team**. In `deepteam`, defining a vulnerability requires creating a vulnerability object and specifying its type.+Vulnerabilities enable you to **specify which aspect of your LLM you wish to red-team**. In `deepteam`, defining a vulnerability requires creating a vulnerability object with the required parameters.```python-from deepteam.vulnerabilities import PIILeakage, Bias+from deepteam.vulnerabilities import DebugAccess, ShellInjection-pii_leakage = PIILeakage(types=["direct disclosure"])-bias = Bias(type=["race"])+debug_access = DebugAccess()+shell_injection = ShellInjection()```:::info@@ -28,7 +28,7 @@ from deepteam import red_teamred_team(vulnerabilities[pii_leakage, bias], model_callback=..., attacks=[...])```-`deepteam` lets you scan for **13 different vulnerabilties** (which amounts to a combined 50+ vulnerability types), ensuring comprehensive coverage of potential risks within your LLM application.+`deepteam` lets you scan for **22 different vulnerabilties** (which amounts to a combined 80+ vulnerability types), ensuring comprehensive coverage of potential risks within your LLM application.These risks and vulnerabilities include:@@ -38,18 +38,27 @@ These risks and vulnerabilities include:- **Responsible AI**- [Bias](red-teaming-vulnerabilities-bias)- [Toxicity](red-teaming-vulnerabilities-toxicity)-- **Unauthorized Access**- - [Unauthorized Access](red-teaming-vulnerabilities-unauthorized-access)-- **Brand Image**- - [Misinformation](red-teaming-vulnerabilities-misinformation)- - [Intellectual Property](red-teaming-vulnerabilities-intellectual-property)- - [ExcessiveAgency](red-teaming-vulnerabilities-excessive-agency)- - [Robustnesss](red-teaming-vulnerabilities-robustness)- - [Competition](red-teaming-vulnerabilities-competition)-- **Illegal Risks**+- **Security**+ - [BFLA](red-teaming-vulnerabilities-bfla)+ - [BOLA](red-teaming-vulnerabilities-bola)+ - [RBAC](red-teaming-vulnerabilities-rbac)+ - [Debug Access](red-teaming-vulnerabilities-debug-access)+ - [Shell Injection](red-teaming-vulnerabilities-shell-injection)+ - [SQL Injection](red-teaming-vulnerabilities-sql-injection)+ - [SSRF](red-teaming-vulnerabilities-ssrf)+- **Safety**- [Illegal Activities](red-teaming-vulnerabilities-illegal-activity)- [Graphic Content](red-teaming-vulnerabilities-graphic-content)- [Personal Safety](red-teaming-vulnerabilities-personal-safety)+- **Business**+ - [Misinformation](red-teaming-vulnerabilities-misinformation)+ - [Intellectual Property](red-teaming-vulnerabilities-intellectual-property)+ - [Competition](red-teaming-vulnerabilities-competition)+- **Agentic**+ - [Goal Theft](red-teaming-agentic-vulnerabilities-goal-theft)+ - [Recursive Hijacking](red-teaming-agentic-vulnerabilities-recursive-hijacking)+ - [Excessive Agency](red-teaming-vulnerabilities-excessive-agency)+ - [Robustnesss](red-teaming-vulnerabilities-robustness)You can also create [custom vulnerabilities](/docs/red-teaming-custom-vulnerability) for any vulnerability that is not covered by `deepteam`.@@ -59,8 +68,9 @@ LLM vulnerabilities can be categorized into 5 major LLM risk categories. Think o| LLM Risk Category | Vulnerabilities | Description || ------------------- | ---------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |-| Data Privacy | `PIILeakage`, `PromptLeakage` | Data Privacy vulnerabilities can expose confidential information or personal data, leading to potential privacy violations. |-| Responsible AI | `Bias`, `Toxicity` | Responsible AI vulnerabilities ensures that the model behaves ethically and responsibly without generating biased or offensive content. |-| Unauthorized Access | `UnauthorizedAccess` | Unauthorized Access vulnerabilities allow attackers to exploit the LLM to gain unauthorized system access or execute unintended commands. |-| Brand Image | `Misinformation`, `ExcessiveAgency`, `Robustness`, `Competition`, `IntellectualProperty` | Brand Image vulnerabilities can harm the perception of an organization or brand by spreading incorrect, misleading information, or competition-related content. These risks can undermine trust, damage reputation, and lead to long-term consequences for brand credibility. |-| Illegal Activities | `IllegalActivity`, `GraphicContent`, `PersonalSafety` | Illegal Activities vulnerabilities can encourage the model to generate content that breaks the law or promotes criminal behavior. |+| Data Privacy | `PIILeakage`, `PromptLeakage` | Involves exposure of personal or sensitive information through LLM outputs, leading to privacy breaches or regulatory violations. |+| Responsible AI | `Bias`, `Toxicity` | Ensures ethical and non-harmful behavior of models. Risks include offensive, discriminatory, or unfair content. |+| Security | `BFLA`, `BOLA`, `RBAC`, `DebugAccess`, `ShellInjection`, `SQLInjection`, `SSRF` | Concerns related to system-level attacks or misuse, such as bypassing controls, code injection, or unauthorized access to internal systems. |+| Safety | `IllegalActivity`, `GraphicContent`, `PersonalSafety` | Covers risks where the model may generate or encourage illegal, violent, or harmful behaviors affecting people or public safety. |+| Business | `Misinformation`, `IntellectualProperty`, `Competition` | Threats to organizational integrity, reputation, legal standing, and competitive positioning. Includes IP leakage, false information, and competitive data exposure. |+| Agentic | `GoalTheft`, `RecursiveHijacking`, `ExcessiveAgency`, `Robustness` | Emergent behaviors and control issues when LLMs or agents act autonomously. Includes risks of agents acting outside of their intended scope or being hijacked through indirect prompt manipulation. |