Article

Prompt Injection Explained

Prompt injection tricks an LLM into ignoring intended rules and following attacker instructions from user input, documents, or external tools.

Common attack paths

  • Malicious user input in chat interfaces
  • Injected instructions in retrieved documents
  • Tool output contamination in agent workflows
  • Multi-step prompt chaining without policy gates

Defensive pattern

  • Strict system-policy hierarchy
  • Input sanitation and instruction detection
  • Output validation before actions execute
  • Human approval for high-risk operations
Read LLM Security