extract 0 0 0

edithngalame/prompt-injection-en-es

published by @edithngalame

Alignment dataset tracked in the /datasets sub-catalog.

Lifetime downloads
150
Last 30 days
150
Likes
-
Size
3.3 MB
Created on HF
2026-09-27
Age
24 days ago

Description

Prompt Injection EN-ES

A multilingual (English + Spanish) dataset for detecting prompt injection: text that tries to make an AI system follow an attacker's instructions instead of its owner's. It covers direct attacks typed by users and indirect attacks hidden in documents such as emails.

Built for the [LLM Security Gateway project. 18,312 rows, 5,619 injections and 12,693 benign.

What makes it different

Source-aware: every row says where the text entered the… See the full description on the dataset page: https://huggingface.co/datasets/edithngalame/prompt-injection-en-es.

Tags

task_categories:text-classificationlanguage:delanguage:enlanguage:eslanguage:frlanguage:itlanguage:ptlicense:othersize_categories:10K<n<100Kformat:parquetmodality:textlibrary:datasetslibrary:pandaslibrary:polarslibrary:mlcroissantregion:usprompt-injectionllm-securityai-securityjailbreakmultilingualspanish

README current version from Hugging Face


license: other
license_name: mixed-per-row
license_link: https://huggingface.co/datasets/edithngalame/prompt-injection-en-es#sources-and-licences
language:

  • de
  • en
  • es
  • fr
  • it
  • pt
    task_categories:
  • text-classification
    tags:
  • prompt-injection
  • llm-security
  • ai-security
  • jailbreak
  • multilingual
  • spanish
    pretty_name: Prompt Injection EN-ES (LLM Security Gateway v0.2.1)
    size_categories:
  • 10K<n<100K

Prompt Injection EN-ES

A multilingual (English + Spanish) dataset for detecting prompt injection: text that tries to make an AI system follow an attacker's instructions instead of its owner's. It covers direct attacks typed by users and indirect attacks hidden in documents such as emails.

Built for the [LLM Security Gateway project. 18,312 rows, 5,619 injections and 12,693 benign.

What makes it different

  • Source-aware: every row says where the text entered the AI's context: typed by the user or inside a retrieved document.
  • Spanish, including a small human-translated test set, not only machine translation.
  • Shortcut fixes, measured: two patterns that would let a model cheat were found and corrected (see below).
  • Held-out evaluation sets for attack styles and languages never seen in training.
  • Leakage-checked: no text appears in more than one split, translations always share the split of their English original, and every version of an email (attacked, clean, harmless) stays in one split.

Labels

  • 1 injection: text trying to make the AI follow the author's instructions instead of its owner's (override rules, extract hidden instructions, hijack actions, manipulate answers).
  • 0 benign: everything else, including hard benign text that talks about rules, instructions or AI without trying to hijack it.

Fields

Field Description
text The message or document
label 1 = injection, 0 = benign
source user (typed into the chat) or retrieved (inside a document the AI reads)
lang Language code
family Attack or text family (e.g. gandalf, jailbreak_roleplay, bipia_*, hard_benign)
origin Dataset the row came from, marked (MT-es: opus-mt-en-es) when machine-translated
license Licence of the original source for this row

Splits

Split Rows Injection Benign Purpose
train 13,328 3,800 9,528 Training data.
validation 1,881 686 1,195 For choosing thresholds and checkpoints. Never report final results on it.
test 2,041 297 1,744 Main test set, same distribution as training.
test_heldout 642 642 0 Emails with attack instructions from BIPIA's test list: attack styles never seen in training.
test_native_es 32 26 6 Human-translated and adapted Spanish test set, written by a Spanish speaker. Never used for training.
test_other_lang 319 127 192 German, French, Italian and Portuguese texts: a cross-language test.
eval_handwritten 69 41 28 Hand-written demo and red-team messages from the project repository.

Shortcut fixes

  • Spanish texts in training that are injections: 21% (5,785 rows). Before the fix: under 1%, which would teach "Spanish = safe".
  • Email-shaped texts in training that are injections: 61% (1,086 rows). Before the fix: 96%, which would teach "email = attack". Still above the overall rate, so false positives on harmless emails are measured separately.

Sources and licences

Source Licence Used for
deepset/prompt-injections Apache-2.0 direct attacks + harmless
Lakera/gandalf_ignore_instructions MIT direct attacks from Gandalf players
jackhhao/jailbreak-classification Apache-2.0 role-play jailbreaks + harmless
microsoft/BIPIA (email part) MIT indirect attacks inserted into emails
argilla/databricks-dolly-15k-curated-multilingual CC-BY-SA-3.0 harmless questions and documents, EN + ES
Helsinki-NLP/opus-mt-en-es Apache-2.0 machine translation to Spanish

Licensing is mixed and recorded per row in the license column. Rows derived from Dolly carry CC-BY-SA-3.0 (share-alike); rows from the other sources carry their original permissive licences. Respect each row's licence when reusing it.

How it was built

Reproducible Colab notebooks in the project repository:

  1. 01_collect_sources: download, normalise, detect language, deduplicate, drop texts labelled both ways
  2. 02_splits_and_spanish: group-aware splits before augmentation, Spanish translation of attacks and matching benign texts, harmless email inserts, leakage check
  3. 04_dataset_card_and_publish: this card

Known limitations

  • Most Spanish text is machine-translated. The human-translated test set is small (32 rows) and translated from English rather than written from scratch.
  • Indirect attacks come from one source (BIPIA emails) and reuse a limited set of attack instructions. Other document types (web pages, PDFs) are only covered by the hand-written sets.
  • No tool-output or MCP tool-description attacks yet. The gateway handles tool risk through permissions and taint tracking instead (v0.4).
  • Language labels for some rows are automatic (langid) and can be wrong for very short texts.
  • Harmless email sentences come from fixed lists: 36 for training, 12 for validation and 12 for test, with no overlap. Real harmless emails are far more varied.
  • Residual email bias: email-shaped texts are still more often injections than average.
  • The benign side is mostly general questions and encyclopedic text; real application traffic will differ.

Intended use

Training and evaluating prompt-injection detectors, especially multilingual and source-aware ones. Not intended as a complete security solution: detection should be combined with least-privilege design for AI agents.

Changelog

  • v0.2.1: validation now contains emails (20% of BIPIA's training emails, moved as whole emails). In v0.2 it had none, so thresholds tuned on it blocked about 9% of harmless test emails. Harmless email sentences are now split into separate train / validation / test lists (v0.2 reused the same 25 in every split, and a baseline memorised them).
  • v0.2: first release. Still available: load_dataset("edithngalame/prompt-injection-en-es", revision="v0.2").

Citation

@misc{ngalame2026promptinjectionenes,
  title  = {Prompt Injection EN-ES: a source-aware multilingual prompt injection dataset},
  author = {Ngalame Atechkeng, Edith Dione},
  year   = {2026},
  url    = {https://huggingface.co/datasets/edithngalame/prompt-injection-en-es}
}

README history 6 revisions

Every night we snapshot the README of every dataset in the catalog. When the SHA changes we archive the new version and diff it against the last. This is the evolving thought record of the alignment-data field: what the author decided to say about the corpus, and how that framing shifted over time.

  1. 2026-10-10Update README.md3e7180f7.1 KB
    Loading...
  2. 2026-09-27Card v0.2.1bb574ea7.1 KB
    Loading...
  3. 2026-09-27Dataset v0.2.13945e717.6 KB
    Loading...
  4. 2026-09-27Upload README.md with huggingface_hubecf3ffd6.4 KB
    Loading...
  5. 2026-09-27Upload datasetae9fd841.2 KB
    Loading...
  6. 2026-09-27initial commit33ca8d00 B
    Loading...

Used by abliterated models none yet

No abliterated models in our catalog have declared this dataset in their YAML metadata yet. This can mean the dataset is used but not declared, is used outside abliteration workflows, or is new. The link will populate automatically as models are indexed.

Community discussions 1 thread · 1 open · 1 comments

Threads posted by the community on Hugging Face: bug reports, questions about usage, pull requests on the README, license clarifications. Click any thread to expand and read the full conversation inline. Newest first.

  1. 2026-09-28[bot] Conversion to Parquetopen1 💬#1
    Loading...

Related datasets same stage · extract

Read further

Metadata

License
other

Download the dataset

0

Copy any of these snippets into your notebook or terminal. All three fetch directly from Hugging Face using your own credentials.

Recommended: datasets library (Python)
from datasets import load_dataset
ds = load_dataset("edithngalame/prompt-injection-en-es")
Raw snapshot (Python)
from huggingface_hub import snapshot_download
snapshot_download(repo_id="edithngalame/prompt-injection-en-es", repo_type="dataset")
git clone (requires git-lfs)
git clone https://huggingface.co/datasets/edithngalame/prompt-injection-en-es
Catalog is the map. Apps are the tools.

Run models on your own machine, not in the cloud.

Every model page has an "Open in Abliteration" button that hands the model directly to the first-party desktop client, at the quantization your rig can actually run. No API keys, no subscription, no prompt leakage.

Open in Abliteration