Direct and indirect injection
Direct injection is typed straight into the chat: a visitor tells a support bot to forget its rules and reveal its configuration. Indirect injection is sneakier. The instruction sits inside content the AI fetches on its own, for example white text on a web page, a line in a PDF invoice or a sentence in an incoming email that an inbox assistant summarizes. The person using the assistant never sees it.
The danger grows with what the model is allowed to do. A chatbot that can only answer questions might say something embarrassing. An agent that can send emails, issue refunds or query a customer database could be steered into doing those things for the wrong person.
Reducing the risk
There is no single fix, because language models do not reliably separate instructions from data. Practical layers help: - Give the model the fewest tools and permissions it needs, and keep secrets out of its context. - Require human approval for actions that move money, delete data or contact customers. - Treat everything fetched from outside as untrusted, and label it clearly in the prompt. - Check outputs before they are acted on, for example that a refund matches an actual order. - Log conversations and test the system with known attack phrases before launch and after each change.
Questions, answered
Not today. Builders reduce the impact by limiting permissions, validating outputs and keeping a person in the loop for risky actions.
They overlap. A jailbreak tries to get around a model's safety rules; prompt injection more broadly makes an application follow instructions its owner never intended.