bigonotes
AIWorkflows

Prompt Chaining

The simplest workflow pattern: each prompt's output becomes the next prompt's input. When it helps, and why errors compound.

2 min readLast updated

Prompt chaining is the simplest workflow pattern. You run a fixed sequence of prompts, and the output of one becomes the input of the next. The Prompting note on chaining covers the technique in detail. This note looks at it as a workflow.

An example chain#

Turn a raw customer complaint into a polished support ticket.

A raw complaint goes through three steps in order: extract the issue, classify it, write the ticket; each step's output is logged and can be checked
Step Input Job Output
1 Raw complaint Extract the core issue "Charged twice for one order"
2 The issue Classify it billing
3 Issue and category Write a formal ticket The finished ticket

Each step does one thing. The model does that one thing well, instead of extracting, classifying and writing all in one shot.

When it is worth it#

  • One prompt does too much. A single prompt is trying to do several distinct jobs, and quality suffers.
  • You need to see the middle. Each step produces output you can log, validate and inspect. If step 2 fails, you know exactly where.

Where it breaks#

Problem Why
Errors compound If step 1 extracts the wrong issue, step 2 classifies the wrong thing and step 3 writes a ticket about the wrong problem.
Latency adds up Three steps means three waits, one after another.
Cost adds up Three steps means three API calls and three sets of input tokens.

A check between steps stops a bad output before it travels down the chain.

Don't chain by default. The signal to chain is a single prompt that keeps producing messy output despite good instructions.

Short line#

Prompt chaining runs fixed prompts in order, each output feeding the next. Each step is focused and can be inspected. Errors compound and every step adds a call, so chain only when one good prompt keeps failing.

Key takeaways#

  • A chain is a fixed sequence of prompts where each output is the next input.
  • Each step does one job, so it does it better.
  • Every step's output can be logged, validated and inspected.
  • An early mistake carries through every later step.
  • Each step adds latency and cost. Chain only when one well-written prompt keeps failing.
Revision notes · 1 min

Core idea#

A fixed sequence of prompts. The output of each step is the input of the next.

Example: complaint to ticket#

Step Job
1 Extract the core issue
2 Classify the issue
3 Write a formal ticket from issue and category

Key points#

  • Each step does one job, so it does it better.
  • Each output can be logged, validated and inspected.
  • If a step fails, you know exactly where.
  • Use it when one prompt does too many distinct jobs and quality suffers.

Pitfalls#

  • Errors compound: a wrong extraction carries to the ticket.
  • Each step adds latency and cost: three calls, three waits.
  • Do not chain by default. Chain when one good prompt keeps giving messy output.

Short line#

Fixed prompts in order, each feeding the next. Chain only when one good prompt keeps failing.

Found a mistake? Email ask@bigonotes.com