Plan and Execute


AutoGen Hands-On

LangGraph Hands-On

Representative patterns

Plan-and-Execute Basics

The Plan-and-Execute framework is a strategy for retrieval-augmented generation (RAG) that divides complex reasoning tasks into two distinct phases: planning and execution. While traditional ReAct agents think one step at a time, plan-and-execute emphasizes explicit, long-term planning.

  • Planning Phase: The model generates a high-level plan or structured outline that serves as a roadmap for solving the task. This phase ensures that the execution is systematic and adheres to the task’s requirements.

  • Execution Phase: Based on the generated plan, the model retrieves relevant information and executes the outlined steps to provide a detailed and coherent response.

This separation aims to address limitations in RAG systems that attempt to perform reasoning and generation in a single step, often leading to logical errors or inefficiency in handling complex tasks.

Reference


Distributed by an MIT license. This hands-on lab was developed by Microsoft AI GBB (Global Black Belt).