AI engineering glossary · Prompt context engineering
What is instruction hierarchy?
Instruction hierarchy: A defined order of trust among the instruction sources a model sees, typically system or developer rules first, then the user, then content from tools or documents. Training models to follow it helps them ignore commands hidden in lower-trust text.
Instruction hierarchy: an example
If a web page fetched by a tool says 'ignore your rules', the model treats it as data, not an order.
Related terms
More Prompt context engineering terms
- Instructor library
- JSON mode
- Least-to-most prompting
- Logit bias
- Logprobs
- Long-context prompting
- Lost in the middle
- Maieutic prompting
Where you learn it
Instruction hierarchy is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.