A Chinese Dataset for Evaluating the Safeguards in Large Language Models

Yuxia Wang, Zenan Zhai, Haonan Li, Xudong Han, Lizhi Lin +4 more
2/19/2024
cs.CL

Official code: Libr-AI/do-not-answer (334 stars, Apache-2.0, last commit 2024-06-07).

Abstract

Many studies have demonstrated that large language models (LLMs) can produce harmful responses, exposing users to unexpected risks when LLMs are deployed. Previous studies have proposed comprehensive taxonomies of the risks posed by LLMs, as well as corresponding prompts that can be used to examine the safety mechanisms of LLMs. However, the focus has been almost exclusively on English, and little has been explored for other languages. Here we aim to bridge this gap. We first introduce a dataset for the safety evaluation of Chinese LLMs, and then extend it to two other scenarios that can be used to better identify false negative and false positive examples in terms of risky prompt rejections. We further present a set of fine-grained safety assessment criteria for each risk type, facilitating both manual annotation and automatic evaluation in terms of LLM response harmfulness. Our experiments on five LLMs show that region-specific risks are the prevalent type of risk, presenting the major issue with all Chinese LLMs we experimented with. Our data is available at https://github.com/Libr-AI/do-not-answer. Warning: this paper contains example data that may be offensive, harmful, or biased.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

Do-Not-Answer: A Dataset for Evaluating Safeguards in LLMs

33429Python, Jupyter NotebookAug 20, 20232 years agoApache-2.0

Similar Papers

Cite this paper

@article{wang2024chinese,
  title  = {A Chinese Dataset for Evaluating the Safeguards in Large Language Models},
  author = {Yuxia Wang and Zenan Zhai and Haonan Li and Xudong Han and Lizhi Lin and Zhenxuan Zhang and Jingru Zhao and Preslav Nakov and Timothy Baldwin},
  year   = {2024},
  eprint = {2402.12193},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2402.12193v3}
}

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/2402.12193.svg)](https://codeofpaper.com/paper/2402.12193)

Discussion