SG-Bench: Evaluating LLM Safety Generalization Across Diverse Tasks and Prompt Types
Preprint
Abstract
Ensuring the safety of large language model (LLM) applications is essential for developing trustworthy artificial intelligence. Current LLM safety benchmarks have two limitations. First, they focus solely on either discriminative or generative evaluation paradigms while ignoring their interconnection. Second, they rely on standardized inputs, overlooking the effects of widespread prompting techniques, such as system prompts, few-shot demonstrations, and chain-of-thought prompting. To overcome these issues, we developed SG-Bench, a novel benchmark to assess the generalization of LLM safety across various tasks and prompt types. This benchmark integrates both generative and discriminative evaluation tasks and includes extended data to examine the impact of prompt engineering and jailbreak on LLM safety. Our assessment of 3 advanced proprietary LLMs and 10 open-source LLMs with the benchmark reveals that most LLMs perform worse on discriminative tasks than generative ones, and are highly susceptible to prompts, indicating poor generalization in safety alignment. We also explain these findings quantitatively and qualitatively to provide insights for future research.Keywords
All Related Versions
This publication has 12 references indexed in Scilit:
- Jailbreaking Black Box Large Language Models in Twenty Queries2025
- "Do Anything Now": Characterizing and Evaluating In-The-Wild Jailbreak Prompts on Large Language Models2024
- Hal-Eval: A Universal and Fine-grained Hallucination Evaluation Framework for Large Vision Language Models2024
- Arondight: Red Teaming Large Vision Language Models with Auto-generated Multi-modal Jailbreak Prompts2024
- R-Judge: Benchmarking Safety Risk Awareness for LLM Agents2024
- Play Guessing Game with LLM: Indirect Jailbreak Attack with Implicit Clues2024
- SALAD-Bench: A Hierarchical and Comprehensive Safety Benchmark for Large Language Models2024
- A Wolf in Sheep’s Clothing: Generalized Nested Jailbreak Prompts can Fool Large Language Models Easily2024
- PromptRobust: Towards Evaluating the Robustness of Large Language Models on Adversarial Prompts2023
- Prompt Engineering with ChatGPT: A Guide for Academic WritersAnnals of Biomedical Engineering, 2023