You need to agree to share your Hugging Face information to access this dataset

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this dataset content.

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

  1. Loaded 13 source datasets and mapped their labels to the 3-class scheme above.
  2. Dropped all model-response columns and kept prompts only.
  3. Normalized whitespace and removed texts under 8 or over 20,000 characters.
  4. Exact deduplication across all sources on normalized text; all_sources lists every dataset a prompt appeared in.
  5. Resolved label conflicts by majority vote; ties dropped.
  6. 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.

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

Models trained or fine-tuned on nuhmanpk/prompt-sentinel

Papers for nuhmanpk/prompt-sentinel