When would you decompose a task into multiple prompts instead of one? Explain least-to-most prompting.
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 call is unreliable and failures are entangled: the task has heterogeneous sub-skills (extract, then reason, then format), intermediate results need validation or tool calls, the context would otherwise mix concerns, or you need to debug where quality is lost. Each sub-prompt gets a clean, focused context - which matters because instruction-following degrades as a single prompt accumulates competing objectives.
Full worked answer
Decompose when a single call is unreliable and failures are entangled: the task has heterogeneous sub-skills (extract, then reason, then format), intermediate results need validation or tool calls, the context would otherwise mix concerns, or you need to debug where quality is lost. Each sub-prompt gets a clean, focused context - which matters because instruction-following degrades as a single prompt accumulates competing objectives.
Least-to-most prompting (Zhou et al., 2022) is the canonical pattern: first prompt the model to decompose a hard problem into a sequence of easier subproblems; then solve them sequentially, appending each subproblem's answer to the context for the next. The key result was easy-to-hard generalization: on compositional tasks like SCAN, standard CoT failed on instances harder than the exemplars, while least-to-most generalized - because each step stays within the model's reliable range even when the composition doesn't.
Engineering benefits of decomposition beyond accuracy:
- Observability: per-stage evals localise regressions ("extraction is fine, synthesis regressed").
- Heterogeneous models: a cheap model classifies and extracts; the expensive/reasoning model handles only the hard synthesis step - often the biggest cost lever in a pipeline.
- Validation gates: check intermediate outputs (schema, sanity rules, groundedness) and retry just the failed stage.
- Parallelism: independent subproblems fan out concurrently (map-reduce over document chunks).
Going further: follow-up territory
Costs, which a strong candidate names unprompted: more calls means more latency (if sequential) and more overhead tokens; errors cascade - a stage-1 mistake poisons everything downstream with no chance of recovery, whereas a monolithic prompt sometimes self-corrects mid-stream; and you've now built a pipeline that needs versioning, monitoring, and integration tests.
The 2026 evolution: with reasoning models and agentic tool loops, decomposition increasingly happens inside the model - plan-then-execute agents, or a model deciding its own subgoals. Explicit decomposition remains the right choice when you need auditability, per-stage cost control, or hard validation gates between steps.
What a good answer covers
- Decompose when a single call is unreliable and failures are entangled
- Each sub-prompt gets a clean, focused context - which matters because instruction-following degrades as…
- Least-to-most prompting (Zhou et al., 2022) is the canonical pattern
- The key result was easy-to-hard generalization
- Observability: per-stage evals localise regressions ("extraction is fine, synthesis regressed")
Key terms: Least-to-most prompting · Observability · Heterogeneous models · Validation gates · Parallelism
In the glossary: Tool call · Accuracy · Observability · Reasoning model
Interviewer follow-ups to expect
How do you stop error cascades in a multi-stage pipeline?
Given a fixed latency budget, how do you decide between one big reasoning-model call and a three-stage pipeline?
How would you eval the decomposition step itself?
Worked answer from AI-Engineer-Interview-Questions by Om (MIT), reformatted for LLM Prep · answer text last updated 6 November 2026 · scoring and review schedule by LLM Prep