sleeepeer/PIArena

Dataset

5

stars

77

commits

1

linked in READMEs

Aug 31, 2026

updated

benchmark
llm-safety
prompt-injection
red-teaming
security

README

A Platform for Prompt Injection Evaluation

ProjectPage HuggingFace LeaderBoard Paper Star

PIArena is an easy-to-use toolbox and also a comprehensive benchmark for researching prompt injection attacks and defenses. It was introduced in the paper PIArena: A Platform for Prompt Injection Evaluation.

The platform provides:

  • Plug-and-play Attacks & Defenses – Easily integrate state-of-the-art defenses into your workflow to protect your LLM system against prompt injection attacks. You can also play with existing attack strategies to perform a better research.
  • Systematic Evaluation Benchmark – End-to-end evaluation pipeline enables you to easily evaluate attacks / defenses on various datasets.
  • Add Your Own – You can also easily integrate your own attack or defense into our benchmark to systematically assess how well it perform.

Dataset Statistics

DatasetTask TypeUtility MetricAvg Len#Samples
SQuAD v2 (Rajpurkar et al., 2018)Question AnsweringLLM-as-a-Judge706200
Dolly (QA) (Conover et al., 2023)Question AnsweringLLM-as-a-Judge1,062200
Dolly (Info Extraction) (Conover et al., 2023)Information ExtractionLLM-as-a-Judge1,086200
Dolly (Summarization) (Conover et al., 2023)SummarizationLLM-as-a-Judge1,567200
NQ (Kwiatkowski et al., 2019)RAGLLM-as-a-Judge5,432100
MS-MARCO (Bajaj et al., 2016)RAGLLM-as-a-Judge5,089100
HotpotQA (Yang et al., 2018)RAGLLM-as-a-Judge3,519100
HotpotQA-Long (Yang et al., 2018)Question AnsweringF1-Score17,942100
Qasper (Dasigi et al., 2021)Question AnsweringF1-Score18,523100
GovReport (Huang et al., 2021)SummarizationROUGE-L16,581100
MultiNews (Fabbri et al., 2019)SummarizationROUGE-L8,907100
PassageRetrieval (Bai et al., 2023)Information RetrievalRetrieval Score19,777100
LCC (Guo et al., 2023)Code GenerationCode Similarity12,247100
Total1,700

Data Fields

Each sample contains the following fields:

FieldDescription
target_instThe original user instruction (e.g., a question to answer or a summarization request)
contextThe clean context provided to the LLM (e.g., a document or passage)
injected_taskThe adversarial prompt injection task embedded by the attacker
target_task_answerThe ground-truth answer for the original task (used for utility evaluation)
injected_task_answerThe expected output if the injection succeeds (used for ASR evaluation)
categoryThe category of the injection attack

Usage

from datasets import load_dataset

# Load a specific subset
ds = load_dataset("sleeepeer/PIArena", "squad_v2")

# Available subsets:
# Basic QA: squad_v2, dolly_closed_qa, dolly_information_extraction, dolly_summarization
# RAG: nq_rag, hotpotqa_rag, msmarco_rag
# Long-context: hotpotqa_long, qasper_long, gov_report_long, multi_news_long, passage_retrieval_en_long, lcc_long
# Knowledge corruption: nq_rag_knowledge_corruption, hotpotqa_rag_knowledge_corruption, msmarco_rag_knowledge_corruption

Citation

@inproceedings{geng2026piarena,
  title={{PIArena}: A platform for prompt injection evaluation},
  author={Geng, Runpeng and Yin, Chenlong and Wang, Yanting and Chen, Ying and Jia, Jinyuan},
  booktitle={Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)},
  pages={33170--33192},
  year={2026}
}

Contributors

sleeepeer

76 commits

nielsr

1 commits

sleeepeer/PIArena

Dataset

5

stars

77

commits

1

linked in READMEs

Aug 31, 2026

updated

benchmark
llm-safety
prompt-injection
red-teaming
security

README

A Platform for Prompt Injection Evaluation

ProjectPage HuggingFace LeaderBoard Paper Star

PIArena is an easy-to-use toolbox and also a comprehensive benchmark for researching prompt injection attacks and defenses. It was introduced in the paper PIArena: A Platform for Prompt Injection Evaluation.

The platform provides:

  • Plug-and-play Attacks & Defenses – Easily integrate state-of-the-art defenses into your workflow to protect your LLM system against prompt injection attacks. You can also play with existing attack strategies to perform a better research.
  • Systematic Evaluation Benchmark – End-to-end evaluation pipeline enables you to easily evaluate attacks / defenses on various datasets.
  • Add Your Own – You can also easily integrate your own attack or defense into our benchmark to systematically assess how well it perform.

Dataset Statistics

DatasetTask TypeUtility MetricAvg Len#Samples
SQuAD v2 (Rajpurkar et al., 2018)Question AnsweringLLM-as-a-Judge706200
Dolly (QA) (Conover et al., 2023)Question AnsweringLLM-as-a-Judge1,062200
Dolly (Info Extraction) (Conover et al., 2023)Information ExtractionLLM-as-a-Judge1,086200
Dolly (Summarization) (Conover et al., 2023)SummarizationLLM-as-a-Judge1,567200
NQ (Kwiatkowski et al., 2019)RAGLLM-as-a-Judge5,432100
MS-MARCO (Bajaj et al., 2016)RAGLLM-as-a-Judge5,089100
HotpotQA (Yang et al., 2018)RAGLLM-as-a-Judge3,519100
HotpotQA-Long (Yang et al., 2018)Question AnsweringF1-Score17,942100
Qasper (Dasigi et al., 2021)Question AnsweringF1-Score18,523100
GovReport (Huang et al., 2021)SummarizationROUGE-L16,581100
MultiNews (Fabbri et al., 2019)SummarizationROUGE-L8,907100
PassageRetrieval (Bai et al., 2023)Information RetrievalRetrieval Score19,777100
LCC (Guo et al., 2023)Code GenerationCode Similarity12,247100
Total1,700

Data Fields

Each sample contains the following fields:

FieldDescription
target_instThe original user instruction (e.g., a question to answer or a summarization request)
contextThe clean context provided to the LLM (e.g., a document or passage)
injected_taskThe adversarial prompt injection task embedded by the attacker
target_task_answerThe ground-truth answer for the original task (used for utility evaluation)
injected_task_answerThe expected output if the injection succeeds (used for ASR evaluation)
categoryThe category of the injection attack

Usage

from datasets import load_dataset

# Load a specific subset
ds = load_dataset("sleeepeer/PIArena", "squad_v2")

# Available subsets:
# Basic QA: squad_v2, dolly_closed_qa, dolly_information_extraction, dolly_summarization
# RAG: nq_rag, hotpotqa_rag, msmarco_rag
# Long-context: hotpotqa_long, qasper_long, gov_report_long, multi_news_long, passage_retrieval_en_long, lcc_long
# Knowledge corruption: nq_rag_knowledge_corruption, hotpotqa_rag_knowledge_corruption, msmarco_rag_knowledge_corruption

Citation

@inproceedings{geng2026piarena,
  title={{PIArena}: A platform for prompt injection evaluation},
  author={Geng, Runpeng and Yin, Chenlong and Wang, Yanting and Chen, Ying and Jia, Jinyuan},
  booktitle={Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)},
  pages={33170--33192},
  year={2026}
}

Contributors

sleeepeer

76 commits

nielsr

1 commits