An agent can produce a plausible execution plan on its first attempt and still miss something important. Complex, nonroutine tasks often need a chance to reconsider the plan before acting. Self-Refine gives a language model that chance: it generates an output, reviews that output to produce feedback, then uses the feedback to revise it. The review-and-revision steps repeat until a stopping condition is met. section 9.2.2
Revising an agent plan
Consider an agent planning how to identify external trends for a product roadmap update. Rather than accepting its first plan, the agent can feed that plan back to the language model, ask for feedback, and revise it before continuing. Reflection improves the opportunity to catch planning mistakes; it does not make the plan safe to execute without regard to risk. section 9.2.2
Keep the loop useful and bounded:
- Start with a clear task and an initial output that can be reviewed. Pass that output to the same model for feedback, then request a revision based on the feedback. section 9.2.2
- Set a stopping condition rather than assuming another revision will always help. For established workflows, consider explicitly defined steps when speed and reliability matter more than adaptability. section 9.2.2
- Treat high-stakes actions separately from prose refinement: an incorrect financial transaction or server command can be catastrophic, so the agent should request confirmation before execution. section 9.2.2
Self-refinement is one part of continuous improvement, not a substitute for feedback from the world. Prompting also benefits from examining output errors and evaluating successive formulations. Once a product is live, real user behavior, reported errors, and current data can reveal problems the model’s own critique did not identify. Those findings can guide changes to prompts, data, evaluation, or the model setup. section 6.4.1 section 5.4.5
When outside feedback changes the answer
In a forecasting platform, planners flagged predictions that missed demand spikes and supplier delays, then added short explanations. The team reviewed that domain feedback and adjusted the model. This is a different loop from Self-Refine: users supplied facts and context that an agent reviewing its own output might not have. section 12.3.5





























