Datasets:
PromptSentinel 🛡️
A combined, cleaned and deduplicated dataset for training lightweight detectors of jailbreak and prompt-injection attempts against LLMs, built from 13 public datasets. All credit goes to their authors (see below).
⚠️ Contains real adversarial prompts, some of which include harmful requests. Intended for building defensive classifiers, guardrails and red-team evaluation. Access is gated. Model responses from source datasets were deliberately not included.
Labels
| label | id | meaning |
|---|---|---|
benign |
0 | Normal prompts, including hard negatives: role-play ("act as…"), long system prompts, adversarially-phrased but harmless requests |
jailbreak |
1 | Attempts to make the model ignore its safety rules (DAN, persona tricks, hypothetical framing, obfuscation…) |
injection |
2 | Attempts to override the developer's or system instructions ("ignore previous instructions and…") |
Direct harmful requests without any trick are labelled benign for attack type: that's a content-moderation
problem, not a jailbreak. Where the source provides it, the harmful column flags them, so you can train both tasks.
Stats
156,802 unique prompts: benign 90,175 · jailbreak 1,766 · injection 64,861
| split | rows | benign | jailbreak | injection |
|---|---|---|---|---|
| train | 116,854 | 66,024 | 1,019 | 49,811 |
| validation | 14,335 | 8,168 | 111 | 6,056 |
| test | 14,592 | 8,266 | 134 | 6,192 |
How it was built
- Loaded 13 source datasets and mapped their labels to the 3-class scheme above.
- Dropped all model-response columns and kept prompts only.
- Normalized whitespace and removed texts under 8 or over 20,000 characters.
- Exact deduplication across all sources on normalized text;
all_sourceslists every dataset a prompt appeared in. - Resolved label conflicts by majority vote; ties dropped.
- Split by template family (hash of the normalized first 200 characters), so variants of the same jailbreak template (e.g. DAN versions) never leak between train and test.
Columns
id, text, label, label_id, is_attack, harmful (bool or null), source_dataset, all_sources,
source_config, source_split, source_license, source_url, n_chars, template_group
from datasets import load_dataset
ds = load_dataset("nuhmanpk/prompt-sentinel")
Credits & sources
This dataset is a compilation. All prompts come from the datasets below; please cite and credit the original authors.
| Dataset | Author | License | Rows used | Papers | Contribution |
|---|---|---|---|---|---|
| TrustAIRLab/in-the-wild-jailbreak-prompts | TrustAIRLab | mit | 14,040 | train | arXiv:2308.03825 |
| lmsys/toxic-chat | lmsys | cc-by-nc-4.0 | 9,516 | train | arXiv:2310.17389 |
| jackhhao/jailbreak-classification | jackhhao | apache-2.0 | 636 | train | — |
| reshabhs/SPML_Chatbot_Prompt_Injection | reshabhs | mit | 15,910 | train | arXiv:2402.11755 |
| jayavibhav/prompt-injection | jayavibhav | unspecified | 79,673 | train | — |
| S-Labs/prompt-injection-dataset | S-Labs | mit | 15,095 | train | — |
| neuralchemy/Prompt-injection-dataset | neuralchemy | apache-2.0 | 5,925 | train | — |
| Lakera/gandalf_ignore_instructions | Lakera | mit | 996 | train | arXiv:2501.07927 |
| fka/awesome-chatgpt-prompts | fka | cc0-1.0 | 1,970 | train | — |
| OpenAssistant/oasst2 | OpenAssistant | apache-2.0 | 5,255 | train | arXiv:2304.07327 |
| leolee99/NotInject | leolee99 | mit | 255 | benchmark | arXiv:2410.22770 |
| deepset/prompt-injections | deepset | apache-2.0 | 503 | benchmark | — |
| xTRam1/safe-guard-prompt-injection | xTRam1 | unspecified | 7,028 | benchmark | arXiv:2402.13064 |
Licenses were read from each dataset's Hub metadata. Some sources are non-commercial or share-alike, and each row's
source_license tells you which terms apply. Filter by it if you need a commercially usable subset.
Sources attempted but not included in this build: allenai/wildjailbreak, allenai/wildguardmix, hackaprompt/hackaprompt-dataset, qualifire/prompt-injections-benchmark, allenai/wildguardmix
Limitations
- Label schemes differ between sources; mapping to 3 classes involves judgment calls (documented in the build notebook).
- Mostly English (some German via deepset/prompt-injections).
- Near-duplicate variants beyond the template-family grouping may remain.
- Jailbreak techniques evolve fast, so detectors trained on this will miss novel attacks. Refresh periodically.
Author
Compiled by Nuhman PK: 🤗 Hugging Face · 💻 GitHub · 📊 Kaggle · 💼 LinkedIn · 🐦 X · ✍️ Medium
v2
load_dataset("nuhmanpk/prompt-sentinel", "v2") adds, on top of the original rows: obfuscated attacks (base64, ROT13, leetspeak, homoglyphs, spacing, reversal, zero-width, Unicode-tag smuggling) with benign encoded controls, trigger-word benign prompts against over-defense, and indirect injections planted in documents (context column) with clean twins. augmentation names the transform. Training rows that collide with public benchmarks (deepset, xTRam1, jackhhao, NotInject, WildJailbreak eval, Qualifire) were removed. Counts: train 80,949 · validation 14,335 · test 18,592. Used to train Gatekeeper.
- Downloads last month
- 74