Datasets:
Tasks:
Text Generation
Modalities:
Text
Formats:
csv
Sub-tasks:
text2text-generation
Languages:
English
Size:
10K - 100K
License:
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,48 +1,46 @@
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
- no-annotation
|
| 4 |
-
language:
|
| 5 |
-
- en
|
| 6 |
-
language_creators:
|
| 7 |
-
- machine-generated
|
| 8 |
-
multilinguality:
|
| 9 |
-
- monolingual
|
| 10 |
-
size_categories:
|
| 11 |
-
- 10K<n<100K
|
| 12 |
-
source_datasets:
|
| 13 |
-
- original
|
| 14 |
task_categories:
|
| 15 |
-
|
| 16 |
task_ids:
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
|
|
|
| 21 |
configs:
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
---
|
| 47 |
|
| 48 |
# Safety Aligned Datasets
|
|
@@ -51,7 +49,7 @@ configs:
|
|
| 51 |
|
| 52 |
*A high-fidelity adversarial corpus engineered for alignment research, refusal boundary modeling, and robustness evaluation of Small Language Models.*
|
| 53 |
|
| 54 |
-
[]() []() []() []() []() []()
|
| 53 |
|
| 54 |
</div>
|
| 55 |
|
|
|
|
| 57 |
|
| 58 |
## The Problem This Solves
|
| 59 |
|
| 60 |
+
Fine-tuning a Small Language Model to be safe is not the same as fine-tuning it to *understand* safety.
|
| 61 |
|
| 62 |
+
Most safety datasets give models clean refusal examples on obvious prompts — and those models fail the moment an adversary wraps a harmful request in a hypothetical, a role-play, or a chain of plausible reasoning. The failure is not in the refusal mechanism. It is in the **coverage gap**: the model has never been exposed to the attack surface it will actually face in deployment.
|
| 63 |
|
| 64 |
+
This dataset was built to close that gap — and to go further. Because alignment is not just about refusal. It is about teaching a model to handle adversarial manipulation at the system level, including direct attacks on its own instruction context.
|
| 65 |
|
| 66 |
---
|
| 67 |
|
| 68 |
+
## Dataset Overview
|
| 69 |
+
|
| 70 |
+
This corpus spans **eight configurations** across **two splits**, each targeting a distinct failure mode in model alignment.
|
| 71 |
|
| 72 |
+
### The `harmful` Split
|
| 73 |
|
| 74 |
+
This split contains adversarial prompts and model-generated responses representing unsafe behavior across seven configurations. Each configuration covers a different attack class or harm domain.
|
| 75 |
|
| 76 |
+
**`beavertails`**
|
| 77 |
+
Covers the canonical safety meta-categories — violence, hate speech, self-harm — drawn from one of the most widely cited safety benchmarks in the field. A principled baseline across well-defined harm taxonomies.
|
| 78 |
|
| 79 |
+
**`donot_answer`**
|
| 80 |
+
Prompts mapped to a structured AI safety evaluation framework. Best suited for benchmarking against established refusal rubrics and tracking alignment progress across model versions.
|
| 81 |
|
| 82 |
+
**`forbidden_questions`**
|
| 83 |
+
The most adversarially complex configuration. Prompts rely on fictional framing, nested hypotheticals, and philosophical edge cases — exactly where naive keyword-based safety mechanisms consistently break down.
|
| 84 |
|
| 85 |
+
**`harmfulqa`**
|
| 86 |
+
Query-style harmful inputs that closely mimic real user behavior. Risk vectors span multiple domains, making this subset particularly important for models deployed in open-ended conversational settings.
|
| 87 |
|
| 88 |
+
**`llm_redteaming`**
|
| 89 |
+
Empirical jailbreaks documented during public and academic red-teaming exercises. These are prompts that have already succeeded in the wild — your model needs to have seen them before deployment.
|
| 90 |
|
| 91 |
+
**`synthetic_harmful_prompts`**
|
| 92 |
+
Adversarially generated expansions that simulate novel, unseen attack patterns. A zero-day stress test designed to push models toward generalizing safe behavior rather than memorizing safe responses.
|
| 93 |
|
| 94 |
+
**`prompt_injection_unsafe_vllm`**
|
| 95 |
+
Targets a distinct and increasingly critical threat class: prompt injection attacks. These prompts attempt to override or hijack the model's system-level instructions through crafted user inputs — a common real-world attack vector in agentic and tool-augmented LLM deployments. Exposure to this subset is essential for any model operating in a pipeline where user input reaches the inference context alongside a system prompt.
|
| 96 |
|
| 97 |
---
|
| 98 |
|
| 99 |
+
### The `safe` Split
|
| 100 |
|
| 101 |
+
**`prompt_injection_safe_vllm`**
|
| 102 |
+
The structural counterpart to the unsafe injection configuration above. These records show the model correctly maintaining its intended behavior under injection pressure — ignoring override instructions and staying within its sanctioned boundaries. When paired with the unsafe configuration in a DPO or contrastive SFT setup, these serve as the *chosen* side of the preference pair.
|
| 103 |
|
| 104 |
+
---
|
| 105 |
|
| 106 |
+
## How to Use This Dataset
|
| 107 |
|
| 108 |
+
### Supervised Fine-Tuning (SFT)
|
| 109 |
|
| 110 |
+
Each adversarial prompt and its generated response can be paired with a curated safe response to create contrastive training examples. The model learns not just what to refuse, but how to refuse in a way that is polite, reasoned, and non-dismissive.
|
| 111 |
|
| 112 |
+
### Direct Preference Optimization (DPO)
|
| 113 |
|
| 114 |
+
The `(prompt, safety_res, model)` triplet structure maps naturally onto DPO's chosen/rejected framework. The `safety_res` field provides the baseline behavior to use as the rejected sample, paired against a human-curated or verified chosen response. For the prompt injection configurations specifically, `prompt_injection_unsafe_vllm` and `prompt_injection_safe_vllm` form a ready-made contrastive pair without any additional annotation overhead.
|
| 115 |
|
| 116 |
+
### False-Refusal Calibration
|
| 117 |
|
| 118 |
+
Over-refusal is an alignment failure too. Several configurations — particularly `forbidden_questions` and `harmfulqa` — include borderline inputs that use sensitive keywords in genuinely benign contexts. Training on these teaches a model to reason about intent, not just surface-level patterns.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 119 |
|
| 120 |
+
### Prompt Injection Robustness
|
| 121 |
|
| 122 |
+
With LLMs increasingly deployed in agentic workflows, RAG pipelines, and tool-use environments, resistance to instruction hijacking is no longer optional. The injection split pair directly addresses this training gap, which most general-purpose safety datasets ignore entirely.
|
| 123 |
|
| 124 |
---
|
| 125 |
|
| 126 |
+
## Adversarial Technique Reference
|
| 127 |
|
| 128 |
+
The prompts across all configurations cover four primary attack classes:
|
| 129 |
|
| 130 |
+
**Role-Play Frameworks**
|
| 131 |
+
Instructions that force the model into an alternate persona — developer mode, uncensored assistant, fictional AI with no restrictions. These exploit the model's instruction-following strength directly against its safety constraints.
|
| 132 |
|
| 133 |
+
**Hypothetical Contextualization**
|
| 134 |
+
Harmful requests buried inside academic thought experiments, historical framing, or fictional narratives. The surface text appears benign; the extracted information is not.
|
| 135 |
|
| 136 |
+
**Linguistic Obfuscation**
|
| 137 |
+
Multi-turn logical chains, domain jargon, and structural misdirection designed to bypass keyword filters and confuse intent classifiers. These require the model to reason about the trajectory of a conversation, not just the final message in isolation.
|
| 138 |
|
| 139 |
+
**Prompt Injection**
|
| 140 |
+
Direct attempts to override system-level instructions through adversarially crafted user inputs. Variants include goal hijacking (redirecting the model to a different task), prompt leakage (extracting the system prompt), and jailbreak injection (embedding role-play attacks inside what appears to be ordinary user data). Particularly relevant for RAG systems, tool-augmented agents, and any deployment where user input coexists with a privileged system context.
|
| 141 |
+
|
| 142 |
+
---
|
| 143 |
+
|
| 144 |
+
## Generation Pipeline
|
| 145 |
+
|
| 146 |
+
```
|
| 147 |
+
Base Model → TheBloke/Mistral-7B-Instruct-v0.2-AWQ
|
| 148 |
+
Engine → vLLM (Vectorized LLM inference framework)
|
| 149 |
+
Hardware → NVIDIA T4 GPU · 16GB VRAM · Google Colab
|
| 150 |
+
```
|
| 151 |
+
|
| 152 |
+
**Why Mistral-7B-Instruct-v0.2-AWQ?**
|
| 153 |
+
It sits at the intersection of strong instruction-following capability and accessible compute — representative of the exact model class this dataset is designed to align. Responses generated by a model in the same capability tier as the training target produce more realistic and transferable training signal than outputs from a frontier model.
|
| 154 |
+
|
| 155 |
+
**Why vLLM?**
|
| 156 |
+
Batch processing across eight heterogeneous prompt distributions requires a framework that handles dynamic context lengths without throughput collapse. vLLM's PagedAttention mechanism makes this practical on constrained hardware.
|
| 157 |
|
| 158 |
---
|
| 159 |
|
| 160 |
## Data Schema
|
| 161 |
|
| 162 |
+
Each record across all configurations contains three fields:
|
| 163 |
|
| 164 |
- **`prompt`** — The raw adversarial or harmful input instruction, unmodified from its source
|
| 165 |
+
- **`safety_res`** — The response generated by the inference model during the pipeline run
|
| 166 |
- **`model`** — The specific model variant used, enabling controlled ablation studies across response sources
|
| 167 |
|
| 168 |
---
|
| 169 |
|
| 170 |
+
## Licensing and Attribution
|
| 171 |
|
| 172 |
Upstream data portions — drawn from `BeaverTails`, `DoNotAnswer`, `HarmfulQA`, and associated red-teaming sets — retain their original licenses (CC-BY-SA 4.0, MIT, Apache 2.0). Users are responsible for compliance with each upstream source's terms.
|
| 173 |
|
|
|
|
| 175 |
|
| 176 |
---
|
| 177 |
|
| 178 |
+
> **Disclaimer:** This dataset contains explicit, toxic, and adversarial content. It is hosted exclusively to advance the science of AI safety, alignment, and defensive model training. The maintainers do not condone or encourage the execution of any harmful behaviors described within these prompts. Use only in controlled research environments.
|
|
|
|
|
|
|
|
|