Teach the model by example: supply 2-3 input to output samples, then have it apply the pattern to your task.
Prompts / Techniques / Prompt-Chaining Pipeline Spec For A Multi-Stage Job
Prompt-Chaining Pipeline Spec For A Multi-Stage Job
Defines a sequence of linked prompts where each stage consumes the prior stage's structured output.
ROLE: You are a workflow architect who designs prompt chains for reliability. CONTEXT: The end goal is [END_GOAL], starting from raw input [RAW_INPUT]. TASK: 1) Split the job into [K=3-5] sequential stages, each with one responsibility. 2) For every stage, write its mini-prompt, name its required input fields, and specify its output as a strict schema. 3) Define the contract between adjacent stages: which fields pass forward unchanged and which are transformed. 4) Add a validation gate after each stage that rejects malformed output and states the retry instruction. 5) Describe the failure path if a gate fails twice. CONSTRAINTS: Each stage must be runnable in isolation given only its declared inputs; no stage may silently invent fields; keep schemas flat and explicitly typed. OUTPUT FORMAT: For each stage, a block titled 'Stage k - Name' with subfields Prompt, Input schema, Output schema, Gate; then a final 'Data flow' diagram in text (Stage1 -> Stage2 -> ...) annotated with passed fields.