The Decomposition Pattern
Jay Banlasan
The AI Systems Guy
tl;dr
Break complex problems into smaller pieces that AI can handle reliably, then reassemble the results.
Ask AI to "create a complete marketing strategy for a B2B SaaS company" and you will get a shallow overview of everything and a deep dive into nothing. The problem is too big for a single prompt to handle well.
The decomposition pattern breaks complex problems into smaller, manageable pieces. Each piece gets its own focused prompt. Then you reassemble the results into something better than any single prompt could produce.
The Core Idea
Decomposition is not new. Engineers, scientists, and project managers have used it forever. Break the big thing into smaller things. Solve the smaller things. Combine the solutions.
What is new is applying it to AI prompting. Instead of one massive prompt, you create a chain of focused prompts where each one does one job well.
"Create a marketing strategy" becomes:
- Define the target audience and their pain points
- Analyze the competitive landscape
- Identify positioning and messaging
- Select channels and tactics
- Build the budget and timeline
- Write the executive summary
Six focused prompts produce dramatically better output than one broad one.
How to Decompose Any Task
Ask yourself: "What are the distinct skill types required for this task?"
If the answer includes research AND analysis AND writing AND strategy, that is at least four separate prompts. Each skill type gets its own step.
Then order them by dependency. Research comes before analysis. Analysis comes before strategy. Strategy comes before writing. The output of each step feeds into the next.
The Assembly Step
After running each decomposed prompt, you need a final "assembly" prompt that combines everything. This prompt receives all the individual outputs and synthesizes them into a coherent whole.
"Here are the outputs from five separate analyses. Combine them into a single marketing strategy document. Resolve any contradictions between sections. Ensure the tone is consistent throughout. Add transitions between sections."
The assembly prompt is simple because all the hard thinking already happened in the individual steps.
When Decomposition Is Overkill
Not every task needs decomposition. If a prompt produces good output in one shot, leave it alone. Decomposition adds overhead: more prompts, more time, more tokens.
Use it when: the task requires multiple skill types, the quality of a single prompt is consistently mediocre, or the task is complex enough that you would break it into subtasks for a human team.
Skip it when: the task is simple, the output quality is already acceptable, or speed matters more than depth.
The Reusable Library
Once you decompose a common task, save each prompt in the chain. "Audience analysis prompt," "competitive analysis prompt," "positioning prompt." You can remix these components for different projects. The decomposition pattern turns prompts into building blocks.
Build These Systems
Ready to implement? These step-by-step tutorials show you exactly how:
- How to Build a Prompt Template Library - Create a reusable library of tested prompts for every business function.
- How to Build a Customer Issue Pattern Detector - Detect trending support issues before they become widespread problems.
- How to Set Up Anthropic Claude with System Prompts - Configure Claude behavior with system prompts for consistent business outputs.
Want this built for your business?
Get a free assessment of where AI operations can replace overhead in your company.
Get Your Free Assessment