Datasets:
Download README.md from tavialiu/CAD-data: direct link, hf CLI and curl.
- Browser
- Download file 3.25 kB
-
https://huggingface.co/datasets/tavialiu/CAD-data/resolve/main/README.md
- Command line
-
hf download hf://datasets/tavialiu/CAD-data/README.md
-
curl -L -o README.md https://huggingface.co/datasets/tavialiu/CAD-data/resolve/main/README.md
license: cc-by-4.0
language:
- en
pretty_name: CAD Data
task_categories:
- text-classification
tags:
- prompt-injection
- indirect-prompt-injection
- agent-security
- agentdojo
size_categories:
- 1K<n<10K
CAD Data
Sentence-annotated indirect prompt injection data used to train and evaluate CAD, from Robust Context-Aware Detection of Malicious Instructions in Text (Liu, Ma, and Vorobeychik, 2026).
Code: https://github.com/tavia-liu/CAD · Models: https://huggingface.co/tavialiu/CAD-models
Each record pairs a user query with a tool-returned document into which an injection task
has been inserted. Records are built from the AgentDojo banking, slack, and travel suites.
Contents
| File | Description | Records |
|---|---|---|
training_data_original.tar.gz |
Training set | 1,080 |
testing_data_original.tar.gz |
Test set (AgentDojo v1.2.2) | 389 |
training_data_paraphrased.tar.gz |
Paraphrased injections of the training set, used for LLM-paraphrase adversarial training | 3,376 |
Each archive extracts to a folder of the same name containing one JSON file per record.
Fields
| Field | Description |
|---|---|
user |
User query given to the agent |
data |
Clean tool-returned document |
injected |
Document with the injection inserted (original train and test) |
injection |
Injected instruction text |
user_task_id, injection_task_id |
AgentDojo task identifiers |
sentence_segments |
The attacked document split into numbered sentence units ([i] ...) |
injection_span_unit |
Inclusive start/end indices of the injected units |
injection_span_char |
Character span of the injection (test set) |
total_units |
Number of sentence units |
suite_name |
Suite name (test set) |
style |
Paraphrase style (paraphrased set) |
source_file |
Original training record the paraphrase was derived from (paraphrased set) |
Sentence-level labels: a unit i is malicious if start <= i <= end in injection_span_unit,
and benign otherwise.
Paraphrase styles: authority_citation, code_comment, conditional_note, error_recovery,
fake_dialogue, fluent_prose, step_by_step. Each paraphrased record keeps the user query
and clean data of its source record and replaces only the injection text.
Usage
From the root of the CAD repository:
hf download tavialiu/CAD-data --repo-type dataset --local-dir data
for f in data/*.tar.gz; do tar -xzf "$f" -C data; done
Utility and attack success
Records are static. Task utility and attack success are measured by running the agent in
AgentDojo, whose per-task utility and security checks serve as the oracles. The benchmark
code used in the paper is included in the CAD repository under third_party/AutoDojo/.
License
Released under CC BY 4.0. Documents, user tasks, and injection tasks are derived from AgentDojo (MIT). Please also cite AgentDojo when using this data.
Citation
@article{liu2026cad,
title = {Robust Context-Aware Detection of Malicious Instructions in Text},
author = {Liu, Buzhao and Ma, Xinhang and Vorobeychik, Yevgeniy},
journal = {arXiv preprint},
year = {2026}
}