concept

System prompt

A system prompt is the high-priority instruction block that defines a model's role, constraints, and default behaviors for an entire conversation.

Most chat APIs (OpenAI, Anthropic, Google) accept a separate "system" message that the model treats as higher-trust than the user turn. The system prompt is where you set persona ("You are a senior contract lawyer."), output rules ("Always answer in markdown."), refusal policies, and tool-use guidance. Strong system prompts are concise, declarative, and example-light — examples belong in user messages. Anthropic and OpenAI both publish that the system prompt is the most cost-effective lever for behavior steering before reaching for fine-tuning.

When to use system prompt

Common mistakes

FAQ

What is system prompt?

A system prompt is the high-priority instruction block that defines a model's role, constraints, and default behaviors for an entire conversation.

When should I use system prompt?

Any production deployment of a chat or agent model. Enforcing safety, refusal, or compliance rules. Locking output format across many user inputs.

What are the most common mistakes with system prompt?

Cramming all examples into the system prompt (use user-turn few-shot instead). Writing a 2000-word essay — long system prompts increase token cost on every turn. Forgetting that some open-source models have weaker system-prompt adherence.

Last updated: 2026-06-01. Raw markdown: https://promtable.com/glossary/system-prompt.md.