Abstract
Large Language Models (LLMs) present 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
Large Language Models (LLMs) have demonstrated remarkable capabilities in natural language processing and generation. To mitigate the risk of generating harmful or biased content, techniques like Reinforcement Learning from Human Feedback (RLHF) are employed to align models with human values. However, these models remain vulnerable to "Prompt Attacks"—carefully crafted inputs designed to bypass safety filters.
Existing safety benchmarks often fail to accurately measure these vulnerabilities because they are "aimless," focusing on general safety rather than specific adversarial objectives. For example, a model might discuss a sensitive topic without actually fulfilling a harmful request, yet still be flagged as safe. This paper introduces the Chinese Prompt Attack Dataset (CPAD), a goal-oriented benchmark designed to stress-test LLM defenses by explicitly defining the attacker's desired outcome.
Methodology
The construction of CPAD follows a rigorous multi-stage pipeline designed to ensure high attack success rates and diversity. The framework categorizes attacks across three dimensions:
- Content: The harmful topic (e.g., fraud, privacy theft, discrimination).
- Template: The adversarial "shell" used to hide intent (e.g., role-playing or fact pollution).
- Goal: The specific behavior expected from the LLM (e.g., providing a step-by-step implementation plan).
As shown in the pipeline above, the process begins with the manual design of seed contents and templates. These are automatically expanded using ChatGPT to generate thousands of diverse prompts. To ensure effectiveness, these prompts are validated against multiple Chinese LLMs (such as ChatGLM-6B and Ziya-13B). Only prompts that successfully "break" these models are retained for the final dataset, which contains 10,050 validated samples.
Results and Analysis
Experimental results demonstrate that CPAD is significantly more effective at exposing vulnerabilities than previous benchmarks. While models appear relatively safe on benchmarks like SAFETYPROMPTS, CPAD reveals a much higher susceptibility to adversarial manipulation.
Key findings from the evaluation include:
- High Success Rates: CPAD achieved a 69.91% success rate against GPT-3.5 and over 78% against models like Baichuan-7B and ChatGLM2-6B.
- The Capability Paradox: While larger models like GPT-3.5 are generally more robust, their successful failures are more dangerous. Because of their higher reasoning capabilities, their harmful outputs are often more practical and detailed than those of smaller models.
- Effective Defense: The researchers demonstrated that supervised fine-tuning (SFT) using CPAD's goal-oriented data can drastically improve safety. Fine-tuning a Baichuan-13B model reduced the attack success rate from 74.65% to just 0.76%.
Conclusion
CPAD provides a challenging and precise benchmark for evaluating the safety of Chinese LLMs. By shifting the focus to goal-oriented attacks, it exposes critical vulnerabilities that general safety benchmarks miss. The dataset and its construction methodology serve as a vital resource for developing more robust alignment and defense strategies in the evolving landscape of AI security.
Summary updated