Skip to content

Dataset · S-Labs

Dataset for prompt injection detection in LLM queries

S-Labs/prompt-injection-dataset

A dataset for binary classification of user prompts into safe and malicious (prompt injection).

What's inside

Includes between 10,000 and 100,000 English text examples divided into two classes: standard legitimate queries (0) and prompt injection attempts (1). The dataset is specifically prepared for training compact encoder models acting as a safety filter before the main language model.

What you can do with it

  • Training fast filter classifiers (BERT, RoBERTa, DistilBERT) to protect LLM applications
  • Testing security systems and guardrail solutions for robustness against attacks
  • Analyzing patterns and formulations of user prompt injections
Tasks
Text classification
Languages
English
Size
10K–100K rows
Downloads this month
1.4K
Likes
16

Models trained on it

How to load it

from datasets import load_dataset

ds = load_dataset("S-Labs/prompt-injection-dataset")