Writing agent system prompts
For engineers
Instructions for agents that run many turns: heuristics at the right altitude, tool guidance, eagerness, final reports and testing changes
110 questions across four stages: Understand, Apply, Solve and Judge.
Try 5 questions
Practice items, not counted towards your mastery. No account needed.
Check yourself · 1 of 5
A system prompt lists 40 if-then rules, and the agent stalls on a case none of them covers. What is the most likely cause?
Check yourself · 2 of 5
An agent has two search tools with similar descriptions and picks between them at random. What helps most?
Check yourself · 3 of 5
Which action should an agent normally do without asking?
Check yourself · 4 of 5
Which line in a final report is the most useful for a reviewer?
Check yourself · 5 of 5
You changed a system prompt to fix one failing task. What should you do before shipping it?
Topics
- Instructions at the right altitude4 min read · Between brittle if-else rules and vague goals: heuristics and principles an agent can apply to cases nobody listed
- Guiding tool choice in the system prompt5 min read · When to use which tool, parallel calls, looking before acting, and the actions that are never allowed
- Setting how eagerly an agent acts4 min read · Telling an agent when to act and when to ask, how far to go, and how much to explore before answering
- Final reports and output contracts4 min read · What the agent returns at the end: format, evidence of checks, what was not done and an honest status
- Testing agent prompt changes on a task set5 min read · Running the same tasks before and after a prompt change and reading transcripts for regressions
Start here
- Effective context engineering for AI agents (Anthropic) (opens in a new tab)ArticleFree
Explains system prompts at the right altitude and why heuristics beat brittle if-else logic.
- Prompting best practices (Claude docs) (opens in a new tab)DocsFree
Concrete guidance on agentic instructions, tool use, parallel calls and how eager a model should be.
- GPT-5 prompting guide (OpenAI Cookbook) (opens in a new tab)DocsFree
Shows how to tune agentic eagerness and tool preambles, and why contradictory instructions hurt.
Helps to know first
110 questions · last verified 2026-12