All terms

Glossary

Prompt injection

An attack that hides instructions inside data a language model processes, so it does something other than intended.

Language models do not reliably distinguish instruction from content. If a processed document contains the sentence to ignore all previous instructions, that can work, especially when the model is allowed to call tools.

It becomes dangerous where three things meet: foreign content, tools with write access, and access to confidential data.

How you notice it

  • A model processes content from outside, such as emails or web pages.
  • It may call tools that write or send.
  • Confidential data sits in the same context.

Frequently asked

Can I prevent prompt injection with a filter?

Not reliably. Filters catch known patterns and fail on new phrasings. What works is architecture: permissions per tool as narrow as possible, no write access without human confirmation, and the assumption that every processed text may be hostile.