← All posts

Claude system prompts: lessons from Haiku 3 to Opus 5

Anthropic publishes system prompts: not magic personas, but decision rules, tools, uncertainty handling, and UX for long agent tasks.

Claude system prompts: lessons from Haiku 3 to Opus 5
Contents

In brief

Before a user types the first message, Claude already has a system instruction: role, date, format, and tool rules. A Habr walkthrough of Anthropic’s published System Prompts history — Haiku 3 through Opus 5 — shows how to write a behaviour spec for your own assistants, not “you are a world-class expert.”

What happened

Anthropic keeps versioned system prompts in docs — a dataset of what the company thinks a model must know before the user task. Caveat: published text applies to Anthropic products; on the API you own the behaviour.

The author tracks the shift. A prompt is context and constraints, not a praise legend. Decision algorithms beat adjectives. “Don’t hallucinate” is nearly useless; uncertainty rules and bans on invented citations work better. Response format belongs in the system config. Long agent jobs need separate communication and goal-holding rules: skip every technical step report, but surface plan changes and blockers.

Seven reusable blocks: role, goal, decisions, unknowns, tools, format, final check — plus regression scenarios on a fixed test suite.

Why it matters

Tool-using agents fail less from “tone” than from missing action-selection and uncertainty rules. A system prompt is becoming an app config: versionable and testable like code.

In practice

  1. Replace “be an expert” with role + bans + fact-check criteria.
  2. For search and APIs, state when to call a tool and what to do when sources disagree.
  3. Put response format in the system so chats stop repeating it.
  4. For long tasks, define intermediate messaging and a final goal check.
  5. Keep 4–5 fixed tests (uncertainty, freshness, format, multi-step, instruction conflict) and rerun them after prompt edits.

Takeaway

Anthropic’s publication points to the real job for agents: not a clever user query, but a clear behaviour specification — concrete, testable, and model-aware.