Lesson 11.6 · 23 min · video lesson
Reflection Agents: Self-Critique for Higher-Quality Outputs
Good writers rarely publish their first draft; can an agent improve its own work by reviewing it before handing it over?
In short: A Reflection agent works in a generate → critique → revise loop: it produces a draft, a critic examines the draft against the goal and points out concrete problems, and the agent revises using that feedback, repeating until the critic is satisfied or a round limit is reached. Reflection works best when the critique is grounded in something real, such as test results, a checklist or a tool, because a model judging its own work without outside evidence often misses its own mistakes.
What you will learn
- What is a Reflection Agent
- Reflection Agent vs AI Agent
- Anatomy of a Reflection Agent
- How a Reflection Agent Works
- A Full Trace Example
- Reflection Agent vs ReAct Agent
- Common Failure Modes and How to Fix Them
- Quick Summary
In this lesson
- What is a Reflection agent?
- Reflection agent vs a basic AI agent
- Anatomy of a Reflection agent
- How a Reflection agent works
- A full trace example
- Reflection agent vs ReAct agent
- Common failure modes and how to fix them
- Worked example, step by step
- Practice: try it yourself
Key terms in this lesson
- Reflection agent
- An agent that critiques its own draft and revises it, in a loop, to improve quality.
- Critic (reflector)
- The component that evaluates a draft and returns specific problems or a pass.
- Self-Refine
- A 2023 method in which one LLM iteratively gives feedback on and refines its own output.
- Reflexion
- A 2023 method where agents store verbal reflections on failed attempts to do better on the next try.
- Intrinsic self-correction
- A model revising its answer using only its own judgement, with no external feedback.
- Regression
- When a revision breaks something that worked in an earlier draft.
This lesson is part of the Generative AI Engineering and Complete AI Engineer tracks. See plans and pricing to open the full lesson, its video, labs and quiz, or try the free lesson first (free account needed).
← 11.5 Plan-and-Execute: Tackling Complex Tasks in Two Phases · 11.7 Agent Memory: Short-Term, Long-Term, and Episodic →