HASZB_AIHASZB_AI

Search across courses, lessons, glossary terms, prompts and tools.

safety

Prompt injection

In one sentence

An attack where instructions hidden in content the model reads are followed as if they came from the user.

In more depth

A model processes its instructions and the content it is given as one stream of text. If a web page, email or document contains "ignore your instructions and…", a naive system may obey.

The risk grows sharply with agents, because an injected instruction can reach real tools. The defences are architectural: treat retrieved content as untrusted data, restrict what tools can do, and require human approval for consequential actions.