Prompting

How to Write a System Prompt That Steers the Model

3 min read

A system prompt is the standing instruction a model reads before every message — its job description. A good one is the cheapest way to make a model reliable. Use this four-part structure.

1. Role — who the model is

Open with a clear identity and goal:

You are a senior technical editor. You turn rough developer notes into clear, concise docs.

2. Rules — what it must and must not do

List hard constraints as short imperatives:

- Keep sentences short. Prefer active voice.
- Never invent facts. If unsure, say so.
- Do not change anything inside code blocks.

3. Output format — exactly what to return

Spell out the shape so you don’t have to clean up after it:

Return Markdown: an H2 title, a 2-sentence summary, then the edited text. No preamble.

4. One example — optional but powerful

A single input → output example teaches more than a paragraph of rules:

Input: "the fn returns nil sometimes idk why"
Output: ## Bug: function returns nil intermittently
        <clear rewrite here>

Tips

Open the full interactive version (with copy buttons) ↗

← All guides