Prompt Attack Detection with LLM-as-a-Judge and Mixture-of-Models
On the map: LLM safety and security → Prompt injection and agent security
Abstract (arXiv)
Prompt attacks, including jailbreaks and prompt injections, pose a critical security risk to Large Language Model (LLM) systems. In production, guardrails must mitigate these attacks under strict low-latency constraints, resulting in a deployment gap in which lightweight classifiers and rule-based systems struggle to generalize under distribution shift, while high-capacity LLM-based judges remain too slow or costly for live enforcement. In this work, we examine whether lightweight, general-purpose LLMs can reliably serve as security judges under real-world production constraints. Through careful prompt and output design, lightweight LLMs are guided through a structured reasoning process involving explicit intent decomposition, safety-signal verification, harm assessment, and self-reflection. We evaluate our method on a curated dataset combining benign queries from real-world chatbots with adversarial prompts generated via automated red teaming (ART), covering diverse and evolving patterns. Our results show that general-purpose LLMs, such as gemini-2.0-flash-lite-001, can serve as effective low-latency judges for live guardrails. This configuration is currently deployed in production as a centralized guardrail service for public service chatbots in Singapore. We additionally evaluate a Mixture-of-Models (MoM) setting to assess whether aggregating multiple LLM judges improves prompt-attack detection performance relative to single-model judges, with only modest gains observed.
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Placed in Prompt injection and agent security, one of 12 directions in LLM safety and security. Builds on 34 of its 45 references that are in the map. First posted on arXiv 26 Mar 2026.
Builds on
34 of 45 references.
Closest ancestors · 9
Same direction, newest first
- 2025PromptArmor: Simple yet Effective Prompt Injection Defenses21 Jul
- 2024InjecGuard: Benchmarking and Mitigating Over-defense in Prompt Injection Guardrail Models30 Oct
- 2024Embedding-based classifiers can detect prompt injection attacks29 Oct
- 2024The Instruction Hierarchy: Training LLMs to Prioritize Privileged Instructions19 Apr
- 2024Automatic and Universal Prompt Injection Attacks against Large Language Models7 Mar
- 2023Tensor Trust: Interpretable Prompt Injection Attacks from an Online Game2 Nov
- 2023Formalizing and Benchmarking Prompt Injection Attacks and Defenses19 Oct
- 2023Prompt Injection attack against LLM-integrated Applications8 Jun
- 2023Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injection23 Feb
Other references · 25
- 2022Training language models to follow instructions with human feedbackcited by 15,712
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,355
- 2023Self-Refine: Iterative Refinement with Self-Feedbackcited by 3,317
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
- 2022Constitutional AI: Harmlessness from AI Feedbackcited by 2,950
- 2023A Survey on Large Language Model based Autonomous Agentscited by 2,203
- 2020DeBERTa: Decoding-enhanced BERT with Disentangled Attentioncited by 2,157
- 2023WebArena: A Realistic Web Environment for Building Autonomous Agentscited by 1,908
- 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineeringcited by 1,628
- 2023Jailbroken: How Does LLM Safety Training Fail?cited by 1,565
- 2023The Rise and Potential of Large Language Model Based Agents: A Surveycited by 1,422
13 more
- 2023Jailbreaking Black Box Large Language Models in Twenty Queriescited by 1,326
- 2023AutoDAN: Generating Stealthy Jailbreak Prompts on Aligned Large Language Modelscited by 738
- 2024WebVoyager: Building an End-to-End Web Agent with Large Multimodal Modelscited by 424
- 2024Great, Now Write an Article About That: The Crescendo Multi-Turn LLM Jailbreak Attackcited by 364
- 2023Exploiting Programmatic Behavior of LLMs: Dual-Use Through Standard Security Attackscited by 268
- 2024LLM Defenses Are Not Robust to Multi-Turn Human Jailbreaks Yetcited by 145
- 2025Qwen3Guard Technical Reportcited by 125
- 2025Agentic Large Language Models, a surveycited by 105
- 2024Multi-Turn Context Jailbreak Attack on Large Language Models From First Principlescited by 54
- 2024Leveraging the Context through Multi-Round Interactions for Jailbreaking Attackscited by 32
- 2025SoK: Evaluating Jailbreak Guardrails for Large Language Modelscited by 17
- 2024To Ensemble or Not: Assessing Majority Voting Strategies for Phishing Detection with Large Language Modelscited by 12
- 2025No Free Lunch with Guardrailscited by 10
Built on by
Citing papers per year: 2026: 1.
1 paper.
Similar, not cited
Close in wording, no citation either way
- 2026Analysis of LLMs Against Prompt Injection and Jailbreak Attacks
- 2025SecurityLingua: Efficient Defense of LLM Jailbreak Attacks via Security-Aware Prompt Compression
- 2025Breaking to Build: A Threat Model of Prompt-Based Attacks for Securing LLMs
- 2025MrGuard: A Multilingual Reasoning Guardrail for Universal LLM Safety
- 2025LlamaFirewall: An open source guardrail system for building secure AI agents
- 2024Optimization-based Prompt Injection Attack to LLM-as-a-Judge
- 2026PVDetector: Detecting Prompt Injection Attacks on Purpose-Specific LLM Agents through Policy-Violation Concept Analysis
- 2025Monitoring Decomposition Attacks in LLMs with Lightweight Sequential Monitors