Prompt chaining: instead of one monolithic prompt, you break work into focused steps — extract → validate → transform → synthesize. Each LLM call handles a well-scoped sub-task, improving reliability and debuggability.
2 / 5
What is a gate in a prompt chain?
Gate: e.g., "does this user query relate to our product? yes/no". The gate's output routes the chain — relevant queries go to the answer pipeline, irrelevant ones get a polite deflection, without wasting expensive steps.
3 / 5
What is the parallelization pattern in prompt chaining?
Parallelization: if step 2 and step 3 do not depend on each other, run them simultaneously. A moderator + generator running in parallel then feed a synthesizer, cutting wall-clock time versus serial execution.
4 / 5
What is an orchestrator-worker pattern?
Orchestrator-worker: the orchestrator reasons about the overall goal, breaks it down, and assigns each piece to a worker with the right context. Workers return results; the orchestrator integrates them into a final answer.
5 / 5
Why is structured output important between chain steps?
Structured output: asking the LLM to return { "intent": "...", "confidence": 0.9 } lets downstream code branch on fields deterministically. Free-text outputs between steps create fragile parsing logic prone to format drift.