Techniques

What is prompt engineering?

Prompt engineering is the craft of shaping what a model reads so that what it writes is useful — and in the agent era it has grown into context engineering, where the stakes are actions, not wording.

Prompt engineering is the practice of designing what a language model reads — instructions, examples, context, constraints — so that what it produces is reliably useful. The name undersells it: because a model has no settings panel, the prompt *is* the configuration surface, and the difference between a system that works and one that almost works is usually written in it. The craft exists because models are steerable but literal-minded collaborators: they do what the words make likely, not what the author meant.

A handful of techniques carry most of the weight. System prompts set standing instructions that outrank the user's turn-by-turn requests — role, rules, tone, refusals. Few-shot examples show the model the shape of a good answer instead of describing it, and remain the most reliable lever per line of effort. Chain-of-thought asks the model to reason before concluding, trading tokens for accuracy on multi-step problems. Structured output — schemas, fixed formats — turns prose into something software can consume. None of these are incantations; each works by changing what the model conditions on, which is why the productive mindset is closer to interface design than to spellcraft.

From prompts to context engineering

As systems grew from single calls into agentic loops, the discipline widened. An agent's behaviour is shaped by everything in its context window: the system prompt, yes, but also tool names and descriptions, retrieved documents, the accumulating history of steps taken. Practitioners increasingly call the whole job context engineering — deciding what the model sees at each step, in what order, with what framing. Two consequences deserve emphasis. Tool descriptions are prompts: the model chooses actions by reading them, so a vague description is a behaviour bug. And retrieved content is a prompt too, written by whoever authored the document — which is precisely how prompt injection works, and why content an agent reads must be treated as untrusted input.

The limit that matters

The sharpest thing to know about prompt engineering is what it cannot do: a prompt is advice, not a boundary. A model can be argued out of its instructions by sufficiently adversarial input, which is why no consequential control should live only in the prompt. The prompt asks; the tool surface, permissions, and runtime gates enforce. Teams that internalise this split spend their prompt effort on quality — and their engineering effort on the controls that hold when the prompt falls — instead of writing ever-sterner instructions and hoping.

Where to go from here

If you are building an agent, the prompt work happens inside a larger sequence — the build guide places it after tool design, deliberately. If you are choosing what the model reads from your systems, the MCP pillar covers the layer where context now arrives. And if you want to know whether your organisation's prompting practices are matched by its controls, that is a readiness question — the maturity curve and assessment will tell you where the gaps are.

The explainer page on AI prompt engineering concepts covers the fundamentals in depth.

Frequently asked questions

What is prompt engineering?

Prompt engineering is the practice of designing what a language model reads — instructions, examples, context, constraints — so that what it produces is reliably useful. Because a model has no settings panel, the prompt is the configuration surface.

What are the main prompt engineering techniques?

System prompts set standing instructions that outrank the user's turn; few-shot examples show the shape of a good answer; chain-of-thought asks the model to reason before concluding; and structured output turns prose into something software can consume. Each works by changing what the model conditions on.

What is context engineering, and how is it different?

As systems became agentic loops, the job widened from the prompt to everything in the context window — system prompt, tool names and descriptions, retrieved documents, and step history. Context engineering is deciding what the model sees at each step, in what order, with what framing.

Can prompt engineering make an AI agent safe?

No. A prompt is advice, not a boundary — a model can be argued out of its instructions by adversarial input. No consequential control should live only in the prompt; the tool surface, permissions, and runtime gates do the enforcing.

Is your organisation ready for AI agents?

Take the assessment →