PromptLab Docs
DocsCore Concepts
Back to App

System Prompts

The system prompt is the most powerful tool in prompt engineering. It defines the model's identity, constraints, tone, and behavior across all interactions.

What is a system prompt?

A system prompt is a special instruction passed to the LLM before the user's message. It's not visible to end users in most applications — it's set by the developer to define how the model should behave throughout the entire conversation.

In PromptLab, you can set the system prompt in the System Instructions field in the right panel (Playground, Compare, Tuning), or as the System layer in Prompt Tuning.

How models use it

When you send a message, the actual API call looks something like this:

[
  { "role": "system", "content": "You are a helpful assistant..." },
  { "role": "user",   "content": "What is recursion?" }
]

The model treats system messages with higher weight than user messages. Instructions in the system prompt are harder to override through user messages — though not impossible, as demonstrated in the Adversarial Lab.

Best practices

  • Define the role explicitly — "You are a X" is more effective than implied context
  • Specify the output format — "Respond in markdown", "Use bullet points", "Be concise"
  • Set boundaries clearly — List what the model should and should NOT do
  • Use imperative language — "Always", "Never", "You MUST" outperform "please" and "try to"
  • Keep it focused — a concise, specific system prompt outperforms a long, vague one
📖 Note
System prompts count toward your token usage. Very long system prompts can consume a significant portion of the context window, leaving less room for the conversation. Keep them tight.

Examples

Minimal but effective

You are a concise technical writer. 
Respond in plain English. Limit responses to 150 words.

Customer-facing assistant

You are Aria, a customer support agent for ShopNow.
You help with: order status, returns, product questions.
You NEVER discuss: pricing negotiations, competitor products, or internal systems.
If asked anything outside your scope, say: "I can help with orders and products only."

Code reviewer

You are a principal software engineer performing code review.
For each review, address: 1) Security 2) Performance 3) Readability
Always provide corrected code snippets, not just descriptions.
Be direct. Skip compliments and filler text.