What is System Prompt?
The hidden instructions given to an AI model at the start of a session that define its role, behavior, constraints, and persona.
Definition
A system prompt is a set of instructions passed to an LLM before the user's conversation begins. It is typically invisible to end users and set by the developer or product team. The system prompt defines: the AI's role and persona, what topics it should and should not discuss, the format of its responses, its tone, and any domain-specific knowledge or context it should always have. System prompts are the primary mechanism for turning a general-purpose LLM into a specialized product.
Why it matters
The system prompt is the most leveraged part of any AI product. A well-engineered system prompt produces a reliably useful, on-brand, safe AI assistant. A weak one produces an inconsistent, off-topic, or risky one. PMs and developers who invest in system prompt engineering ship better AI products faster.
How it works
In the Anthropic API, the system prompt is passed as the `system` parameter in each API call. In OpenAI's API, it is the first message with role "system." The model treats it as its highest-priority instructions. System prompts are subject to the same context window limits as everything else — long system prompts reduce the space available for conversation.
Examples in practice
Customer support system prompt
"You are a helpful customer support agent for Acme Software. Only answer questions about Acme products. If asked about competitors, politely decline. Always be friendly and concise. If you cannot resolve an issue, offer to escalate to a human."
