Safety & Alignment

Prompt Injection

Attack where untrusted input overrides the developer's intended model instructions.

Definition

Prompt injection slips malicious instructions into user inputs, retrieved documents, or tool outputs — instructing the model to ignore its system prompt, leak data, or take harmful actions. Defences include input filtering, output validation and least-privilege tool design; no defence is bullet-proof.

Common use cases

  • Threat modelling
  • Red-team testing
  • Input sanitisation

Related terms

    Prompt Injection — AI Glossary | Railwail