PolicyGuard: Prompt-Configurable Semantic DLP for LLM Coding Agents
On the map: LLM agents and tool use → Agent threats, guardrails and governance
Abstract (arXiv)
AI coding agents accept free-form natural language prompts that may inadvertently contain credentials, personally identifiable information (PII), or proprietary business data. Existing data loss prevention (DLP) solutions rely on rigid regex patterns, model fine-tuning, or vendor-managed classifiers with limited customizability. We present PolicyGuard, a pre-model interception framework that classifies user prompts using an LLM guided by a natural language policy file. Our key contributions are: (1) the policy-as-prompt paradigm, where DLP classification criteria are defined entirely in a plaintext policy document editable by non-engineers without code changes or model retraining; (2) a sealed evaluation protocol with template-family-level data splits, hidden holdouts, and frozen test sets to rigorously assess generalization; and (3) a comprehensive empirical evaluation across 2,000 multilingual prompts demonstrating 96.5% effective block rate (EBR) with only 3.0% false positive rate (FPR) on a frozen test set of 927 prompts, and perfect 100% accuracy on a 217-prompt hidden holdout. Information-matched baseline experiments show that PolicyGuard's natural language format significantly outperforms equivalent content in JSON format (McNemar chi-squared = 31.58, p < 0.001) and dramatically outperforms zero-shot classification (Cohen's h = 0.915). Cross-model portability experiments demonstrate that the same policy achieves 86.4-96.5% EBR across four different LLMs without modification.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Placed in Agent threats, guardrails and governance, one of 16 directions in LLM agents and tool use. Builds on 10 of its 25 references that are in the map. First posted on arXiv 3 Aug 2026.
Builds on
10 of 25 references.
References · 10
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2023Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injectioncited by 1,339
- 2023Llama Guard: LLM-based Input-Output Safeguard for Human-AI Conversationscited by 1,124
- 2024WildGuard: Open One-Stop Moderation Tools for Safety Risks, Jailbreaks, and Refusals of LLMscited by 460
- 2024The Instruction Hierarchy: Training LLMs to Prioritize Privileged Instructionscited by 441
- 2024ShieldGemma: Generative AI Content Moderation Based on Gemmacited by 224
- 2024Signed-Prompt: A New Approach to Prevent Prompt Injection Attacks Against LLM-Integrated Applicationscited by 42
- 2025Prεεmpt: Sanitizing Sensitive Prompts for LLMscited by 12
- 2026CAPID: Context-Aware PII Detection for Question-Answering Systemscited by 3
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026Autoformalization of Agent Instructions into Policy-as-Code
- 2025Policy-Aware Generative AI for Safe, Auditable Data Access Governance
- 2026CourtGuard: A Model-Agnostic Framework for Zero-Shot Policy Adaptation in LLM Safety
- 2026PolicyGuard: A Dialogue-Grounded Sub-Agent Verifier for Policy Adherence in LLM Agents
- 2026PolicyBank: Evolving Policy Understanding for LLM Agents
- 2026From Natural Language Policies to Executable Obligations: A Verification Harness for Dependable In-Car LLM Agents
- 2026AdaGuard: An Adaptive Guard Model with User-defined Policies
- 2024Privacy Policy Analysis through Prompt Engineering for LLMs