# PromptBench: Towards Evaluating the Robustness of Large Language Models on Adversarial Prompts

**Authors:** Kaijie Zhu, Jindong Wang, Jiaheng Zhou, Zichen Wang, Hao Chen, Yidong Wang, Linyi Yang, Wei Ye, Neil Zhenqiang Gong, Yue Zhang, Xing Xie  
**arXiv:** [2306.04528](https://arxiv.org/abs/2306.04528)  
**Date:** 2023-06-07  
**Summary page:** https://www.summarizepaper.com/en/paper/2306.04528v2/

## Key points

- PromptBench is a robustness benchmark for Large Language Models (LLMs) to measure their resilience to adversarial prompts.
- The study focuses on different types of textual attacks targeting prompts at various levels: character, word, sentence, and semantic.
- Adversarial prompts are used in tasks such as sentiment analysis, natural language inference, reading comprehension, machine translation, and math problem-solving.
- The study evaluates 4,032 adversarial prompts across 8 tasks and 13 datasets with a total of 567,084 test samples.
- Contemporary LLMs are found to be vulnerable to adversarial prompts.
- Word frequency analysis is utilized to provide practical guidance for crafting more robust prompts.
- Code and compiled prompts are publicly accessible for future research on prompt robustness.
- A visualization website is available for easy exploration of adversarial prompts.
- PromptBench categorizes different types of prompts based on their purpose and labeled sample requirements: task-oriented and role-oriented prompts in both zero-shot (ZS) and few-shot (FS) learning scenarios.
- The evaluation includes multiple LLMs with different architectures and sizes across various tasks and domains.
- PromptBench comprises 8 diverse tasks with 13 public datasets covering areas such as sentiment analysis, grammar correctness detection, duplicate sentence detection, natural language inference, multi-task knowledge evaluation through multiple-choice questions, and reading comprehension.
- Datasets used include SST-2, CoLA, QQP, MRPC, MNLI, QNLI, RTE, WNLI, and MMLU.
- Overall findings from PromptBench provide insights into the robustness of LLMs to adversarial prompts and offer practical recommendations for prompt composition.

## Summary

PromptBench is a robustness benchmark designed to measure the resilience of Large Language Models (LLMs) to adversarial prompts. The study focuses on various types of textual attacks targeting prompts at different levels, including character, word, sentence, and semantic levels. These adversarial prompts are used in diverse tasks such as sentiment analysis, natural language inference, reading comprehension, machine translation, and math problem-solving. The study evaluates 4,032 adversarial prompts across 8 tasks and 13 datasets with a total of 567,084 test samples. The findings reveal that contemporary LLMs are vulnerable to adversarial prompts. To provide practical guidance for downstream users and prompt engineers in crafting more robust prompts, the analysis of word frequency is utilized. Additionally, the code and compiled prompts are made publicly accessible to stimulate future research on prompt robustness. A visualization website is also built for easy exploration of adversarial prompts. PromptBench consists of different types of prompts categorized based on their purpose and labeled sample requirements. Task-oriented prompts explicitly describe the task for the model to perform while role-oriented prompts frame the model as an entity with a specific role. Both zero-shot (ZS) and few-shot (FS) learning scenarios are considered for these prompt categories. The evaluation includes a set of LLMs with different architectures and sizes to assess their performance across various tasks and domains. The models considered include Flan-T5-large (0.8B), Dolly-6B, LLaMA-13B, Vicuna-13B , Cerebras-GPT-13B , GPT-NEOX -20B Flan -UL2 (20B )and ChatGPT . PromptBench comprises 8 diverse tasks with 13 public datasets covering areas such as sentiment analysis , grammar correctness detection , duplicate sentence detection , natural language inference , multi -task knowledge evaluation through multiple -choice questions , and reading comprehension . The datasets used include SST -2 , CoLA , QQP , MRPC , MNLI , QNLI , RTE , WNLI , and MMLU . Overall, PromptBench provides comprehensive insights into the robustness of LLMs to adversarial prompts and offers practical recommendations for prompt composition . The availability of code and evaluation benchmark encourages collaborative exploration in this field .
