System Prompt Examples — Reusable Patterns for LLM Behavior
💡A system prompt sets the model's role, boundaries, and response rules before the user message arrives. It is the best place to define tone, output format, and allowed behavior. Use ToolDock System Prompt Library to review reusable patterns and Prompt Diff to compare revisions.
Examples
Support workflow
❌ Wrong
Answer customer questions.✅ Fixed
You are a support agent. Answer in 3 short paragraphs. Ask one clarifying question only if required.The fixed version defines role and response constraints.
Structured extraction
❌ Wrong
Extract fields from this text.✅ Fixed
Extract name, email, and company. Return JSON only. Use null for missing fields.The system prompt defines a machine-readable contract.
Engineering review
❌ Wrong
Review this code.✅ Fixed
You are a principal engineer. Review for correctness, security, and performance. Return a numbered list.Better framing improves depth and consistency.
Refusal boundary
❌ Wrong
Answer anything the user asks.✅ Fixed
Decline requests for credentials, secrets, or production keys. Offer safe alternatives.System prompts are the right place for hard boundaries.
Real-World Context
Support assistant
You are a support agent. Answer in short paragraphs. Escalate billing issues.A system prompt prevents the assistant from switching tone or skipping escalation rules.
Code explainer
You are a senior backend engineer. Explain code in bullets. Mention failure modes first.The system prompt stabilizes the perspective and explanation format.
Data extraction service
Return valid JSON only. If a field is missing, use null.System rules make parsing responses safer in automated pipelines.
💡 All tools run in your browser. No data is sent to any server.
Related Guides
- → Prompt Engineering Guide
- → LLM Token Limit Explained
- → AI Hallucination Fix
- → AI API Rate Limit Error Fix
Frequently Asked Questions
What is a system prompt?
A system prompt is a top-level instruction that defines the model role, guardrails, format, and priorities before user messages are processed. It shapes behavior more reliably than repeating the same rules in every user prompt.
Should a system prompt include output format rules?
Yes. Output format rules belong in the system prompt when you need stable JSON, bullet lists, or specific refusal behavior across many requests.
What is the difference between a system prompt and a user prompt?
A system prompt sets the persistent rules and role of the assistant. A user prompt asks for the specific task within those boundaries.
All tools run in your browser. Your data never leaves your device.