Download PDFOpen PDF in browser

LLM-SHIELD: A Practical Security Architecture for RAG-Based LLM Systems

EasyChair Preprint 16037

23 pages•Date: December 3, 2026

Abstract

Organizations need fast, accurate information extracted from diverse sources, such as legal documents, financial records, invoices, and policies. Natural language processing (NLP) techniques help, but deploying them in production can be costly. Large Language Models (LLMs) lower costs with pay-as-you-go access, yet they struggle to specialize, make errors, and have knowledge gaps. Retrieval-augmented generation (RAG) grounds a model in curated context to improve accuracy, but it brings security risks, including jailbreaks, prompt injection, and accidental exposure of personally identifiable information (PII). We propose LLM-SHIELD, a defense-in-depth architecture for customer-facing and employee-facing RAG assistants that combines an input classifier, identity-based access control, multi-stage PII redaction, and defensive system prompts. We evaluated the input classifier in 60,800 trials spanning two language models, two deployment sides, four system-prompt lengths, two classifier sizes, and 12 guard configurations. Llama-Prompt-Guard-2-86M blocked 97.22% of 14,976 trials built from 78 public jailbreak templates, with a 0.47% false-positive rate on 214 domain-specific benign prompts. Against 25 novel attacks written for this study, it blocked only 2.33% of 4,800 trials, and 36.54% of those trials ended in unauthorized disclosure of synthetic tenant, client, or staff data. Seventeen of the 25 novel attacks contained no instruction override; they were ordinary requests for data the user was not entitled to see. Longer system prompts did not reduce disclosure, and the smaller 22M classifier gave up substantial recall to save a few milliseconds. Prompt classifiers recognize familiar jailbreak patterns well, but they cannot replace authorization controls, because an unauthorized request need not contain malicious wording.

Keyphrases: Defense-in-Depth Architecture, Identity-Based Access Control, Input Classifiers, Jailbreak Detection, LLM Guardrails, Llama-Prompt-Guard, PII Redaction, Prompt injection, Retrieval-Augmented Generation Security, Unauthorized Data Disclosure, jailbreak classifiers, large language models

BibTeX entry
BibTeX does not have the right entry for preprints. This is a hack for producing the correct reference:
@booklet{EasyChair:16037,
  author    = {Anthony Mora and Jayden Alonzo-Estrada and Ram Basnet},
  title     = {LLM-SHIELD: A Practical Security Architecture for RAG-Based LLM Systems},
  howpublished = {EasyChair Preprint 16037},
  year      = {EasyChair, 2026}}
Download PDFOpen PDF in browser