Skip to content

Instruction Hierarchy

A principle according to which instructions at different levels have different priorities: a system prompt has higher priority than a user request, and a user request has higher priority than data within a document.

Why

This is a protection against Prompt Injection: if the text in a document says "ignore the rules," the model should understand that data is the lowest level of the hierarchy and cannot override system rules.

Levels

  1. System instructions;
  2. User request;
  3. Data and documents;
  4. Tool outputs.

See also

← All terms