← Lessons

quiz vs the machine

Gold1380

Machine Learning

Planning and Reasoning Deep Dive

How agents break a goal into ordered steps before acting.

5 min read · core · beat Gold to climb

Why plan at all

A model that acts greedily one step at a time often loops or wanders. Planning asks the model to lay out a sequence of steps first, then execute them. This separates thinking from doing.

Common planning styles

  • Decomposition split a hard goal into smaller subgoals
  • Chain of thought reason step by step in natural language before answering
  • Plan and execute write a full plan once, then run each step
  • Replanning revise the plan when an observation contradicts it

Plan first, then act

A plan and execute agent produces a list of tasks, dispatches them, and checks whether the goal is met. If a step fails, it can replan rather than abandon the goal.

Trade offs

Upfront planning saves wasted tool calls and makes behavior easier to audit. But rigid plans break in dynamic environments, so the best agents interleave planning with execution and replan when reality diverges from expectation.

Key idea

Planning turns a fuzzy goal into an ordered, auditable sequence of steps, and replanning keeps that sequence honest when the world changes.

Check yourself

Answer to earn rating on the learn ladder.

1. What is the main benefit of plan and execute over greedy step by step action?

2. When should an agent replan?