Be a Multitude to Itself: A Prompt Evolution Framework for Red Teaming

Rui Li, Peiyi Wang, Jingyuan Ma, Di Zhang, Lei Sha, Zhifang Sui

Introduction

As Large Large Models (LLMs) become increasingly integrated into critical infrastructure and daily life, ensuring their safety and alignment is paramount. Red teaming—the adversarial process of intentionally prompting models to generate harmful content—remains the gold standard for identifying vulnerabilities. However, manual red teaming is labor-intensive and difficult to scale, while existing automated methods often produce repetitive, easily detectable attack patterns.

Figure 1: A conceptual overview of red teaming, where an attacker uses specific prompts to bypass safety filters and elicit harmful responses.

To address these limitations, we present RTPE (Red Teaming Prompts Evolution), a framework designed to automate the generation of diverse, high-quality attack prompts. By "being a multitude to itself," RTPE evolves a small set of seed prompts into a vast library of creative attacks that can uncover subtle cracks in a model's alignment.

The RTPE Framework

The core of RTPE is a two-stage evolution process that expands both the variety and the complexity of attack prompts.

Figure 6: The RTPE framework architecture, illustrating the In-breadth and In-depth evolution stages.

1. In-Breadth Evolving

This stage focuses on generating a high volume of diverse prompts using a novel In-Context Learning (ICL) approach. Unlike standard ICL, RTPE utilizes comparative examples, providing the generator with both successful and failed attack attempts. This allows the model to learn the nuances of what makes a prompt effective.

A key innovation in this stage is the use of "Poetry as a Mutagenic Factor." By framing malicious intent through literary devices like metaphors and symbolism, the framework masks harmful requests, making them significantly harder for standard safety filters to identify.

2. In-Depth Evolving

Once a diverse pool is established, RTPE applies four transformation operations to increase the sophistication of the attacks:

  • Downward Expansion: Decomposing broad sensitive topics (e.g., "terrorism") into specific, granular sub-topics (e.g., "recruitment tactics").
  • Restructure: Shuffling word order and syntax to determine if safety triggers are keyword-based or intent-based.
  • Dialogue Simulation: Converting single-turn prompts into multi-turn conversations to test if models maintain safety guardrails as context grows.
  • Length Declining: Iteratively compressing prompts to identify the most concise and potent versions of an attack.

Experimental Methodology

The effectiveness of RTPE was evaluated by evolving just 12 seed prompts into a comprehensive library of 4,800 red teaming prompts. These prompts covered eight sensitive domains: fraud, politics, pornography, race, religion, suicide, terrorism, and violence.

The framework was tested against eight representative LLMs, including members of the GPT-3.5 family, Llama-2, Qwen, and Vicuna, to assess their relative robustness and identify common failure modes.

Key Insights and Results

The experimental results highlight several critical vulnerabilities in current LLM alignment:

  • The Creative Bypass: Literary genres, particularly poetry, are highly effective at concealing malicious intent. The inherent ambiguity and symbolism of poetic language act as a natural obfuscation layer.
  • The Role-Play Weakness: Models proved most vulnerable to fraud-based attacks, achieving a 73.34% success rate. This suggests that the training objective to be a helpful "role-player" often conflicts with and overrides safety guardrails when presented with a convincing hypothetical scenario.
  • Safety Hierarchy: A clear hierarchy emerged in model robustness, with the Llama-2 family demonstrating the highest safety performance, followed by Qwen and the GPT-3.5 family.
  • Dialogue Persistence: Interestingly, attack success rates peaked during 4-round historical dialogues (74.58%). This indicates that as conversations lengthen, models may lose an accurate judgment of the broader context, leading to safety failures.

Overall, RTPE achieved an 80% Attack Success Rate (ASR) on GPT-3.5-turbo and a 67% average ASR across all tested models, significantly outperforming existing automated baselines.

Conclusion

RTPE demonstrates that automated, evolutionary frameworks can generate highly effective and diverse red teaming prompts that challenge even well-aligned LLMs. While newer model versions show improved robustness, the "arms race" between alignment and adversarial attacks continues. Future work will focus on utilizing these evolved prompts for adversarial training, helping developers build more resilient models by exposing them to a "multitude" of potential threats during the alignment process.

Summary updated

BibTeX
@inproceedings{li2024be,
  author = {Rui Li and Peiyi Wang and Jingyuan Ma and Di Zhang and Lei Sha and Zhifang Sui},
  title = {{Be a Multitude to Itself: A Prompt Evolution Framework for Red Teaming}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2024},
  doi = {10.18653/v1/2024.findings-emnlp.188},
}
Figure