LLenny's Podcast
← All frameworks
ProductivitySander Schulhoff (Learn Prompting, HackAPrompt)

Prompt Decomposition

Make the model list the sub-problems first, then solve each before the whole

Difficulty
Moderate
Time to result
~days to results
Steps
3
Confidence
92%

Instead of asking an LLM to answer a complex task in one shot, first ask it to name the sub-problems that must be solved before answering. Then solve each sub-problem (optionally routing them to different tools or agents) and combine the results into a final answer. Schulhoff distinguishes this from chain-of-thought: decomposition explicitly enumerates and can distribute discrete sub-tasks.

Origin

One of Sander Schulhoff's five favorite techniques, catalogued in The Prompt Report.

Core principles

  • 01Complex tasks that fail as a single ask often succeed when broken into ordered sub-problems
  • 02Enumerating sub-problems mirrors how a human would approach the task
  • 03Listing the sub-problems also clarifies your own thinking about the task
  • 04Works in both conversational and product-architecture settings

How to run it

  1. 1

    Ask for sub-problems, not the answer

    Give the model the task but instruct it not to answer yet — instead ask 'what are the sub-problems you need to solve first?'

    Pro tip The exact phrasing Schulhoff prefers is asking what sub-problems need to be solved first.

  2. 2

    Solve each sub-problem in turn

    Work through the returned list one by one. In a product setting you can distribute individual sub-problems to different tool-calling agents or database lookups.

  3. 3

    Recombine into a final decision

    Feed the solved sub-problems back to the main model so it can synthesize a final answer using all the intermediate results.

In the wild

Car dealership return-policy chatbot

A customer asks a dealership chatbot to return a car with a small ding, giving fuzzy details about date and model. Asked all at once, the model struggles. Decomposed, it first identifies sub-problems: is this even a customer (database check), what car do they have, what date they checked it out, whether they have insurance, whether the return window is still valid. Each is resolved, then the main chatbot decides on the return and any charges.

The model handles the multi-condition policy decision reliably instead of struggling with the one-shot ask.

Common mistakes

One-shotting a multi-condition task

Asking the model to resolve several dependent conditions at once, which it handles poorly compared to solving them in sequence.

Is it for you?

Best for

Product builders and power users tackling multi-step, multi-condition tasks (support flows, agentic decisions)

Not ideal for

Simple single-fact queries where added sub-problem steps just add latency and cost

From the transcript

tell me what are some sub problems that would need to be solved first

25:30

you can distribute that to all different types (28:00) of tool calling agents

What is the phrase that you recommend people use? Is it what are the sub problems you need to solve first? Yeah, that that is…

28:00

From the episode

AI prompt engineering in 2025: What works and what doesn’t

Sander Schulhoff (Learn Prompting, HackAPrompt)