PM-301f · Module 1
Decomposition Strategies
5 min read
Three decomposition strategies cover the majority of production use cases: sequential, parallel, and hierarchical. The correct strategy depends on the information dependencies between subtasks — which subtasks require outputs from other subtasks before they can begin.
- Sequential Decomposition Subtasks form a chain: S1 → S2 → S3. Each step depends on the output of the previous. Use when: the information required by each step is only available after the preceding step completes. Sequential decomposition is the simplest but slowest pattern — each step adds latency because no steps can run in parallel.
- Parallel Decomposition Subtasks run simultaneously: S1, S2, S3 all start at once and produce independent outputs that are combined by a final assembly step. Use when: subtasks share the same input but produce independent outputs. Example: three independent expert analyses of the same document, combined in a final synthesis prompt. Parallel decomposition reduces latency but requires an assembly step.
- Hierarchical Decomposition Subtasks are organized in levels: top-level tasks decompose into lower-level tasks. Use for complex tasks with mixed dependencies — some sub-components are independent (can be parallelized) while others are sequential (depend on earlier sub-components). Map the dependency graph first, then organize subtasks by level.
# Step 1: List all required sub-tasks
T1: Retrieve and parse the contract documents
T2: Extract all obligations (party A, party B, third parties)
T3: Identify risk clauses (payment, IP, indemnification, termination)
T4: Cross-reference obligations against company policy
T5: Score overall contract risk (1-10)
T6: Generate executive summary (1 paragraph)
T7: Generate detailed clause-by-clause analysis
# Step 2: Map dependencies
T1 → none (starting point)
T2 → T1 (requires parsed contract)
T3 → T1 (requires parsed contract)
T4 → T2, T3 (requires obligations AND risk clauses)
T5 → T4 (requires cross-referenced analysis)
T6 → T5 (requires risk score)
T7 → T2, T3 (requires obligations and risk clauses — parallel with T4)
# Step 3: Identify parallelism
T2 and T3 can run in parallel (both depend only on T1)
T4 and T7 can run in parallel (T4 depends on T2+T3, T7 also depends on T2+T3)
T5 must wait for T4
T6 must wait for T5
# Resulting structure:
Level 0: T1
Level 1: T2 || T3 (parallel)
Level 2: T4 || T7 (parallel)
Level 3: T5
Level 4: T6