self-reflection
The AI agent reviews its own work, searches for errors, and makes improvements based on lessons learned before delivering a final result.
In plain terms
When you write an important email, ideally you do not send it right away: you read it through, notice a missing attachment or an ambiguous sentence, and correct it. Self-reflection builds this habit into the AI agent: the system does not stop at the first draft but looks back at it and asks itself whether it is truly good.
It is useful because the first response of language models is often incomplete or incorrect, yet the same model often notices the error if explicitly asked to critique it, especially if it receives tangible feedback, such as test results. This is particularly important for agents, which work in many steps, and an early mistake can steer the entire task in the wrong direction.
It differs from a simple 'try again' in that the agent puts into words what went wrong and why, and carries this lesson forward to the next attempt. It does not repeat blindly but works from its own critique.
How it works
- The agent creates the first draft: it writes the text, the program code, or executes a step in the task.
- It then switches to an evaluative role: it re-reads the result and compares it with the task, or uses external feedback, such as the error message from a test it has run or the results of a search.
- It formulates criticism in everyday language, for example: 'I used the wrong date in the third step, so the total did not add up.'
- It produces an improved version based on the critique and stores the lesson in its memory so it does not repeat the same mistake in the next round.
- The cycle repeats until the result is satisfactory or until a set limit for attempts, time, or cost is reached.
An everyday example
You ask a coding agent to fix a bug on your webshop's cart page. It writes the fix, runs the tests, sees that one fails, determines it misread the rounding, corrects it, and only then tells you it is ready.
Who is affected
A common misconception
Limits and risks
- The agent reviews its work with the same knowledge it used to do it, so if it missed something the first time, it is likely to overlook it again.
- Without an external checkpoint (test, source, calculation, human feedback), the critique can easily become confident self-justification or even ruin a good answer.
- Every reflection loop means more computation, so the response is slower and more expensive.
- The agent can get stuck in an infinite loop of corrections, so a maximum limit for iterations is always required.
Similar, but not the same
- reasoning model – A reasoning model thinks through steps before answering, while self-reflection reviews an already completed result afterward.
- human oversight – In self-reflection, the agent checks itself; in human oversight, an independent person approves or stops the work.
- fine-tuning – Fine-tuning permanently rewrites the model's internal settings, while self-reflection only corrects during the specific task using text notes, without changing the model itself.
Related concepts
AI-agent, agentikus munkafolyamat, Agentic design patterns
Reflexion method, self-improving loop, evaluator–refiner pattern
chain of thought, planning, agent memory, hallucination, human oversight
A brief history
The method was popularized by two 2023 studies: Reflexion (Shinn et al.) and Self-Refine (Madaan et al.) showed that language models achieve better results by learning from their own textual critiques. In 2024, Andrew Ng promoted it as one of the four fundamental agentic design patterns.
Where things stand
By late 2026, the self-check loop is a standard part of coding and research agents, mostly paired with automated tests or a separate checking agent. Developers are now mainly looking for ways to make the review reliable without raising costs excessively.
In the news
- Nvidia's China share falls as it weighs Reflection AI deal and unveils agent security platformOct 5, 2026 · Agent Age
- Hungarian AI Act guides: KPMG, SME checklist, lawyer interview, Blikk seriesAug 27, 2026 · Jog
Also known as
self-reflection · reflection · self-critique · self-check · self-reflection · self-critique · reflection · agent self-reflection
Sources
- Shinn et al.: Reflexion: Language Agents with Verbal Reinforcement Learning (arXiv, 2023)
- Madaan et al.: Self-Refine: Iterative Refinement with Self-Feedback (arXiv, 2023)
This entry was machine-edited and has undergone machine expert review; the “In the news” section updates automatically from Agent Age stories.