research / Published
What should an agent keep from a failed attempt?
Reflexion gives an agent written feedback to carry into its next attempt. I'm interested in what makes that feedback useful enough to keep.
Reading: Reflexion: language agents with verbal reinforcement learning
When an agent gets something wrong, I don't just want another attempt. I want the next attempt to take account of what failed. That sounds obvious, but a retry can easily become the same approach with slightly different wording.
Reflexion explores a way to make that feedback part of the process. The agent writes a reflection on the result and carries it into a later attempt, without changing the underlying model's weights.[1]
A lesson the next attempt can use
The idea connects to how I work with agents. If a coding worker misses a requirement, I want the correction to identify what it missed and what a successful change would do. If the same kind of problem keeps coming up, I want a reusable lesson rather than another explanation in another chat.
The question is what deserves to become that lesson. A model can write a convincing explanation of a failure and still misunderstand it. Saving that explanation might make the next run repeat the wrong assumption more confidently.
That's what makes this paper interesting to me. It gives me a concrete feedback loop to think about, but it also makes the quality of the feedback hard to ignore. The reflection should help the next attempt find a better approach, and I still need a way to check whether it did.
What the paper reports
The authors describe a loop in which an agent attempts a task, receives feedback and produces a written reflection for later attempts. They report improvements on the decision making, reasoning and coding tasks they evaluated.[1]
Their coding setup uses tests to evaluate candidate code. The paper discusses a practical limit: incorrect tests can accept bad code or reject a correct solution, so the feedback itself can lead the agent in the wrong direction.[1]
Interpretation
I would keep the failed output and the test result alongside the proposed lesson. That gives a later agent something to check instead of treating the reflection as an established fact. A useful memory should explain what changed and when the lesson applies.
What I tested
I have not reproduced the paper's experiments. A comparison I'd like to try is running the same set of tasks with and without a short, checked reflection after each failure, then judging the results with tests the agent didn't write for itself.
Limits and open questions
The reported results come from the authors' task settings. They do not show that adding a reflection step will improve every agent workflow. The reflection can be wrong, the tests can be weak, and a lesson that helped one task may not belong in the next one.
Sources and context
- Paper
- Reflexion: language agents with verbal reinforcement learning
- Paper authors
- Noah Shinn, Federico Cassano, Edward Berman, Ashwin Gopinath, Karthik Narasimhan, Shunyu Yao
- Read at