natolambert/xstest-v2-copy
收藏资源简介:
--- license: cc-by-4.0 dataset_info: features: - name: id dtype: string - name: type dtype: string - name: prompt dtype: string - name: completion dtype: string - name: annotation_1 dtype: string - name: annotation_2 dtype: string - name: agreement dtype: bool - name: final_label dtype: string splits: - name: gpt4 num_bytes: 264757 num_examples: 450 - name: llama2new num_bytes: 523074 num_examples: 450 - name: llama2orig num_bytes: 476580 num_examples: 450 - name: mistralguard num_bytes: 309478 num_examples: 450 - name: mistralinstruct num_bytes: 377642 num_examples: 450 - name: prompts num_bytes: 47890 num_examples: 450 download_size: 930253 dataset_size: 1999421 configs: - config_name: default data_files: - split: gpt4 path: data/gpt4-* - split: llama2new path: data/llama2new-* - split: llama2orig path: data/llama2orig-* - split: mistralguard path: data/mistralguard-* - split: mistralinstruct path: data/mistralinstruct-* - split: prompts path: data/prompts-* task_categories: - conversational language: - en size_categories: - 1K<n<10K --- # XSTest Dataset for Testing Exaggerated Safety Note, this is an upload of the data found [here](https://github.com/paul-rottger/exaggerated-safety) for easier research use. All credit to the authors of the [paper](https://arxiv.org/abs/2308.01263) The test prompts are subject to Creative Commons Attribution 4.0 International license. The model completions are subject to the original licenses specified by Meta, Mistral and OpenAI. ### Loading the dataset Use the following: ``` from datasets import load_dataset dataset = load_dataset("natolambert/xstest-v2-copy) prompts = dataset["prompts"] # select the correct subset(s) ``` The dataset is a `DatasetDict` with the following structure: ``` DatasetDict({ gpt4: Dataset({ features: ['id', 'type', 'prompt', 'completion', 'annotation_1', 'annotation_2', 'agreement', 'final_label'], num_rows: 450 }) llama2new: Dataset({ features: ['id', 'type', 'prompt', 'completion', 'annotation_1', 'annotation_2', 'agreement', 'final_label'], num_rows: 450 }) llama2orig: Dataset({ features: ['id', 'type', 'prompt', 'completion', 'annotation_1', 'annotation_2', 'agreement', 'final_label'], num_rows: 450 }) mistralguard: Dataset({ features: ['id', 'type', 'prompt', 'completion', 'annotation_1', 'annotation_2', 'agreement', 'final_label'], num_rows: 450 }) mistralinstruct: Dataset({ features: ['id', 'type', 'prompt', 'completion', 'annotation_1', 'annotation_2', 'agreement', 'final_label'], num_rows: 450 }) }) ``` The mapping for prompts is as follows (from the original below) * `id_v1` removed, * `id_v2` -> `id` * empty column completion * focus to annotation_1 and note to annotation_2 * empty `final_label` ``` prompts: Dataset({ features: ['id_v1', 'id_v2', 'type', 'prompt', 'focus', 'note'], num_rows: 450 }) ``` Please cite their work: ``` @misc{röttger2023xstest, 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}, primaryClass={cs.CL} } ```
许可证:CC BY 4.0(知识共享署名4.0国际许可协议) dataset_info: 特征: - 字段名:id,数据类型:字符串 - 字段名:type,数据类型:字符串 - 字段名:prompt(提示词),数据类型:字符串 - 字段名:completion(模型补全结果),数据类型:字符串 - 字段名:annotation_1(标注1),数据类型:字符串 - 字段名:annotation_2(标注2),数据类型:字符串 - 字段名:agreement(标注一致性),数据类型:布尔值 - 字段名:final_label(最终标签),数据类型:字符串 splits: - 划分名:gpt4,字节数:264757,样本数:450 - 划分名:llama2new,字节数:523074,样本数:450 - 划分名:llama2orig,字节数:476580,样本数:450 - 划分名:mistralguard,字节数:309478,样本数:450 - 划分名:mistralinstruct,字节数:377642,样本数:450 - 划分名:prompts,字节数:47890,样本数:450 下载大小:930253,数据集总大小:1999421 configs: - 配置名:default,数据文件: - 划分:gpt4,路径:data/gpt4-* - 划分:llama2new,路径:data/llama2new-* - 划分:llama2orig,路径:data/llama2orig-* - 划分:mistralguard,路径:data/mistralguard-* - 划分:mistralinstruct,路径:data/mistralinstruct-* - 划分:prompts,路径:data/prompts-* task_categories: - 对话式 language: - 英语 size_categories: - 1K < n < 10K # 用于测试过度安全行为的XSTest数据集 请注意,本仓库上传了原仓库[此处](https://github.com/paul-rottger/exaggerated-safety)的数据集,以方便科研使用。所有荣誉归属于该[论文](https://arxiv.org/abs/2308.01263)的作者。 本数据集的测试提示词遵循知识共享署名4.0国际许可协议。模型生成的补全结果则遵循Meta、Mistral与OpenAI指定的原始许可协议。 ### 数据集加载方法 请使用如下代码: from datasets import load_dataset dataset = load_dataset("natolambert/xstest-v2-copy") prompts = dataset["prompts"] # 选择所需的子集 该数据集为`DatasetDict`格式,结构如下: DatasetDict({ gpt4: Dataset({ 特征:['id', 'type', 'prompt', 'completion', 'annotation_1', 'annotation_2', 'agreement', 'final_label'], 样本数:450 }) llama2new: Dataset({ 特征:['id', 'type', 'prompt', 'completion', 'annotation_1', 'annotation_2', 'agreement', 'final_label'], 样本数:450 }) llama2orig: Dataset({ 特征:['id', 'type', 'prompt', 'completion', 'annotation_1', 'annotation_2', 'agreement', 'final_label'], 样本数:450 }) mistralguard: Dataset({ 特征:['id', 'type', 'prompt', 'completion', 'annotation_1', 'annotation_2', 'agreement', 'final_label'], 样本数:450 }) mistralinstruct: Dataset({ 特征:['id', 'type', 'prompt', 'completion', 'annotation_1', 'annotation_2', 'agreement', 'final_label'], 样本数:450 }) }) `prompts`划分集的字段映射关系如下(源自原始数据集): * 移除`id_v1`字段 * 将`id_v2`映射为`id` * 新增空字段`completion` * 将原`focus`字段对应至`annotation_1`,原`note`字段对应至`annotation_2` * 新增空字段`final_label` prompts: Dataset({ 特征:['id_v1', 'id_v2', 'type', 'prompt', 'focus', 'note'], 样本数:450 }) 请引用该原论文: @misc{röttger2023xstest, 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}, primaryClass={cs.CL} }
XSTest Dataset for Testing Exaggerated Safety
数据集信息
特征
- id: 字符串类型
- type: 字符串类型
- prompt: 字符串类型
- completion: 字符串类型
- annotation_1: 字符串类型
- annotation_2: 字符串类型
- agreement: 布尔类型
- final_label: 字符串类型
数据分割
- gpt4: 264757字节,450个样本
- llama2new: 523074字节,450个样本
- llama2orig: 476580字节,450个样本
- mistralguard: 309478字节,450个样本
- mistralinstruct: 377642字节,450个样本
- prompts: 47890字节,450个样本
数据集大小
- 下载大小: 930253字节
- 数据集大小: 1999421字节
配置
- 默认配置: 包含以下数据文件
- gpt4: data/gpt4-*
- llama2new: data/llama2new-*
- llama2orig: data/llama2orig-*
- mistralguard: data/mistralguard-*
- mistralinstruct: data/mistralinstruct-*
- prompts: data/prompts-*
任务类别
- 对话
语言
- 英语
大小类别
- 1K<n<10K
数据集结构
DatasetDict({ gpt4: Dataset({ features: [id, type, prompt, completion, annotation_1, annotation_2, agreement, final_label], num_rows: 450 }) llama2new: Dataset({ features: [id, type, prompt, completion, annotation_1, annotation_2, agreement, final_label], num_rows: 450 }) llama2orig: Dataset({ features: [id, type, prompt, completion, annotation_1, annotation_2, agreement, final_label], num_rows: 450 }) mistralguard: Dataset({ features: [id, type, prompt, completion, annotation_1, annotation_2, agreement, final_label], num_rows: 450 }) mistralinstruct: Dataset({ features: [id, type, prompt, completion, annotation_1, annotation_2, agreement, final_label], num_rows: 450 }) })
引用
@misc{röttger2023xstest, 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}, primaryClass={cs.CL} }




