Self-reflection: an AI agent that reviews and fixes its own work
Self-reflection (often just called reflection) means having a model or agent look back at what it has just produced, write a critique, then use it for another attempt. It often improves results when the agent has a concrete failure signal, and much less when it is grading itself blind.
Data as of October 22, 2026
Key figures
| Level | Advanced |
|---|---|
| Origin | 2023 |
| Introduced by | Shinn et al. (Reflexion) |
How it works
An agent produces a first answer, then switches to review mode: “What’s wrong here? Why did I fail? What would I do differently?” That critique, written in plain language, is added to its context or to its agent memory. The next attempt takes it into account. The loop stops once the result meets a criterion or after a fixed number of tries.
Two papers from March 2023 popularised the idea:
- “Reflexion: Language Agents with Verbal Reinforcement Learning” (Shinn et al.): the agent receives a success or failure signal, writes a reflection on what went wrong, keeps it in memory and uses it on the next attempt, without touching the model’s weights.
- “Self-Refine” (Madaan et al.): the same model generates, critiques itself and rewrites, in a loop, with no outside feedback.
A worked example
A coding agent has to fix a function. It proposes a patch and runs the tests: two fail. Instead of trying again at random, it writes: “I parsed dates as day/month, but the test data uses month/day; I need to normalise the input.” It applies the fix, reruns the tests, and they pass. Feedback from the tests turned the reflection into a precise clue.
Why it matters, and where it falls short
Self-reflection is one of the simplest ways to make an agent more reliable, and it pairs naturally with the ReAct pattern. But the gains depend on the quality of the signal. The paper “Large Language Models Cannot Self-Correct Reasoning Yet” (Huang et al., ICLR 2024) found that without outside feedback, models struggle to fix their reasoning and sometimes make it worse. Hence the common practice of handing the critique to a separate call or a different model (LLM-as-a-judge), or grounding it in objective checks.
Common myths
- “If the AI checks its work, it can’t be wrong.” A review can reinforce a hallucination instead of catching it.
- “It’s the same as chain of thought.” Chain of thought spells out reasoning before answering; self-reflection goes back over a result that already exists.
- “More rounds, more quality.” After a few iterations the gains shrink while the cost keeps rising.
Related terms
- Chain of thought · Getting a model to write out intermediate reasoning steps before its final answer, which helps on multi-step problems.
- ReAct pattern · A loop in which an AI agent alternates written reasoning with actions such as searches or tool calls, reading each result before going on.
- LLM-as-a-judge · An evaluation method in which a language model scores or compares another model's answers against a rubric, standing in for a human grader.
- Agent evaluation · Methods for measuring whether an AI agent really completes a task end to end, reliably, safely and at an acceptable cost.
- Hallucination · An AI answer that sounds confident and plausible but is false or made up: a figure, a quote, a source or a reference.
Full glossary
Frequently asked questions
Does self-reflection train the model?
No. In the Reflexion approach, the critique is text stored in memory and reread on the next attempt. The model's weights do not change: it is “verbal” learning that lasts for the task or the session.
Can a model really spot its own mistakes?
Sometimes. Research shows self-correction works far better with outside feedback such as failing tests, an error message or a checkable result. Without that signal, a model may confirm a wrong answer or spoil a correct one.
How many reflection rounds should I allow?
Usually only a few. Each round adds model calls, which means time and cost. Set a maximum and a clear stopping rule, for example “all tests pass”.
Data sources
Data as of October 22, 2026
Report an error
Does a figure, a date or a fact look wrong? Tell us: every report is checked.