Abstract
Prompt injection remains one of the most practical threats to large language model (LLM) applications. This paper presents a lightweight approach to prompt-injection detection, moving from centroid-based embedding classification toward a hybrid guardrail. We introduce Guardrailer v1, a dataset of 722,842 prompts, and show that a simple embedding-centroid classifier already captures a large share of injections, while a hybrid guardrail combining complementary signals improves robustness at low overhead. The method is designed to run close to the model with minimal latency, making it suitable for production guardrails.
Files
PDF
PAPER.pdf
1.2 MB
Download
PAPER.pdf · 1.2 MB
Open full-screen ↗
Software
- Language
- Python
- Development status
- Active
References
- Greshake, K. et al. Not what you've signed up for: Compromising Real-World LLM-Integrated Applications. (2023)
- Perez, F. & Ribeiro, I. Ignore This Title and HackAPrompt: Exposing Systemic Weaknesses of LLMs Through a Global Prompt Injection Competition. (2023)
- Schneider, J. et al. Prompt Injection Attacks and Defenses in LLM-Integrated Applications. (2023)