System Prompt
Instructions given to a model before the user's message that set its role, constraints and behaviour.
Reviewed May 7, 2026
What it is
A system prompt is a high-priority instruction block used in chat and API products. It typically defines the assistant's role, tone, boundaries and output format. In agent systems it may also describe available tools and when to use them.
Why it matters
System prompts create consistency across users. They are also a security boundary: untrusted text in a user message or retrieved document should never be able to override safety rules. Treat retrieved content as data, not instructions.
Practical note
Keep system prompts short enough to audit. Put stable policy there, put task-specific context in the user message, and test prompt-injection attempts explicitly.
Keep learning
Concepts are easier to remember when you apply them. The foundations path connects this term to practical exercises.
AI foundations path →