OET: Optimization-based prompt injection Evaluation Toolkit

Jinsheng Pan, Xiaogeng Liu, Chaowei Xiao
5/1/2025
cs.CRcs.AI

No official code found. Best implementation: SaFo-Lab/OET (11 stars, MIT, last commit 2025-05-05).

Abstract

Large Language Models (LLMs) have demonstrated remarkable capabilities in natural language understanding and generation, enabling their widespread adoption across various domains. However, their susceptibility to prompt injection attacks poses significant security risks, as adversarial inputs can manipulate model behavior and override intended instructions. Despite numerous defense strategies, a standardized framework to rigorously evaluate their effectiveness, especially under adaptive adversarial scenarios, is lacking. To address this gap, we introduce OET, an optimization-based evaluation toolkit that systematically benchmarks prompt injection attacks and defenses across diverse datasets using an adaptive testing framework. Our toolkit features a modular workflow that facilitates adversarial string generation, dynamic attack execution, and comprehensive result analysis, offering a unified platform for assessing adversarial robustness. Crucially, the adaptive testing framework leverages optimization methods with both white-box and black-box access to generate worst-case adversarial examples, thereby enabling strict red-teaming evaluations. Extensive experiments underscore the limitations of current defense mechanisms, with some models remaining susceptible even after implementing security enhancements.

View on arXivView PDF

Code Implementations(1)

SaFo-Lab/OETCommunity100%
MIT
111Shell, PythonApr 7, 20251 years agoMIT

Similar Papers

Cite this paper

@article{pan2025oet,
  title  = {OET: Optimization-based prompt injection Evaluation Toolkit},
  author = {Jinsheng Pan and Xiaogeng Liu and Chaowei Xiao},
  year   = {2025},
  eprint = {2505.00843},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2505.00843v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2505.00843.svg)](https://codeofpaper.com/paper/2505.00843)

Discussion