Prompt injection is an attack in which text the model reads contains instructions the developer did not intend, and the model follows them. Direct injection comes from the user. Indirect injection hides in content the system fetches, such as a web page, an email, a retrieved document or a tool result. Because models do not reliably separate instructions from data, no prompt wording fully prevents it.
Defences are layered: keep untrusted text marked as data, validate inputs and outputs, limit which tools an agent may call and with what permissions, and require approval for risky actions. These guides explain how injection works with examples, then cover secure prompt design, input validation, guardrails, RAG security, red teaming and defending AI agents.
The library lists all guides with filters for topic, level, category and reading time.