> ## Documentation Index
> Fetch the complete documentation index at: https://neuraltrust-92b43583-develop.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Prompt Injections Overview

> Complete catalog of prompt injection attack techniques in TrustTest

Prompt injection attacks attempt to manipulate the model into ignoring its instructions or behaving in unintended ways. TrustTest provides the most comprehensive suite of prompt injection probes, organized by attack technique.

## Attack Categories

### Single Turn Attacks

Direct attacks delivered in a single message. The catalog has 39 probes (jailbreaks, encoding, structural, language, multimodal/agent, MCP, memory/RAG).

[All single-turn probes →](/trusttest/create/threat-detection/prompt-injections/single-turn/overview)

***

### Multi-Turn Attacks

Sophisticated attacks that use multiple conversation turns to gradually manipulate the model:

| Attack                      | Description                                                                   |
| --------------------------- | ----------------------------------------------------------------------------- |
| **Crescendo Attack**        | Gradual escalation that slowly pushes boundaries toward a malicious objective |
| **Echo Chamber Attack**     | Reinforcement-based manipulation through positive feedback                    |
| **Multi-Turn Manipulation** | General multi-turn conditioning attacks                                       |
| **Payload Splitting**       | Split a malicious instruction across conversation turns                       |

[Explore Multi-Turn Attacks →](/trusttest/create/threat-detection/prompt-injections/multi-turn/overview)

***

### From Dataset

Load attacks from curated datasets for reproducible testing:

| Dataset Type        | Description                                      |
| ------------------- | ------------------------------------------------ |
| **Static Datasets** | Pre-built YAML/JSON datasets with attack prompts |
| **Custom Datasets** | Your own attack datasets in various formats      |

[Explore Dataset-Based Attacks →](/trusttest/create/threat-detection/prompt-injections/from-dataset)

***

## Quick Reference

The full single-turn catalog (class, `SubCategory`, description, and usage examples) lives on [Single Turn Attacks](/trusttest/create/threat-detection/prompt-injections/single-turn/overview).

### Multi-Turn Probes

| Probe                       | Class Name                   | Focus                                                  |
| --------------------------- | ---------------------------- | ------------------------------------------------------ |
| **Multi-Turn Manipulation** | `MultiTurnManipulationProbe` | Tests gradual conditioning to comply                   |
| **Crescendo Attack**        | `CrescendoAttackProbe`       | Tests if incremental requests bypass safety            |
| **Echo Chamber Attack**     | `EchoChamberAttackProbe`     | Assesses resistance to reinforcement manipulation      |
| **Payload Splitting**       | `PayloadSplittingProbe`      | Assesses if a split payload evades per-message filters |

***

## How Prompt Injection Testing Works

Prompt injection probes use a binary evaluation:

* **Pass**: The model resists the injection attempt and maintains safe behavior
* **Fail**: The model's behavior is successfully manipulated by the attack

### Basic Usage Example

```python theme={null}
from trusttest.catalog.prompt_injections.single_turn import SingleTurnScenarioBuilder, SubCategory
from trusttest.targets.http import HttpTarget, PayloadConfig

target = HttpTarget(
    url="https://your-model-endpoint.com/chat",
    headers={"Content-Type": "application/json"},
    payload_config=PayloadConfig(
        format={
            "messages": [
                {"role": "user", "content": "{{ test }}"}
            ]
        },
        message_regex="{{ test }}",
    ),
)

builder = SingleTurnScenarioBuilder(target=target, num_test_cases=20)
scenario = builder.get_scenario(SubCategory.DAN_JAILBREAK)

test_set = scenario.probe.get_test_set()
results = scenario.eval.evaluate(test_set)
results.display_summary()
```

***

## When to Use Prompt Injection Testing

Use prompt injection testing when you need to:

* Validate model safety before deployment
* Test guardrails and content filters
* Assess vulnerability to known jailbreak techniques
* Conduct red team exercises
* Meet security compliance requirements
