Prompt Injections
Prompt injections in seven languages, to help train and evaluate detectors that keep LLM applications under control.
6,250 labelled rows (4,195 injections, 2,055 benign) with the technique, the language and a train/test split. It is the successor to yanismiraoui/prompt_injections: every unique row of that dataset is included, now labelled, alongside new ones.
Try a small detector trained on it in your browser: Is it a prompt injection?
from datasets import load_dataset
ds = load_dataset("yanismiraoui/prompt_injections_v2") # train / test
What's new compared with prompt_injections
- Benign look-alikes. A detector needs negatives that look like attacks: requests that say "ignore", "instructions", "system" or "mode" innocently, questions about prompt injection, harmless role-play, and emails or documents with instructions meant for a human. Without them, a classifier learns to flag keywords.
- Indirect and agentic attacks. Instructions hidden in emails, web pages, reviews, tickets, code comments and tool output; data exfiltration through markdown links; agents nudged into tool calls nobody asked for.
- Labels. Every row has
label(1 injection, 0 benign),techniqueandlanguage. - Romanian now has real coverage, and every language has every technique.
- Cleaner. Duplicates and near-duplicates removed; the split is stratified by label, technique and language.
Structure
| column | meaning |
|---|---|
text |
the prompt or document |
label |
1 = prompt injection, 0 = benign |
technique |
how the injection works, or which kind of benign text it is |
language |
en, fr, de, es, pt, it or ro |
source |
v1 for the 962 rows that come from yanismiraoui/prompt_injections, v2 for rows new in this dataset |
Split: 5,301 train · 949 test.
Techniques and categories
| value | what it covers | rows |
|---|---|---|
instruction_override |
tells the assistant to ignore, forget or override its previous instructions, rules or system prompt and follow new ones instead | 842 |
prompt_leaking |
tries to make the assistant reveal its system prompt, hidden instructions, configuration, tools list or initial message | 708 |
mode_switching |
claims to switch the assistant into a special mode (developer, debug, admin, maintenance, god mode, test mode) where its rules no longer apply | 385 |
role_play_jailbreak |
asks the assistant to become an unrestricted persona or character with no rules (DAN-style), so it will drop its guidelines | 359 |
ordinary |
benign: a normal everyday request to an assistant: writing, coding, maths, travel, cooking, health information, shopping, studying, work email | 350 |
data_exfiltration |
tries to make the assistant leak the conversation, user data or secrets to an outside party, e.g. by rendering a markdown image or link to an attacker URL with the data in the query string | 349 |
benign_roleplay |
benign: a legitimate creative role-play, persona or game request (tell a story as a pirate, act as an interviewer, play a text adventure) that does not ask the assistant to drop its rules or reveal anything | 349 |
security_discussion |
benign: a question or note ABOUT prompt injection, jailbreaks or LLM security (how they work, how to defend, a research summary, a policy) that does not itself try to attack the assistant | 347 |
delimiter_attack |
fakes the end of the conversation or a new system message using markup, role tags, JSON or separators (e.g. '', '### SYSTEM:', '{"role": "system"}') to smuggle new instructions | 342 |
benign_trigger_words |
benign: a harmless message or document that naturally uses words often seen in attacks — system, mode, developer, admin, override, instructions, ignore, reveal, prompt, previous, configuration, pwned (as gaming slang) — and/or contains ordinary links and emails on example.com or .example domains, for example an IT ticket about switching a laptop to dark mode, a game chat saying someone got pwned, or a newsletter with links | 342 |
benign_document |
benign: realistic third-party content (email, web page, review, ticket, code comment, meeting notes) that contains imperative instructions meant for a HUMAN reader, e.g. 'please ignore my previous email', 'disregard the old address', 'do not reply to this message' | 341 |
benign_lookalike |
benign: an ordinary, harmless request that happens to use words like ignore, forget, instructions, rules, system, prompt, override, mode, pretend, reveal, previous, admin or developer in their everyday sense | 326 |
indirect_injection |
hides instructions aimed at an AI assistant inside content the assistant will process for someone else: an email, a web page, a product review, a PDF/document excerpt, a calendar invite, a support ticket, a code comment or a README | 309 |
refusal_suppression |
forbids the assistant from refusing, apologising, warning or mentioning its policies, to pressure it into compliance | 300 |
obfuscation |
hides an injection from filters: base64 or hex encoding, leetspeak, letters separated by spaces or dots, homoglyphs, splitting the payload across variables, asking to translate or decode then obey, or reversed text | 292 |
tool_hijacking |
tries to make an AI agent call a tool or take an action the user never asked for: send an email, delete files, transfer money, change settings, run a command, approve a request | 258 |
other |
original rows with no single clear technique | 51 |
Languages
English 1,099 · French 900 · Spanish 892 · Italian 887 · Portuguese 874 · German 873 · Romanian 725
Considerations for using the data
Prompts to handle with care
This dataset contains prompts meant to mislead or jailbreak LLMs. Its purpose is to help build and evaluate defences. Attack payloads are harmless or simulated by design (revealing a system prompt, printing a canary phrase, sending data to a placeholder .example domain, calling a fictional tool).
Limitations
- Rows are labelled on their own, without the system prompt or task around them, and some cases are genuinely context-dependent. In two manual reviews of 154 rows in all (22 per language, every category), the reviewer agreed with the label on 152 and found about 1 in 10 borderline: short "refusal suppression" lines and "tool hijacking" requests that only become attacks depending on where they appear.
- A few attack rows ask for generic sensitive things (how to bypass AI safeguards, database access without authentication), with no harmful detail.
- Injections mention attacker-style URLs more often than benign rows do (13% against 3% mention an
.exampledomain), so a detector can partly lean on that cue.
Checks run before release
- No empty rows, no invalid labels, no text in both train and test; 4 of 949 test rows have a near-twin (≥ 0.8 character 4-gram overlap) in train.
- No secrets, phone numbers, real email addresses or card numbers; emails use
example.comand links use reserved.exampledomains. - Every base64, base32, hex and binary payload in the obfuscation rows decodes to readable text.
Baseline
A character n-gram logistic regression trained on train scores 92.8% accuracy, 0.946 F1 and 0.977 ROC AUC on test; per-technique and per-language results are in the Space. It is a floor, not a target.