Prompt & Context Engineering·Question 67 of 68Quick-fire

When should you decompose a task into multiple prompts instead of one big prompt?

Quick-fire answer from the Awesome Generative AI Guide (MIT)

Type it the way you would explain it to an interviewer. A few sentences is enough; you can't break anything.

Model answer: the part to lead with

Decompose when a single prompt is trying to do several distinct jobs at once (extract, then reason, then format) and quality suffers because the model juggles them, or when different sub-steps want different models, temperatures, or validation. Breaking it into a small pipeline (or an agent) gives each step a focused context, lets you test and cache each stage, and localizes failures so you can see which step broke. The cost is more calls, more latency, and orchestration code, so you do not decompose gratuitously. Start with one prompt, and split only when an eval shows a specific step is the bottleneck.

Full worked answer

Decompose when a single prompt is trying to do several distinct jobs at once (extract, then reason, then format) and quality suffers because the model juggles them, or when different sub-steps want different models, temperatures, or validation. Breaking it into a small pipeline (or an agent) gives each step a focused context, lets you test and cache each stage, and localizes failures so you can see which step broke. The cost is more calls, more latency, and orchestration code, so you do not decompose gratuitously. Start with one prompt, and split only when an eval shows a specific step is the bottleneck.

Learn more: Building effective agents (Anthropic)

What a good answer covers

  • Decompose when a single prompt is trying to do several distinct jobs at once (extract, then reason, then…
  • Breaking it into a small pipeline (or an agent) gives each step a focused context, lets you test and…
  • The cost is more calls, more latency, and orchestration code, so you do not decompose gratuitously
  • Start with one prompt, and split only when an eval shows a specific step is the bottleneck

Key terms: Learn more

Quick-fire answer from the Awesome Generative AI Guide (MIT) · answer text last updated 6 November 2026 · scoring and review schedule by LLM Prep