Plan-Reason-Evaluate-Feedback Loop
Split the agent's control loop into Plan, Reason, Evaluate, and Feedback so each one can be written, tested, and tuned on its own instead of crammed into a single prompt.
Description
Build the agent's control logic as a loop with four stages. Plan drafts a candidate approach. Reason fills it in using chain-of-thought or tree-of-thoughts. Evaluate scores the result, using self-consistency or a judge. Feedback hands the lessons back to Plan for the next round. Make each stage its own step with its own metrics, so the team can tune them one at a time. The thing to avoid is one giant prompt trying to do all four jobs and doing each one badly.
When to apply
Use this when the task is hard enough to need real planning and self-checking: research agents, coding agents, and multi-step problem solvers. It helps most when one big ReAct prompt has stopped improving. Don't apply it for single-shot generators and simple tool callers, where four stages on a trivial task is overkill. Skip it too when your latency budget cannot absorb the extra round-trips.
What it involves
- Author the Plan stage
- Author the Reason stage
- Author the Evaluate stage
- Author the Feedback stage
- Instrument each stage independently
- Bound iterations
Open the full interactive page →
Diagram, neighbourhood map, code examples, related patterns and full provenance.