Understand and defend against adversarial inputs that hijack model instructions — the #1 LLM security vulnerability.
Five passes over the same idea, each from a different angle. Do them in order, or jump to whichever you need.
Prompt injection is when user input overrides system instructions. Direct injection puts malicious instructions in user messages. Indirect injection hides instructions in retrieved documents or tool outputs. Defenses include input sanitization, output validation, privilege separation, and canary tokens. No defense is 100% reliable yet — defense in depth is essential.
Where this topic shows up outside its home domain: