Prompting techniques
Prompt chaining
Definition
Prompt chaining splits a complex task into a sequence of focused prompts, where each step's output feeds the next. Chains are easier to debug and more reliable than one large prompt.
A typical chain looks like extract → transform → generate → verify. Each step has one job, its own constraints, and structured output the next step consumes.
The benefits compound. Debugging becomes tractable because you can see exactly which step failed. Cost drops because simple steps can run on smaller, cheaper models. Reliability improves because each prompt is specific rather than trying to hold five instructions at once.
The heuristic: the moment a prompt does two unrelated things, split it. Reliability usually jumps immediately.
Example
Step 1: extract pains and objections from an interview as JSON. Step 2: using only that JSON, write three headlines. Step 3: score each and return the winner.
Related terms
Meta-prompting
Meta-prompting is using a model to write, critique or improve prompts. You describe the task and the failure modes you want to avoid, and the model drafts the prompt.
AI agent
An AI agent is a system where a model plans and takes actions through tools in a loop, rather than producing a single response. It decides what to do next, does it, observes the result, and continues until the goal is met.
Structured output
Structured output means constraining a model to return data in a machine-readable shape such as JSON, usually by specifying the exact schema in the prompt or using a provider feature that enforces it.
Zero-shot prompting
Zero-shot prompting means asking a model to do a task with no worked examples — just an instruction. It works well for common tasks the model has seen extensively in training.
Few-shot prompting
Few-shot prompting means including two to five worked examples of the input-output pattern you want before making your real request. It is the fastest way to lock in a consistent format, tone or edge-case behaviour.
Chain-of-thought prompting
Chain-of-thought prompting asks a model to work through its reasoning step by step before answering. It measurably improves accuracy on maths, logic, and multi-step problems by forcing intermediate steps instead of an immediate guess.
Put this into practice
Understanding the term is step one. Our free courses and tools let you actually use it.