Home › Glossary › Generative AI › Reflexion

Intermediate · Generative AI

Reflexion

Visual diagram · (in preparation) · Math · (in preparation) · Worked example · 3 difficulty levels.

TL;DR. An agent technique where an LLM reflects on failed attempts and writes verbal self-feedback into memory to guide future trials.

Technical Definition

An agent technique where an LLM reflects on failed attempts and writes verbal self-feedback into memory to guide future trials.

How it works

Reflexion (Shinn et al., 2023) augments an agent with episodic memory of natural-language self-critiques. After each trial, an evaluator scores the trajectory and the actor LLM writes a short reflection explaining what went wrong. These reflections are prepended to future prompts, letting the agent improve across attempts without weight updates. It outperforms vanilla ReAct on coding and decision-making benchmarks.

Related Concepts

  • Chain-of-Thought (CoT) Prompting — Asking models to show step-by-step reasoning before giving a final answer, improving accuracy on complex tasks.
  • AI Agent — An AI system that autonomously plans, uses tools, and takes actions to accomplish goals through iterative reasoning.
  • Agentic AI — AI systems designed to independently plan, execute, and adapt actions to achieve a given goal, often involving multiple steps and external tools.