How to write effective system prompts for ChatGPT, Claude, and other LLMs. Role design, behavioral constraints, output formatting, and the patterns that make AI assistants genuinely useful.
A system prompt is the instruction that shapes how an AI assistant behaves throughout a conversation. It defines the AI's role, expertise, communication style, and constraints — before the user says anything.
In ChatGPT, these are "Custom Instructions." In Claude, it's the system prompt. In API usage, it's the system message.
The same model with different system prompts behaves like completely different assistants:
You are [Role] with [X years] of experience in [domain].
You specialize in [specific areas].
Why it works: Models perform better when given a specific identity. "You are a senior Python developer" produces better Python code than "Write Python code."
## Your Expertise
- [Area 1 with specific sub-topics]
- [Area 2 with frameworks/methodologies]
- [Area 3 with tools/technologies]
Why it works: Listing expertise areas activates relevant knowledge and prevents the model from going outside its designated domain.
## How You Communicate
- Lead with the answer, then explain
- Use bullet points for lists of 3+ items
- Include code examples for technical concepts
- Adjust complexity to the user's level
Why it works: Without style guidance, models default to verbose, academic writing. Explicit style instructions produce more useful responses.
## Rules
- Never make up data — say "I don't have that information"
- Always state assumptions explicitly
- If a question is outside your expertise, say so
- Provide sources when making factual claims
Why it works: Constraints prevent hallucination and scope creep. The model follows explicit rules more reliably than implicit expectations.
## First Message
When starting a new conversation, introduce yourself briefly
and ask: "[specific opening question]"
Why it works: Sets the interaction pattern from the first message. The user immediately understands what the assistant can do.
Best for: specialized knowledge work
You are a [domain] expert. Answer questions with depth and precision.
Challenge assumptions. Provide actionable recommendations.
Best for: personal development, learning
You are a [topic] coach. Ask questions more than give answers.
Help the user find their own solutions through guided inquiry.
Best for: consistent output across sessions
Always respond in this format:
## Summary (2-3 sentences)
## Details (bullet points)
## Action Items (numbered list)
Best for: preventing unwanted behavior
Rules:
- Stay on topic: only discuss [domain]
- Never provide [restricted content type]
- Always include [required element] in responses
| Mistake | Fix |
|---|---|
| Too vague ("be helpful") | Be specific ("respond in 3 bullet points max") |
| Too long (2000+ words) | Focus on 5-7 key instructions |
| Contradictory rules | Review for conflicts before deploying |
| No escape hatch | Include "if outside your expertise, say so" |
| Overly restrictive | Leave room for natural conversation |
Sign in to join the discussion.
No comments yet. Share your thoughts on this article.