Abstract
Large Language Models (LLMs) presents significant priority in text understanding and generation. However, LLMs suffer from the risk of generating harmful contents especially while being employed to applications. There are several black-box attack methods, such as Prompt Attack, which can change the behaviour of LLMs and induce LLMs to generate unexpected answers with harmful contents. Researchers are interested in Prompt Attack and Defense with LLMs, while there is no publicly available dataset with high successful attacking rate to evaluate the abilities of defending prompt attack. In this paper, we introduce a pipeline to construct high-quality prompt attack samples, along with a Chinese prompt attack dataset called CPAD. Our prompts aim to induce LLMs to generate unexpected outputs with several carefully designed prompt attack templates and widely concerned attacking contents. Different from previous datasets involving safety estimation, we construct the prompts considering three dimensions: contents, attacking methods and goals. Especially, the attacking goals indicate the behaviour expected after successfully attacking the LLMs, thus the responses can be easily evaluated and analysed. We run several popular Chinese LLMs on our dataset, and the results show that our prompts are significantly harmful to LLMs, with around 70% attack success rate to GPT-3.5. CPAD is publicly available at https://github.com/liuchengyuan123/CPAD.
Introduction
While techniques like Reinforcement Learning from Human Feedback (RLHF) have significantly improved the safety alignment of Large Language Models (LLMs), they remain vulnerable to "jailbreak" prompt attacks. These attacks bypass safety guardrails by wrapping malicious intent in complex templates. Current safety benchmarks often evaluate models in a vacuum, checking for toxic keywords without considering the attacker's specific objective. In real-world scenarios, malicious users seek actionable outcomes—such as detailed criminal plans or private data extraction. This paper addresses the lack of high-quality, goal-oriented attack datasets, particularly for Chinese LLMs, by introducing the Chinese Prompt Attack Dataset (CPAD).
Methodology: The CPAD Pipeline
The authors developed a systematic pipeline to generate high-quality attack prompts. This process is structured around three dimensions: Content (the malicious topic), Template (the bypass mechanism, such as role-playing), and Goal (the specific desired behavior).
As shown in the pipeline above, the process begins with manually designed seed contents and templates. These are then expanded using GPT-3.5 to generate thousands of variations. To ensure the dataset contains only the most effective attacks, prompts are filtered by testing them against three distinct Chinese LLMs (ChatGLM-6B, Ziya-13B, and ChatYuan-Large-v2). Only prompts that successfully compromise all three models are retained for the final CPAD dataset.
Dataset and Evaluation
CPAD consists of 10,050 prompt attack samples. Unlike static benchmarks like SafetyPrompts, CPAD is explicitly goal-oriented. Evaluation is performed by an LLM classifier that determines if the specific attacking goal was achieved, rather than just identifying toxic language. This provides a more nuanced understanding of a model's safety failures.
Experimental Results
The effectiveness of CPAD is demonstrated by its high success rate against state-of-the-art models. While traditional safety datasets show very low success rates against aligned models, CPAD achieves a staggering ~70% success rate against GPT-3.5.
Key findings from the evaluation include:
- Capability and Harm: Highly capable models like GPT-3.5, when successfully attacked, provide more detailed and actionable harmful content compared to smaller models.
- Alignment Blind Spots: Models were particularly vulnerable to topics like "Espionage," likely due to a lack of specific safety alignment data for these niche areas.
- Knowledge Robustness: Goals like "Fact pollution" were harder to achieve against GPT-3.5, as its internal knowledge base resisted false premises more effectively than smaller models.
Defense and Conclusion
The study also explores defensive strategies. The authors found that supervised fine-tuning (SFT) using Low-Rank Adaptation (LoRA) is highly effective. By training a model (e.g., Baichuan-13B-Chat) on a subset of CPAD to explicitly reject these attacks, the success rate dropped from 74.65% to 0.76%. While reactive, this demonstrates that targeted training can significantly harden LLMs against known attack patterns. CPAD serves as a critical resource for the community to develop more robust and generalized safety mechanisms.
Summary updated