Back to Learning Area

Giving the Model a Task

The instruction the model reads before everything else — and mostly follows.

  • Concepts
  • 7 min
  • Beginner

Plain Language

This preview is in Plain Language. The whole portal is also available in Plain Language. You can change the language at the top. Or use the button below. Our Plain Language texts are AI-assisted and editorially reviewed. They follow the core principles of easy-to-read language, but they are not certified Easy Read: a review panel of people with learning difficulties does not test them.

Preview: System prompts: the invisible control

What is a system prompt?

AI chatbots have a hidden instruction. It is called a system prompt. System prompt means: invisible control of the AI. The user does not see it. It determines how the model answers.

Why roles are important

The more precise the role, the better the answers. A vague prompt like 'be helpful' is not enough. Better: 'you are a tax consultant.' The model then focuses on tax questions.

Prompting better with examples

You can show the model examples. This is called few-shot prompting. Few-shot means: show the model a pattern. Then it repeats the pattern. 3 to 5 examples are usually enough.

Every AI chatbot you have ever used was shaped by an invisible instruction you never saw. Before you type your first word, the system prompt has already defined who the model pretends to be, how it speaks, and what it refuses to do.

This article reveals that hidden layer and teaches you how to write effective system prompts — the foundation for everything that follows in this learning path.

The Invisible Layer

The system prompt is the control interface between human intent and model behavior. It transforms a general assistant into a role-specific one by establishing persistent behavioral rules.

Definition

System Prompt

Analogy

Think of a theater director's briefing before the curtain rises. The director tells the actor: "You are a 19th-century detective. Speak formally. Never break character." The audience never hears this briefing — they only see the performance. But every line the actor delivers is shaped by those invisible instructions.

The model processes messages in a fixed order:

  1. 1. System prompt is loaded
  2. 2. User sends a message
  3. 3. Model generates a response
System Prompt: French Chef
You are an experienced French chef. You answer exclusively with recipes. Non-culinary questions are creatively redirected to cooking.

What happens when the user asks: "What is the capital of France?"

The model responds: "Paris — the city of Crêpes Suzette! Here is my favorite recipe..." Without the system prompt, it would have simply answered "Paris" as a geography question.

The system prompt is not a one-time command — it stays active throughout the entire conversation and shapes every response the model generates, even though the user never sees it.

Caution

Common Misconception

"The system prompt is hard-coded into the model." — No, the system prompt is simply text in the context window, processed alongside user messages. It has priority through training, not by architecture. A different system prompt changes behavior immediately.

Interactive: With vs. Without System Prompt

What happens when a model answers a question without vs. with a system prompt? Toggle and compare.

Persona Design

"Be helpful" is the worst instruction you can give a model. Why? Because it is far too vague. A good persona defines exactly who the model should be — and who it should not be.

Expertise Defined domain knowledge and role
Communication Style Tone and language register
Constraints What the model must NOT do
Output Format Rules for structure and form

The same question — "Explain inflation" — produces entirely different answers depending on the persona:

Economics Professor

Uses formal academic language, references the Fisher equation, and discusses monetary policy transmission mechanisms.

Grandmother

"Imagine you go shopping and suddenly everything in the cart costs 10% more than last month."

A finance journalist would use current news examples and compare grocery prices year-over-year — the same knowledge base, a completely different access pattern, triggered solely by the persona definition.

The more specific the persona, the better tone, focus and level of detail fit the task. It does not unlock more expertise, though: studies find that personas barely improve accuracy on factual questions. A "tax advisor with 15 years of experience in German tax law" delivers better-tailored answers than a "helpful assistant."

Caution

Common Misconception

"Personas are just for fun or roleplay." — No, professional system prompts are the core product of many AI startups. The prompt IS the product — the model is available to everyone, the prompt is the differentiator.

Interactive: Build Your System Prompt

Select building blocks from four categories (role, expertise, task, output format) and watch your system prompt take shape.

Build a system prompt from building blocks. Click on a block to add or remove it.

🎭Role
🎓Expertise
📋Task
📐Output Format

Your System Prompt

0 blocks
Click on blocks above to build your prompt.
Why a Prompt Builder?

Good system prompts follow a pattern: define a role, specify expertise, describe the task, and set the output format. By assembling from building blocks, this pattern becomes visible and the effect of each part becomes tangible.

Zero-Shot vs. Few-Shot

You have two fundamental strategies for giving a model a task: without examples (zero-shot) or with examples (few-shot).

Zero-shot prompting gives the model a task without any examples — it must rely entirely on its pre-trained knowledge. This works well for simple, clearly formulated tasks.

Few-shot prompting provides a few examples, often 1-5, as input-output pairs. The model detects the pattern and applies it to new inputs — without any weight changes. This is not training, but pattern recognition within the context window.

Zero-Shot

Task without examples. The model relies on general pre-trained knowledge. Works well for clear, simple tasks.

Few-Shot

1-5 examples demonstrate the desired pattern. The model learns format and criteria from the examples. Ideal for specific output formats.

A concrete example — sentiment analysis of a product review:

Zero-Shot Attempt
Classify this review: "The pizza was lukewarm but dessert saved the evening."
Few-Shot Attempt (2 examples)
Review: "Fantastic food!" → POSITIVE Review: "Terrible service." → NEGATIVE Review: "The pizza was lukewarm but dessert saved the evening." → ?

With the examples, the model outputs "POSITIVE" — it adopts the exact output format of the examples instead of phrasing freely as in the zero-shot attempt.

Note

Quality Over Quantity

Each additional example costs tokens, and the gain usually gets smaller; for a fixed format, 3-5 are often enough. Research shows that large language models can match fine-tuned model performance with just a few examples. Moreover, chain-of-thought reasoning steps often help more than additional examples. Current reasoning models, however, think step by step on their own; there, asking them to do so is usually unnecessary.

A common and dangerous misconception: system prompts can serve as a security barrier. They cannot. Prompt injection — a technique where users or injected text (for example on web pages or in documents) trick the model into ignoring or revealing its instructions — is a known and unsolved problem.

Never store passwords, API keys, or sensitive business logic in a system prompt. A system prompt is like a polite request, not a locked door.

A sufficiently creative user can get the model to ignore the system prompt or reveal its contents.

Why do AI startups invest months perfecting their system prompts? Because the model is available to everyone — the prompt is the differentiator.

Customer service bots, coding assistants, medical triage systems — they all differ not least through their system prompt. The prompt defines the expertise, tone, and boundaries of the product.

This is why many companies treat their system prompts as intellectual property and protect them accordingly. Others take the opposite route: Anthropic publishes the system prompts of its Claude apps, and xAI has put Grok’s on GitHub. And because a system prompt can often be coaxed out of the model, security experts do not treat it as a secret anyway.

Note

Key Takeaways

  1. A system prompt is the persistent, invisible instruction layer that turns a general assistant into a role-specific one.
  2. Specific personas with defined expertise, tone, and constraints produce much better-fitting results than vague instructions like "be helpful."
  3. Few-shot examples teach the model output patterns without changing its weights — but quality beats quantity (3-5 good examples are better than 20 mediocre ones).
  4. System prompts guide behavior but cannot guarantee it — they are not a security mechanism.

Check

Knowledge Check: System Prompts

Not completed

What is the primary function of a system prompt?

Select one answer

Answer Key: 1) B · 2) C · 3) B · 4) C

Check

Self-Check: System Prompts

Can you explain this in your own words? Tick what you've got.

0 of 3 done