Dataset Viewer

The dataset viewer is not available because its heuristics could not detect any supported data files. You can try uploading some data files, or configuring the data files location manually.

BeaverTails Data Preparation

Overview

This repository contains scripts and selected data manifests prepared from the BeaverTails training and evaluation datasets.

The project prepares three data pools: evaluation prompts, benign-candidate prompts, and judging-cue response families. Prompt normalization, duplicate checks, and overlap verification were used during preparation.

Data Sources

  • BeaverTails training data: Used to select benign-candidate prompts and judging-cue response families.
  • BeaverTails evaluation data: Used to select evaluation prompts across 14 categories.

Data Pools and Splits

1. Evaluation Prompts

A total of 350 prompts were selected, with 25 prompts per category across 14 categories.

File Number of prompts Purpose
evaluation_estimation_candidate.jsonl 200 Estimation split
evaluation_layer_selection_candidate.jsonl 50 Layer-selection split
evaluation_validation_candidate.jsonl 100 Validation split

These files contain prompts for generating fresh model responses.

2. Benign-Candidate Prompts

A total of 350 unique prompt families were selected from the training data.

File Number of prompts Purpose
training_benign_estimation.jsonl 200 Estimation split
training_benign_layer_selection.jsonl 50 Layer-selection split
training_benign_validation.jsonl 100 Validation split

Each record contains a prompt for generating a fresh model response.

3. Judging-Cue Response Families

A total of 400 prompt families were selected from the training data, divided into two groups.

File Prompt families Response records
judging_source_safe.jsonl 200 2,979
judging_source_unsafe.jsonl 200 3,564

These files preserve the original prompt-response records and their source safety labels.

Selection note: Prompt families containing both safe and unsafe source labels were excluded from this pool.

Repository Structure

  • configs/split_config.json — configuration for the data splits.
  • evaluation/inspect_evaluation.py — inspects the evaluation dataset.
  • evaluation/check_evaluation_duplicates.py — checks evaluation data for duplicates.
  • evaluation/select_unsafe_prompts.py — selects evaluation prompts.
  • main_training/inspect_training.py — inspects the training dataset.
  • main_training/check_training_duplicates.py — checks training data for duplicates.
  • main_training/select_benign_candidates.py — selects benign-candidate prompts and creates their splits.
  • main_training/audit_judging_families.py — audits judging prompt families.
  • main_training/select_judging_families.py — selects judging-cue response families.
  • main_training/verify_benign_splits.py — verifies the benign-candidate splits.
  • main_training/verify_judging_families.py — verifies the judging-family selection.
  • shared/overlap_checks.py — checks overlap between the three data pools.
  • manifests/ — contains all selected JSONL data files.
  • reports/ — reserved for preparation reports.

Validation

The final pairwise overlap check found no shared prompt families between the evaluation, benign-candidate, and judging-cue pools. The judging-family verification also confirmed 200 unique families in each safety group, with no overlap between the groups.

File Format

The selected data manifests use JSON Lines (.jsonl) format, with one JSON record per line.

Source Attribution and License

The source data are from BeaverTails and BeaverTails-Evaluation, developed by PKU-Alignment.

The original BeaverTails dataset is released under the Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0) license. Please refer to the original dataset repositories for the applicable license terms.

Paper: Ji et al., BeaverTails: Towards Improved Safety Alignment of LLM via a Human-Preference Dataset (2023). arXiv:2307.04657.

Downloads last month
60

Paper for Sabka4/beavertails-preparation