Beginner

System Prompt Basics

A system prompt is a set of persistent instructions that sit above the conversation and shape how Claude behaves throughout every exchange. Understanding what system prompts can and cannot control is foundational to building consistent, reliable Claude interactions.

What a System Prompt Is

In Claude's API, there are three roles in a conversation: system, user, and assistant. The system role is processed before any user messages and establishes the baseline behaviour for the entire conversation.

In Claude.ai Projects, the custom instructions field is the equivalent of a system prompt — it is applied to every conversation in that Project automatically without the user needing to repeat it.

The system prompt is not visible to users in most applications — it is the operator's layer of control over Claude's behaviour, separate from what users type.

How System Prompts Differ from User Messages

System prompt

  • Applied once, at the start of every conversation
  • Sets persistent rules, persona, and constraints
  • Operator-controlled — users do not see it
  • Higher priority than user instructions in most cases
  • Used for: persona, tone rules, format rules, hard constraints, background context

User message

  • Per-turn instructions within the conversation
  • Can override some system prompt settings if allowed
  • User-controlled — Claude sees it as coming from the human
  • Used for: the actual task, turn-specific context, refinement instructions

What System Prompts Can Control

System prompts are effective at controlling four main dimensions of Claude's behaviour:

  • Persona: "You are a helpful customer support assistant for Acme Corp." / "You are a senior software engineer reviewing code."
  • Tone: "Always respond in a professional, concise tone." / "Be conversational and friendly, avoid corporate language."
  • Format: "Always respond in bullet points." / "Use Markdown headers for every response longer than 3 paragraphs." / "Begin every response with a one-sentence summary."
  • Constraints: "Only answer questions about [product]. For anything else, say 'I can only help with [product] questions.'" / "Never provide legal or medical advice."

System prompts also provide persistent background context that every response can reference: company info, product details, known user preferences, or workflow-specific knowledge.

Common Mistakes

  • Vague instructions: "Be helpful" does nothing — Claude is helpful by default. "Prioritise concise, actionable answers over thorough explanations" changes behaviour.
  • Conflicting rules: "Always be brief" and "Always explain your reasoning in detail" conflict. One rule will dominate unpredictably. Resolve conflicts by specifying context: "Be brief for yes/no questions; explain reasoning for complex requests."
  • Over-stuffing: A 2,000-word system prompt with 40 rules creates instruction noise. Claude will follow most rules but may lose track of the least prominent ones. Prioritise the 5–8 most important rules.
  • Trying to override Claude's hard limits: System prompts cannot instruct Claude to produce content that violates its core guidelines — safety behaviours are not configurable via the system prompt.

Testing Your System Prompt with Edge Cases

After writing a system prompt, test it with inputs designed to expose gaps:

  • Ask something outside the intended scope — does Claude redirect correctly or answer anyway?
  • Ask a question that requires applying the persona to an unusual situation — does the persona hold?
  • Ask Claude to ignore its instructions — does the constraint hold?
  • Ask for a format that conflicts with the format rule — which wins?
  • Ask a follow-up that requires remembering earlier context — is the tone consistent across turns?

Iterate on the system prompt based on test failures — the most common fix is making a rule more specific or resolving an ambiguity between two instructions.

Checklist: Do You Understand This?

  • System prompts apply to the whole conversation; user messages apply per turn — system prompt has higher priority
  • System prompts control: persona, tone, format, and constraints — these four dimensions cover most use cases
  • Vague instructions ("be helpful") change nothing; specific instructions ("respond in under 3 sentences") change behaviour
  • Conflicting rules produce unpredictable outputs — resolve conflicts by specifying the context in which each rule applies
  • Test with edge cases after writing — reveal gaps in constraints, persona consistency, and format compliance

Page built: 01 Jun 2026