SDD BeaverTails–Alpaca pairs
This dataset contains 8,000 prompt–completion pairs for supervised fine-tuning with Self-Degraded Defense (SDD). Prompts come from unsafe rows in BeaverTails, split 330k_train; completions are unrelated responses sampled from Alpaca, split train. Both source datasets are licensed CC BY-NC 4.0. The prompts may contain harmful requests, but BeaverTails response text is not included.
Construction
The forked builder filters safe BeaverTails rows, expands multi-label category annotations, and samples 8,000 rows balanced across 14 categories (571 or 572 rows each). It samples Alpaca answers with replacement and uses sentence-transformers/all-MiniLM-L6-v2 embeddings to reject pairs with cosine similarity above 0.25. If 50 attempts fail the threshold, it keeps the least similar candidate tried. This run used seed 42 and produced no pairs above the threshold; the maximum observed similarity was 0.2490.
Because prompts with multiple categories can be sampled more than once, the 8,000 rows contain 4,854 distinct prompt strings. This release uses Alpaca answers only. The SDD paper also mentions LIMA answers, so this is not an exact reconstruction of its published dataset.
Fields
prompt: unsafe BeaverTails prompt.completion: sampled Alpaca answer.text: prompt and completion joined in the builder's instruction format.category: harm category used for balancing.cosine_sim: prompt–completion embedding similarity.resample_tries: number of sampled answer candidates.
Load the data with datasets.load_dataset("mremila/sdd-beavertails-alpaca", split="train").