Prompt chain designer
Hard problems rarely solve well in a single prompt. The reliable pattern is a chain: a short sequence of prompts where each step has one clear job and passes a defined output to the next. This designer lets you lay out those steps, specify what each one takes in and produces, reorder them, and export the whole chain as either runnable config or ready-to-paste prompt blocks.
How it works
Each node holds a name, a prompt, an input type and an output type. The first step consumes your raw input; every step after it is automatically wired to consume the previous step’s output. When you export, the tool either emits a JSON config — one object per step with its input source and prompt — or a set of sequential prompt blocks separated by dividers, ready to run one after another in any chat tool.
When chaining beats a single prompt
The biggest wins from chaining come in three situations:
- Phase separation. Some tasks have genuinely distinct phases where the skills required are different — for example, first extracting structured data from raw text, then scoring it, then writing a summary. Bundling those into one prompt forces the model to context-switch mid-generation, which degrades each phase. Splitting them lets each model call specialize.
- Output validation gates. If step two expects a JSON array and step one can sometimes return malformed output, you can inspect (or programmatically validate) the intermediate output before committing it downstream. A single monolithic prompt has no natural checkpoint.
- Iterative refinement loops. You can wire a chain where a late step evaluates the output of an earlier step and feeds corrections back — an edit loop that a one-shot prompt cannot replicate.
A worked example
Consider the task: “Analyze customer reviews and produce a weekly digest email.”
| Step | Input | Prompt goal | Output |
|---|---|---|---|
| 1. Extract | Raw review text | Pull sentiment, topic, and key phrase per review | JSON array of review objects |
| 2. Aggregate | JSON array | Count topics, average sentiment per topic, surface top complaints | Summary JSON |
| 3. Draft | Summary JSON | Write a digest email in plain English, friendly tone, under 200 words | Email draft text |
Each step is narrow enough for a small model to handle reliably. If step 2 returns unexpected results you can inspect and re-run it without re-running the extraction.
Tips and notes
- One job per step. If a step’s prompt has the word “and” in its goal twice, consider splitting it. Narrow steps are more reliable and easier to debug.
- Name your output types precisely. “Bullet list” or “JSON array of names” tells the next step exactly what to expect and reduces format drift.
- Validate between steps. When a step outputs structured data, add a check before feeding it downstream so one bad call does not corrupt the rest.
- Start small, then grow. Two or three steps often beat a single sprawling prompt; add steps only when a phase clearly needs isolating.
- Re-use the JSON config. The exported config is a reproducible spec — check it into version control alongside your application code so the chain is auditable and shareable with teammates.