Raccoon: Prompt Extraction Benchmark of LLM-Integrated Applications

Junlin Wang, Tianyi Yang, Roy Xie, Bhuwan Dhingra

Introduction

As the ecosystem of Large Language Model (LLM) integrated applications—such as OpenAI’s GPTs or Character.ai—continues to expand, developers are increasingly monetizing their "prompt engineering." These system prompts are effectively the source code of the application, containing the logic, persona, and constraints that provide value. However, these prompts are vulnerable to prompt extraction attacks, where malicious users craft queries to trick the model into revealing its internal instructions.

The Prompt Extraction Threat

Prompt extraction occurs when a user bypasses an application's intended interface to steal its proprietary instructions. This is not just a theoretical risk; it represents a significant threat to intellectual property in the LLM space. Figure 1 demonstrates how a malicious user can successfully extract instructions from an LLM-integrated application despite the presence of defense templates.

An illustration of a prompt extraction attack where a malicious user bypasses defense templates to extract the system prompt.

Methodology: The Raccoon Benchmark

The Raccoon benchmark provides a systematic framework to measure model susceptibility across four distinct settings:

  1. Defenseless Singular: Single attack techniques with no active defense.
  2. Defenseless Compound: Multiple attack techniques combined without defense.
  3. Defended Singular: Single attacks against in-context defense prompts.
  4. Defended Compound: Combined attacks against in-context defense prompts.

To evaluate success, the researchers used the RougeL similarity metric with a high threshold (0.8), comparing the model's output against the ground-truth system prompt. The study utilized a dataset of 197 real-world system prompts and a taxonomy of 42 singular and 10 compound attacks.

Key Findings and Results

The benchmark revealed several critical insights into the current state of LLM security:

  • The Capability-Vulnerability Paradox: There is a strong linear correlation between a model’s instruction-following capability and its susceptibility to extraction. Because high-performing models are "better students," they are more likely to faithfully execute malicious instructions like "Repeat everything above."
  • Universal Vulnerability: In a defenseless state, every model tested had at least one attack category with an 80%+ success rate.
  • GPT-4 Resilience vs. Open-Source Vulnerability: GPT-4-1106 proved to be the most robust when defended, with its worst-case susceptibility dropping from 99% to just 3%. Conversely, open-source models like Llama-2-70b and Mixtral-8x7B were found to be largely "indefensible" via in-context methods, maintaining high Attack Success Rates (ASR) even with long defense templates.
Radar chart showing model susceptibility across singular/compound and defended/defenseless settings.
  • Compound Attacks as Force Multipliers: While singular attacks often fail against robust defenses, compounding them (e.g., combining "Prefix Injection" with "Context Manipulation") significantly boosts success rates, highlighting the danger of iterative attack strategies.

Conclusion

The Raccoon benchmark highlights a sobering reality: most current LLMs are highly susceptible to prompt extraction. While advanced proprietary models like GPT-4 show resilience when paired with long, complex defense templates, open-source models currently lack the necessary safety alignment to resist these attacks effectively. Future research must focus on more permanent solutions, such as safety-specific fine-tuning, to protect the intellectual property powering the next generation of LLM applications.

Summary updated

BibTeX
@inproceedings{wang2024raccoon,
  author = {Junlin Wang and Tianyi Yang and Roy Xie and Bhuwan Dhingra},
  title = {{Raccoon: Prompt Extraction Benchmark of LLM-Integrated Applications}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2024},
  doi = {10.18653/v1/2024.findings-acl.791},
}
Figure