Prompt Injection

Category: Generative AI / LLM

A security vulnerability where malicious user input manipulates a language model into ignoring its original instructions or executing unintended behaviors.

Full Explanation

Prompt injection is an attack technique where adversarial text in the user input overrides or modifies the model system prompt or instructions. Direct prompt injection involves the user explicitly instructing the model to ignore previous instructions, while indirect prompt injection embeds malicious instructions in content the model processes (like a webpage or document). This is analogous to SQL injection in traditional software. Prompt injection can lead to data leakage (revealing the system prompt), unauthorized actions (in agent systems with tool access), and bypassing safety guardrails. Defending against prompt injection is an active research area, with approaches including input sanitization, prompt engineering for robustness, and architectural defenses like separating instruction and data channels. It is considered one of the most significant security challenges for LLM-based applications.

Related Terms

More in Generative AI / LLM

Explore More