11One agentContested
Reflection
The agent critiques its own output or past attempts, then tries again.
Also called Self-reflection, Reflexion, Self-correction
Shinn et al., Huang et al., LangChain, DeepLearning.AI
The problem
A first output often falls short, and feedback usually improves it.
You may have had the experience of prompting ChatGPT/Claude/Gemini, receiving unsatisfactory output, delivering critical feedback to help the LLM improve its response, and then getting a better response.
Therefore
Reflection is a prompting strategy used to improve the quality and success rate of agents and similar AI systems. It involves prompting an LLM to reflect on and critique its past actions, sometimes incorporating additional external information such as tool observations.
What if you automate the step of delivering critical feedback, so the model automatically criticizes its own output and improves its response? This is the crux of Reflection.
Reflexion agents verbally reflect on task feedback signals, then maintain their own reflective text in an episodic memory buffer to induce better decision-making in subsequent trials.
In use
Andrew Ng
Reflection is a relatively basic type of agentic workflow, but I've been delighted by how much it improved my applications’ results in a few cases.
Where it breaks
It takes extra time, and without outside feedback a model may not find its own mistakes.
Reflection takes time! All the approaches in this post trade off a bit of extra compute for a shot at better output quality.
expecting these models to inherently recognize and rectify their reasoning mistakes is overly optimistic so far
Sources
- Reflexion: Language Agents with Verbal Reinforcement LearningNoah Shinn, Federico Cassano, Edward Berman, Ashwin Gopinath, Karthik Narasimhan, Shunyu Yao, Shinn et al., Mar 20, 2023
- Large Language Models Cannot Self-Correct Reasoning YetJie Huang, Xinyun Chen, Swaroop Mishra, Huaixiu Steven Zheng, Adams Wei Yu, Xinying Song, Denny Zhou, Huang et al., Oct 3, 2023
Amidst this backdrop, the concept of “self-correction” has emerged as a promising solution, where LLMs refine their responses based on feedback to their previous outputs
- Reflection AgentsAnkush Gola, LangChain, Feb 21, 2024
Reflexion by Shinn, et. al., is an architecture designed to learn through verbal feedback and self-reflection.
- Agentic Design Patterns Part 2: ReflectionAndrew Ng, DeepLearning.AI, Mar 27, 2024
This self-reflection process allows the LLM to spot gaps and improve its output on a variety of tasks including producing code, writing text, and answering questions.
Added Nov 14, 2026


