Applied Sciences

Securing Locally Deployed LLM-RAG Assistants: A Cross-Model and Cross-Lingual Evaluation of Indirect Prompt Injection Defenses

Sofia Gonzalez-Sancho, Tom Ferrasse, Maria-Dolores Cano

Key points

From the paper's conclusion
  • These findings support independent security enforcement while highlighting retrieval effects, security–utility trade-offs, and limitations of the controlled synthetic setting.

Abstract

Retrieval-Augmented Generation (RAG) exposes locally deployed Large Language Model (LLM) assistants to indirect prompt injection through untrusted documents. This study evaluates four attack families—instruction override, context contamination, tool abuse, and simulated data exfiltration—across five defense configurations (C1–C5) and four local LLMs, using a synthetic corpus of 40 documents and 32 queries. A complementary Spanish–English 2 × 2 experiment with a common multilingual retriever examines cross-lingual attack behavior. In the original Llama 3.1 8B experiment, conditional Attack Success Rate (ASR) decreased from 70.4% without defenses (C1) to 22.2% with deterministic post-generation filtering (C5). Across the four models, C5 achieved post-filter ASRs of 7.4–22.2%, with no observed consequential tool misuse or concrete synthetic-data leakage, although Answer Utility ranged from 21.9% to 62.5%. Across the four Spanish–English language conditions, C5 post-filter ASR ranged from 14.3% to 40.7%; in the English–English condition, the Spanish-calibrated filter did not remove English override phrases or disclosure structures, and C5 did not improve on the model-enforced defense C4. Because the filter and automatic evaluator share some detection indicators, post-filter ASR reflects unsafe content remaining in delivered responses rather than intrinsic model resistance. All automatic labels were validated through adjudication, bilingual re-labeling, and a blind semantic review of pre- and post-filter responses. Context contamination remained the main residual weakness. These findings support independent security enforcement while highlighting retrieval effects, security–utility trade-offs, and limitations of the controlled synthetic setting.

Read the paper

Discussion

Science Skim's AI key points, plus readers' public thoughts

Readers' thoughts

No reader thoughts yet.

Related papers

Securing Locally Deployed LLM-RAG Assistants: A Cross-Model and Cross-Lingual Evaluation of Indirect Prompt Injection Defenses — Science Skim