Dashboard
0%
1
Curious builder0 XP earned · 300 to level 2
0 daysFinish a lesson to begin
Badge collection0 of 6 unlocked
51 small wins to finish your pathNext question →

Q16IntermediateConcept

Compare planning strategies: ReAct, Plan-and-Execute, and Reflection.

30-second answerSay your answer out loud first, then reveal.
A planner LLM writes steps 1 to n, an executor runs step i, and a check asks whether the step was ok and the plan still valid: yes moves to the next step, no goes to re-plan and back to the executor, and when all steps are done the agent gives the final answer.
ReActPlan-and-ExecuteReflection
Planning horizonOne stepWhole taskAcross attempts
StrengthAdapts to surprisesCoherent long tasks, cheaper executorsLearns from failures
WeaknessDrifts, repeats, no big picturePlans go stale; needs re-planningExtra calls; critic can be wrong
Good forShort interactive tasksMulti-step research, ETL-like jobsCode (tests as signal), writing with rubric

Practical hybrid: most production agents keep a lightweight, editable plan, often a to-do list in context or a file, and execute it ReAct-style, updating the list as they learn. Coding agents work this way, and so does LangChain's "Deep Agents" pattern.

Reflection caveat: self-critique without external feedback is limited. A model reviewing its own answer often approves it. Reflection works best when it is grounded in a signal: test failures, a validator, retrieved evidence, or a separate judge with a rubric.

Follow-ups to expect

  • How would you decide when to re-plan? (When a step fails, new information contradicts plan assumptions, or every N steps.)

Little by little, you're building something great.