Reflection

Reflection is a technique in which an AI system reviews its own output or failed attempt, writes a critique in plain language and uses it to try again, without any change to the model's weights.

Reflection adds a review step to an AI system. The model produces an answer or attempts a task, then a critique is written, either by the same model or by a separate evaluator, and the next attempt uses that critique. The feedback can come from the model itself or from outside signals such as test results, error messages or a checking program. Nothing in the model is retrained; the improvement comes from what is added to the prompt.

Two papers from March 2023 made the idea popular. Reflexion, by Noah Shinn and colleagues, had agents reflect in words on feedback about their performance, store those reflections in a memory buffer and draw on them in later attempts. It reported 91 per cent pass@1 on the HumanEval coding benchmark, against 80 per cent for GPT-4. Self-Refine, by Aman Madaan and colleagues, had one model generate, critique and revise its own output, and reported an average improvement of about 20 percentage points across seven tasks.

A coding agent shows how it works in practice. It writes a function and runs the tests; two fail. It notes that it forgot to handle an empty list, rewrites the function with that note in mind and runs the tests again. The failing tests are the key ingredient: they tell the agent something it could not see by rereading its own code.

That points to the main limit. A 2023 paper by Jie Huang and colleagues, published at ICLR 2024 as Large Language Models Cannot Self-Correct Reasoning Yet, found that models struggled to fix their reasoning without external feedback, and sometimes got worse after trying. A model rereading its own answer brings the same blind spots that produced it. Reflection works best when something outside the model supplies the signal.

Anthropic's guide Building effective agents describes a related evaluator-optimiser pattern, in which one model generates and another evaluates and gives feedback in a loop, and says it fits best when the criteria for a good answer are clear. Each round costs extra model calls and time, so reflection loops need a stopping rule.

Common questions

What is reflection in AI agents?

It is a step where an agent looks back at its output or a failed attempt, writes down what went wrong and uses that note to do better next time. The notes can be kept in memory across attempts. It improves results through the prompt rather than by retraining the model.

Can large language models correct their own mistakes?

Sometimes, mainly when they get outside feedback such as failing tests, tool errors or a checker's verdict. A study published at ICLR 2024 found models struggled to correct their reasoning without such feedback and sometimes made answers worse. Self-review alone is a weak safeguard.

What is the difference between Reflexion and Self-Refine?

Both appeared in March 2023. Reflexion stores verbal reflections on task feedback in a memory buffer and uses them over repeated attempts, and was tested on tasks including coding. Self-Refine has a single model generate, critique and revise its own output in a loop, without needing extra training data.

Does reflection change the AI model?

No. The model's weights stay the same. Reflection changes what the model is given to read on its next attempt, by adding its own critique or stored lessons to the prompt.

Finding more

Search for "Reflexion language agents", "Self-Refine" or "LLM self-correction" to find the main papers and the debate about them. Research papers on arXiv and in conference proceedings such as ICLR and NeurIPS are the primary sources, and engineering guides from AI developers show how the idea is used in products. Look closely at whether a reported gain came from the model's own critique or from external feedback such as test results.

Working out what this means for your business?

Aileron Shift builds the systems behind this site: AI newsrooms that research, write and publish on their own, marketing automation and WordPress hosting for companies that need to move faster than their competitors.