NEW
Also known as: System Message
A privileged instruction that sets the assistant’s goals, persona, and constraints for the entire conversation.
DESCRIPTION
The system prompt is a hidden or privileged message that defines the assistant’s behavior and priorities. It establishes tone, capabilities, and safety constraints that shape responses. Unlike user prompts, it persists across turns and guides conflict resolution when instructions disagree. Well-crafted system prompts improve reliability, safety adherence, and brand voice. In multi-agent or tool-using setups, the system prompt also defines tool invocation policies. It is central to prompt engineering and governance.
ALTERNATIVE DEFINITIONS
OpenAI Documentation
The system message helps set the behavior of the assistant.
Authoritative, concise definition directly from the API docs.
Microsoft Learn
A system message sets the overall behavior of the assistant and provides high-level instructions.
Adds that it provides high-level instructions beyond behavior setting.
RELATED TERMS
User Prompt Assistant Prompt Prompt Engineering Guardrails Safety Policies Instruction Tuning Prompt Injection Role Prompting Few-shot Prompting Context Window
COMPETING TERMS
Developer Message
KNOWLEDGE AREAS
TARGET AUDIENCE
AI Engineer Data Scientist MLOps Engineer AI Product Manager
EXTERNAL SOURCES
- Wikipedia - Prompt engineering
- OpenAI - Docs for system/user messages
- Microsoft - System messages guidance
- Anthropic - Prompt engineering best practices
TOP QUESTIONS
Why is a System Prompt important?
It anchors behavior, safety, and tone across the conversation, resolving conflicts with user instructions and improving consistency.
Category: Relevancy
How does a System Prompt differ from a User Prompt?
The system prompt is privileged and persistent, guiding the assistant, while the user prompt is a request or instruction from the end user.
Category: Misunderstanding
What are best practices for crafting a System Prompt?
State goals, constraints, refusal policies, and formatting rules. Keep it concise, test iteratively, and version-control changes.
Category: Best practices
Can System Prompts prevent prompt injection?
They help but are not sufficient. Combine with content filters, tool policies, and isolated retrieval contexts.
Category: Risk
Should System Prompts include tool-use instructions?
Yes, define when and how to call tools, expected inputs/outputs, and security checks.
Category: Guidance
How to evaluate a System Prompt?
Use regression test sets for safety, formatting, and task accuracy; monitor drift and failure cases.
Category: Validation
How long can a System Prompt be?
It’s limited by the context window. Favor brevity and structure to conserve tokens for user content.
Category: Constraints
How often should a System Prompt be updated?
When policies, capabilities, or branding evolve. Treat it as versioned configuration with change control.
Category: Management
What’s a common System Prompt mistake?
Vague goals and conflicting rules. Ambiguity leads to inconsistent behavior and safety failures.
Category: Mistakes