← Lessons

quiz vs the machine

Gold1380

Machine Learning

Planning and Decomposition

Breaking a hard goal into ordered, achievable subtasks.

5 min read · core · beat Gold to climb

Planning and Decomposition

Complex goals overwhelm a step by step reactive agent. Planning asks the model to first decompose a goal into smaller subtasks and order them before executing anything.

Why decompose first

  • A single giant instruction gives the model no checkpoints to verify progress.
  • Subtasks create natural milestones where the agent can confirm success before moving on.
  • Ordering exposes dependencies, so a step that needs an earlier result runs after it.

Plan then execute

In this style the agent produces an explicit plan, often a numbered list, then works through it. The plan can be revised when reality diverges, a loop sometimes called replanning. Static plans break on surprises, so good agents treat the plan as a living document rather than a fixed script.

Trade offs

Decomposition costs extra model calls and can over plan trivial tasks, adding latency for no benefit. The opposite failure is under planning, where the agent dives in and loses track of the overall goal. The skill is matching plan depth to task difficulty: skip planning for one step jobs and invest in it for multi stage workflows where missteps are expensive.

Key idea

Planning splits a hard goal into ordered subtasks with checkpoints, and replanning revises that plan as reality changes.

Check yourself

Answer to earn rating on the learn ladder.

1. Why decompose a goal into subtasks first?

2. What is replanning?

3. What is the risk of over planning?