Applications GUIDE

Reflexion and Self-Correcting Agents

Reflexion is a research framework in which language agents use task feedback to write textual reflections for later attempts.

Listen to this guideAI-narrated · ~1 min

On this page1 min read
  1. Overview
  2. Deep Dive
  3. Real-World Implementation
  4. The Future of Reflexion and Self-Correcting Agents
  5. Putting it into practice
  6. Keep Exploring
  7. Frequently asked questions

Overview

It changes context, not model weights.

Deep Dive

The Reflexion paper describes an Actor that attempts a task, an Evaluator that scores the result, and a Self-Reflection model that turns feedback into language stored in episodic memory. The next attempt can use that reflection as context; the framework does not update model weights. The paper reports improvements on selected tasks, including a HumanEval result for its particular setup. Benchmark results should not be generalized to every agent or deployment. In the Reflexion paper’s reported coding experiment, the framework achieved 91% pass@1 on HumanEval, compared with 80% for the GPT-4 baseline described in that paper. These are results for the paper’s particular setup and benchmark, not a general performance guarantee.

Real-World Implementation

An agent receives unit-test feedback, writes a reflection, and retries a coding task.

A researcher compares Reflexion’s benchmark setup with its stated baseline.

An evaluator supplies task-specific feedback that the agent can inspect.

A developer stops iteration when a defined success condition is met.

The Future of Reflexion and Self-Correcting Agents

Self-correction methods remain dependent on evaluation quality, task design, and iteration cost. Avoid claims of general improvement without testing; reflections can be mistaken or lead to loops.

Putting it into practice

Why it matters

  • Build choices. Application-level design determines whether AI improves real outcomes.
  • Team and workflow. Good workflow integration creates productivity gains users can trust.
  • Risk and safety. Well-scoped use cases reduce change fatigue and implementation risk.

Watch out for

  • Automating a broken process can amplify existing problems.
  • Teams may over-automate and remove needed human judgment.
  • Quality can drift if outputs are not continuously evaluated.

Next steps

  1. Map the current workflow and identify the highest-friction step.
  2. Define human checkpoints before full automation.
  3. Train users on prompts, escalation paths, and quality standards.
  4. Track task-level outcomes to confirm sustained value.

Keep Exploring

Free newsletter

Get the daily AI briefing

Three verified AI stories every weekday morning, written in plain English. Free forever, no ads.

One email each weekday. Unsubscribe in one click. We never sell or share your address.

Test yourself

Take the Reflexion and Self-Correcting Agents quiz

Instant feedback on every answer, and a shareable certificate with a verifiable ID once you pass a course.

Start quiz

Support free AI education. AI Understanding is a 501(c)(3) nonprofit — no ads, no paywall, ever. Make a donation

Frequently asked questions

What is Reflexion and Self-Correcting Agents?

Reflexion is a research framework in which language agents use task feedback to write textual reflections for later attempts. It changes context, not model weights.

What is the defining characteristic of how a Reflexion agent 'learns'?

Reflexion is sometimes called 'verbal reinforcement learning' because lessons are stored as natural-language text in memory, not encoded into the model's parameters.

In the Reflexion framework, what does the Evaluator do?

The Evaluator (a unit test, exact-match check, or LLM judge) produces the signal that the Self-Reflection step turns into a textual lesson.

Why does the quality of the evaluation signal matter so much in Reflexion?

If the evaluator is unreliable, the agent may write confident reflections based on bad feedback, steering future attempts in the wrong direction.

On which coding benchmark did the Reflexion paper report a 91% pass@1 result?

The paper reports 91% pass@1 on HumanEval for its Reflexion coding setup; the result is specific to that evaluation.

Which is a genuine open risk with self-correcting agents?

Without a good stopping rule, an agent may keep revising correct answers, wasting compute and sometimes degrading good output.

Reflexion and Self-Correcting Agents | AI Understanding