← Lessons

quiz vs the machine

Gold1450

Machine Learning

Reflexion and Self Improvement

Letting agents critique their own failures and retry smarter.

5 min read · core · beat Gold to climb

Learning within an episode

Reflexion gives an agent a way to improve without retraining weights. After a failed attempt, the agent writes a short verbal critique of what went wrong and stores it. On the next try it reads that critique and avoids the same mistake.

The pieces

  • Actor the agent that attempts the task
  • Evaluator a signal that says whether the attempt succeeded
  • Reflection a written lesson generated from the failure
  • Memory holds reflections so future attempts can use them

The loop

The agent tries, gets graded, reflects on the gap, and retries with that reflection in context. Improvement comes from accumulated self feedback, not gradient updates.

Where it shines and breaks

Reflexion helps most when there is a clear success signal and room to retry, such as coding tasks with tests. It struggles when feedback is noisy or when reflections grow so long they crowd out the real task. Keep reflections concise and specific.

Key idea

Reflexion improves an agent inside a single session by turning failures into short written lessons that guide the next attempt, no weight updates required.

Check yourself

Answer to earn rating on the learn ladder.

1. How does Reflexion improve an agent without retraining?

2. When does Reflexion work best?