Data protection and security

Prompt injection

  • Data protection and security

Definition

An attack where hidden or malicious instructions trick an AI system into ignoring its original rules.

Example

A retrieved webpage contains instructions telling an assistant to ignore the user's question. Those instructions are untrusted page content.

See how it works

  1. User gives a legitimate task
  2. System reads external content
  3. External content includes hostile instructions
  4. Assistant must treat those instructions as untrusted data

Check your understanding

Common mistake: Instructions hidden in documents or tool results should not gain the authority of the user or system.

Is text in a retrieved article automatically an instruction for the assistant?

Show explanation

No. It is source content to be interpreted for the user's task, not a higher-priority command.

For your role

Choose your role to see what this term means in your work.

Why it matters

It can make AI tools leak data or take unwanted actions.

Where it is used

AI security reviews and assistant testing.