Prompt chaining

Also called chained prompts, multi-step prompting, prompt pipeline

Splitting a big task into a sequence of smaller prompts, where each step uses the output of the last.

Prompt chaining breaks a complex task into steps, each handled by its own prompt. The output of one step becomes input to the next. Writing a report might become: outline, then draft each section, then edit for consistency, then write the summary. Each prompt is simpler and easier to get right than one giant request.

Chaining helps because models do better on focused tasks. A single prompt that asks for research, analysis, writing and formatting all at once tends to do each part less well. Chains also make problems easier to find: if the final output is wrong, you can check each step's output and see where it went off track.

In a chat, chaining can be as simple as asking for one section at a time and replying "next". In software, chains are coded pipelines, sometimes with checks between steps. When the model itself decides which step to take next, the chain starts to become an agent.

Example

To create a product FAQ: prompt 1 extracts questions from 200 support tickets; prompt 2 groups them into the 10 most common; prompt 3 drafts answers using the policy document; prompt 4 checks each answer against the policy and flags conflicts.

Common mistake

Passing too much or too little between steps. If step 3 does not receive the decisions made in step 1, it contradicts them. Decide what each step needs to know, pass exactly that, and keep a short running summary of key decisions when the chain gets long.

Find a prompt for the task in front of you.

96 prompts in 8 categories. Copy one, fill in the blanks, paste it into any model.

Browse prompts

Promptlexity is a free library of 96 AI prompts and 8 downloadable AI skills across 8 categories, plus a glossary of 64 AI and prompting terms. Each prompt shows the exact text to paste, the variables to fill in, an example of what comes back, and why it works. Each glossary term has a plain-English definition, an example and a common mistake. 6 step-by-step guides cover the basics. No signup, works with ChatGPT, Claude, Gemini and other models.

Press Esc to close