System prompt
Definition
Instructions set by the application developer that frame every conversation, such as the assistant's role, rules and output format.
In more detail
Models are trained to give system instructions more weight than user messages, but not absolute priority. Do not put secrets in a system prompt and do not rely on it as a security boundary: users can often get a model to reveal or ignore it.
Related terms
Prompt
The input given to a model: instructions, context, examples and the question or task itself, sent as one or more messages in a request.
Prompt injection
Input that overrides or subverts a model's instructions, either typed in directly or hidden in content the model reads while it works.
Role prompting
Telling a model to take on a role, such as a security reviewer or a patient tutor, to shape its focus, tone and level of detail.
System prompt leakage
Exposure of the hidden instructions an app gives its model, usually because a user coaxes the model into repeating them.
OWASP Top 10 for LLM Applications
OWASP's list of the most critical security risks in LLM applications, such as prompt injection and excessive agency.
Prompt template
A prompt with placeholders, such as {question} or {context}, that code fills in at run time so the instructions are reused.
Read more about System prompt
- Prompt engineering
Writing clear, testable instructions for models and checking them on real inputs.