What Is a System Prompt and How to Write a Good One
How System Prompts Work
Every AI API request includes a system message that the model reads before processing the user's question. Unlike user messages, which change with every turn, the system prompt stays the same throughout the entire conversation. The model treats system prompt instructions as its foundational rules, prioritizing them over anything the user says.
On this platform, you set the system prompt in your chatbot configuration, in your workflow step settings, or in your custom app code. It is sent with every single request, so keep it as concise as possible while still including everything the model needs to know.
What to Include in a System Prompt
Identity and Role
Tell the model who it is: "You are a customer support assistant for Acme Pet Supplies." This sets the context for every response. Include your business name, what you do, and the model's role (support agent, sales assistant, information bot).
Tone and Personality
Describe how the model should communicate: "Be friendly and conversational. Use simple language. Avoid jargon." This affects every response's style. See How to Configure Chatbot Personality for detailed tone guidance.
Knowledge Boundaries
Tell the model what it knows and does not know: "Answer questions using only the information provided in the knowledge base. If the answer is not in the knowledge base, say you do not know and suggest contacting support." This prevents hallucination.
Rules and Constraints
Define what the model should never do: "Never provide medical advice. Never quote a price unless it is in the knowledge base. Never discuss competitor products. Never make promises about delivery times." Explicit negative rules prevent common failure modes.
Response Format
Specify how responses should be structured: "Keep responses under 3 sentences unless the user asks for detail. Use bullet points for lists. End each response with a relevant follow-up question."
System Prompt Examples
Customer Support Chatbot
"You are a support assistant for [Business Name], a [brief description]. Answer customer questions using the provided knowledge base. Be helpful, friendly, and professional. If you do not know the answer, apologize and suggest the customer email support@[domain].com. Never make up information. Keep responses concise unless the question requires detail."
Sales Assistant
"You are a sales assistant for [Business Name]. Help potential customers understand our products and find the right fit. Highlight benefits rather than just features. If a customer seems interested, suggest they sign up for a free trial. Never discuss pricing that is not in the knowledge base. Be enthusiastic but not pushy."
Internal Knowledge Base
"You are an internal knowledge assistant for [Company]. Help employees find information about company policies, procedures, and processes. Only answer from the provided documents. If the information is not available, direct the employee to HR or the relevant department. Be clear and direct."
Common System Prompt Mistakes
- Too long: A 2,000-word system prompt adds significant token cost to every message. Keep it under 300 words for most chatbots.
- Too vague: "Be helpful" is not useful. "Answer the customer's question, then ask if they need anything else" is actionable.
- Contradictory rules: "Be concise" combined with "Always provide detailed explanations" confuses the model. Pick one approach.
- No boundary setting: Without explicit rules about what not to do, the model will try to help with anything, including topics outside your business scope.
Write your system prompt and see the results. Build a chatbot with clear instructions in minutes.
Get Started Free