System & meta prompting for reliable agents
Agents become predictable when you separate two layers: the system prompt (who the agent is, what it can do, its boundaries) and meta prompts (how it should reason, when to use tools, how to recover). Then you test prompts like code.
Unreliable agents usually don’t have a model problem; they have a prompting problem. Specifically, they mix “what to do” and “how to think” into one wall of text. Separating those two layers is the single highest-leverage change you can make.
Two layers of prompting
Think of it as content versus process. The system prompt defines content: identity, capabilities, tone, hard limits. Meta prompting defines process: how to break down a task, when to call a tool, how to handle uncertainty. Keeping them distinct makes each easy to reason about and change.
The system prompt
Keep it concrete and short. Who the agent is, what it may and may not do, and exactly how it should sound. Vague system prompts produce vague agents.
- Identity: one or two sentences of persona.
- Boundaries: what to refuse, and how to escalate.
- Style: length, format, and tone rules.
Meta prompting
Meta prompts shape reasoning rather than content: “think step by step before acting,” “prefer a tool call over a guess,” “if confidence is low, ask one clarifying question.” This is where flaky agents become dependable, because you are encoding how to behave under uncertainty.
Test prompts like code
A prompt is a behavioural contract, so version it and test it. Keep a set of representative inputs with expected behaviours, and re-run them whenever you change the prompt. When something regresses, you will know which edit caused it — instead of discovering it in production.
Separate what the agent is from how it thinks. The first goes in the system prompt; the second is meta prompting — and both deserve tests.
Key takeaways
- Mixing content and process in one prompt is the usual cause of flaky agents.
- System prompts define identity, boundaries and style — keep them concrete.
- Meta prompts shape reasoning, tool use and behaviour under uncertainty.
- Version prompts and test them against representative cases like code.
Frequently asked questions
What is meta prompting?+
Meta prompting is instructing a model about how to reason and behave — how to break down tasks, when to use tools, and how to handle uncertainty — rather than about the content of a specific answer.
What is the difference between a system prompt and a user prompt?+
A system prompt sets the agent's persistent identity, capabilities and boundaries, while a user prompt is the specific request in a given turn. The system prompt frames every turn.
How do you test prompts?+
Treat prompts like code: keep a set of representative inputs with expected behaviours, version the prompt, and re-run the cases whenever you change it so you can catch regressions.