[Paper Review] XSTest: A Test Suite for Identifying Exaggerated Safety Behaviours in Large Language Models
XSTest is a diagnostic test suite of 250 safe and 200 unsafe prompts designed to detect exaggerated safety behaviors in large language models—where models refuse harmless queries due to lexical similarity to harmful ones. The study reveals that Llama2 exhibits severe exaggerated safety, while GPT-4 maintains the best balance between helpfulness and harmlessness, highlighting risks of overfitting to safety triggers.
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.
Motivation & Objective
- To identify systematic failures in large language models where safe prompts are incorrectly refused due to lexical similarity to harmful ones.
- To address the under-explored problem of exaggerated safety, where models over-respond to safety triggers at the cost of helpfulness.
- To develop a standardized, hand-crafted test suite for diagnosing such behaviors in state-of-the-art LLMs.
- To evaluate the impact of system prompts and guardrails on model safety behavior, revealing inconsistent and unintended side effects.
Proposed method
- XSTest comprises 250 safe prompts across ten distinct prompt types, each designed to be unambiguously safe and should not trigger refusal.
- A contrast set of 200 unsafe prompts is included to validate that models correctly refuse harmful requests.
- The test suite is applied to evaluate three state-of-the-art LLMs: Llama2 (with and without system prompt), Mistral 7B (with and without guardrail prompt), and GPT-4.
- Model responses are analyzed for refusal behavior on safe prompts, with refusal defined as non-compliance with clearly legitimate queries.
- The evaluation focuses on detecting lexical overfitting, where models react to specific words or phrases associated with unsafe content.
- Annotators assess responses for refusal, and results are compared across models to identify systematic failure modes.

Experimental results
Research questions
- RQ1To what extent do state-of-the-art LLMs refuse safe prompts that are linguistically similar to unsafe ones, indicating exaggerated safety?
- RQ2How do system prompts and guardrails affect the balance between helpfulness and harmlessness in LLMs?
- RQ3Can a standardized test suite like XSTest reliably detect and quantify exaggerated safety behaviors across different models?
- RQ4Why do some models, such as Llama2, exhibit severe refusal of safe prompts despite being otherwise well-calibrated?
- RQ5How does the inclusion of privacy-related prompts affect model refusal behavior, and what does this reveal about sensitivity to personal data?
Key findings
- Llama2 exhibits severe exaggerated safety, refusing 28% of safe prompts, particularly those involving sensitive topics or lexical similarity to harmful content.
- Removing Llama2’s original system prompt reduces refusal rates but does not eliminate exaggerated safety, indicating persistent overfitting.
- Mistral 7B in its original form does not exaggerate safety but also complies with highly unsafe prompts, showing insufficient harmlessness.
- Adding a guardrail prompt to Mistral reduces unsafe responses but increases refusal of safe prompts, demonstrating a trade-off between safety objectives.
- GPT-4 strikes the best balance, refusing only one unsafe prompt and complying with nearly all safe prompts, except those related to privacy.
- The study identifies lexical overfitting as a core cause of exaggerated safety, where models react to specific keywords rather than contextual intent.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.