A system prompt is the instruction text that sets the assistant’s role, behavior, and boundaries before the user’s message is processed.
System prompts help you control how an LLM behaves without changing the model itself. They’re useful when you want consistent tone, safety rules, formatting, or task-specific behavior across many requests.
In practice, teams use system prompts to:
If you are building an AI product, the system prompt is often the first place to encode “how this assistant should behave.”
Most chat-style LLM APIs accept multiple message roles, and the system prompt is the highest-priority instruction in that conversation structure. It is typically provided separately from the user’s message, so the model can treat it as setup rather than as part of the user request.
The exact semantics depend on the model and API, but the general idea is stable: the system prompt establishes global instructions for the session or request. User prompts then ask for a specific task within those boundaries.
A good system prompt is usually short, explicit, and behavior-focused. It should describe the assistant’s job, constraints, and any important style rules. It should not try to cram in every possible edge case; that tends to become brittle.
System: You are a concise support assistant. Answer in plain English. If you are unsure, say so.
User: Can you explain why my export failed?
Assistant: I can help. Common causes are missing permissions, an invalid file path, or a timeout. If you share the error message, I can narrow it down.
Here, the system prompt sets the tone and uncertainty policy. The user asks the question, but the answer should still follow those instructions.