XSTest: A Test Suite for Identifying Exaggerated Safety Behaviours in Large Language Models

Paul Röttger, Hannah Rose Kirk, Bertie Vidgen, Giuseppe Attanasio, Federico Bianchi +1 more
8/2/2023
cs.CLcs.AI

No official code found. Best implementation: paul-rottger/xstest (142 stars, CC-BY-4.0, last commit 2025-02-24).

Abstract

Without proper safeguards, large language models will readily follow malicious instructions and generate toxic content. This risk motivates safety efforts such as red-teaming and large-scale feedback learning, which aim to make models both helpful and harmless. However, there is a tension between these two objectives, since harmlessness requires models to refuse to comply with unsafe prompts, and thus not be helpful. Recent anecdotal evidence suggests that some models may have struck a poor balance, so that even clearly safe prompts are refused if they use similar language to unsafe prompts or mention sensitive topics. In this paper, we introduce a new test suite called XSTest to identify such eXaggerated Safety behaviours in a systematic way. XSTest comprises 250 safe prompts across ten prompt types that well-calibrated models should not refuse to comply with, and 200 unsafe prompts as contrasts that models, for most applications, should refuse. We describe XSTest's creation and composition, and then use the test suite to highlight systematic failure modes in state-of-the-art language models as well as more general challenges in building safer language models.

View on arXivView PDF

Code Implementations(1)

paul-rottger/xstestCommunity100%
CC-BY-4.0

Röttger et al. (NAACL 2024): "XSTest: A Test Suite for Identifying Exaggerated Safety Behaviours in Large Language Models"

14213Python, Jupyter NotebookJul 28, 20231 years agoCC-BY-4.0

Similar Papers

Cite this paper

@article{rttger2023xstest,
  title  = {XSTest: A Test Suite for Identifying Exaggerated Safety Behaviours in Large Language Models},
  author = {Paul Röttger and Hannah Rose Kirk and Bertie Vidgen and Giuseppe Attanasio and Federico Bianchi and Dirk Hovy},
  year   = {2023},
  eprint = {2308.01263},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2308.01263v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2308.01263.svg)](https://codeofpaper.com/paper/2308.01263)

Discussion