CoolFace
Datasetpublic

Abdennebi/shieldlm-prompt-injection

ShieldLM Prompt Injection Dataset A unified prompt injection detection dataset with 54,162 samples spanning three attack categories: direct injection, indirect injection, and jailbreak. Curated from 11 source datasets with a 3-level hierarchical label schema. Dataset Description Purpose Training and evaluating prompt injection classifiers for production deployment. Designed to address gaps in existing datasets: Indirect injection coverage (via… See the full description on the dataset page: https://huggingface.co/datasets/Abdennebi/shieldlm-prompt-injection.

sourceHugging Facemitupdated 7mo agoView on Hugging Face
0likes59downloads
Dataset Card

ShieldLM Prompt Injection Dataset

A unified prompt injection detection dataset with 54,162 samples spanning three attack categories: direct injection, indirect injection, and jailbreak. Curated from 11 source datasets with a 3-level hierarchical label schema.

Dataset Description

Purpose

Training and evaluating prompt injection classifiers for production deployment. Designed to address gaps in existing datasets:

  • —Indirect injection coverage (via InjecAgent tool-embedded attacks)
  • —Jailbreak techniques (via TrustAIRLab in-the-wild prompts + jackhhao classification)
  • —Application-structured benign data (prevents format-based false positives)
  • —Sensitive-topic stress tests (via JailbreakBench — topics != techniques)

Statistics

MetricValue
Total samples54,162
Train / Val / Test37,913 / 8,124 / 8,125
Benign35,197 (65.0%)
Attack18,965 (35.0%)
Languages8 (en, fr, es, it, de, pt, ro, ca)
Sources11 datasets

Category breakdown:

CategoryCount%
benign35,19765.0%
direct_injection16,89331.2%
indirect_injection1,0541.9%
jailbreak1,0181.9%

Label Schema

LevelFieldValues
1 (Binary)label_binary0 (BENIGN), 1 (ATTACK)
2 (Category)label_categorybenign, directinjection, indirectinjection, jailbreak
3 (Intent)label_intentgoalhijacking, dataexfiltration, financial_harm, ...

Source Datasets

SourceLicenseCategorySamples
alespalla/chatbotinstructionpromptsApache-2.0benign (conversational)24,804
reshabhs/SPMLChatbotPrompt_InjectionCC-BY-4.0direct_injection + benign15,913
xTRam1/safe-guard-prompt-injectionApache-2.0direct_injection + benign8,118
TrustAIRLab/in-the-wild-jailbreak-promptsCC-BY-NC-SA-4.0jailbreak1,002
Harelix/Prompt-Injection-Mixed-Techniques-2024Apache-2.0direct_injection + benign987
yanismiraoui/prompt_injectionsApache-2.0direct_injection (multilingual)974
deepset/prompt-injectionsApache-2.0direct_injection + benign546
InjecAgent (UIUC)MITindirect_injection + benign1,054
jackhhao/jailbreak-classificationMITjailbreak + benign531
JailbreakBench/JBB-BehaviorsMITbenign (FP stress test)200

Note: Harelix data recovered from ahsanayub/malicious-prompts (original dataset removed from HuggingFace).

Key Design Decisions

  1. 1.JailbreakBench Goals are labeled BENIGN — they describe harmful topics, not injection techniques. Used as a false-positive stress test.
  2. 2.No isolated attacker payloads from InjecAgent — context determines injection (PromptShield insight).
  3. 3.Benign data includes application-structured samples — clean tool responses from InjecAgent prevent the classifier from learning "JSON format = attack."
  4. 4.In-the-wild jailbreaks — real DAN, persona switching, and role-play attacks collected from Reddit, Discord, and jailbreak forums.

Fields

FieldTypeDescription
idstringDeterministic unique ID: {source}_{index}_{hash}
textstringText to classify
label_binaryint0 (BENIGN) or 1 (ATTACK)
label_categorystringOne of 4 categories
label_intentstring (nullable)Fine-grained attack intent
sourcestringOrigin dataset
languagestringISO 639-1 language code
contextstring (nullable)System prompt or user instruction
metadatadictSource-specific metadata

Splits

SplitSamplesPurpose
train37,913Model training (70%)
validation8,124Threshold calibration and model selection (15%)
test8,125Final evaluation (15%)

Stratified by label_category, random seed 42.

Intended Use

  • —Training prompt injection detection classifiers
  • —Benchmarking detection systems at low-FPR operating points
  • —Research on adversarial robustness of LLM safety filters

Limitations

  • —English-dominant: >98% English; multilingual samples limited to 7 other languages
  • —Text-only: No multimodal or visual prompt injection
  • —Synthetic benign tool responses: Generated by stripping injections from InjecAgent
  • —Static benchmark: Does not capture evolving attack techniques
  • —No multi-turn: All samples are single-turn

Citation

bibtex
@software{shieldlm2026,
  author = {Milushev, Dimiter},
  title = {ShieldLM: Unified Prompt Injection Detection Dataset},
  year = {2026},
  url = {https://github.com/dvm81/shieldlm}
}

License

MIT (this curation). Source datasets retain their original licenses (see table above). Note: TrustAIRLab/in-the-wild-jailbreak-prompts uses CC-BY-NC-SA-4.0; all other sources are Apache-2.0, CC-BY-4.0, or MIT.