Logo image
Tool-Based Data Segregation: A Prevention Strategy Against Prompt Injection in AI Agents
Conference proceeding   Peer reviewed

Tool-Based Data Segregation: A Prevention Strategy Against Prompt Injection in AI Agents

Eduardo Martins Guerra, E Gomes, Barbara Russo and P Meirelles
Software Architecture. ECSA 2026 Tracks and Workshops: Bolzano, Italy, September 7–11, 2026, Proceedings, Vol.16991, pp.296-311
Lecture Notes in Computer Science, 16991
20th European Conference on Software Architecture, ECSA 2026 (Bolzano, 07/09/2026–11/09/2026)
2027
Handle:
https://hdl.handle.net/10863/54653

Abstract

Large Language Model Tools Prompt Injection
Prompt injection attacks pose a significant security challenge for large language models (LLMs), enabling malicious instructions to override or manipulate prompt output. In this context, using structured prompts is a reliable defense mechanism. As such, mechanisms that separate data from instructions make it more difficult to carry out attacks that rely on introducing new information. This paper proposes a defense mechanism based on tools. We implemented a reference approach and tested it in different injection scenarios. We evaluated the effectiveness and token costs of different defense approaches against prompt injection attacks across multiple language models from the GPT-4.1, GPT-5, and Llama families. The experiments analyze the ability of models to prevent malicious instructions from overriding the original system behavior and measure prompt, completion, and total token usage for each configuration. The results show that attack outcomes vary considerably across models and scenarios. Tool-based approaches produced different defense behaviors and generally higher token consumption than reference scenarios. The study highlights the relationship between defense behavior and computational cost in prompt injection mitigation strategies for LLM applications.
url
https://doi.org/10.1007/978-3-032-39143-8_25View

Details

Metrics

1 Record Views
Logo image