ModelRefs / Reflexion — Prompt Pattern

Reflexion — Prompt Pattern

Agent reflects on failure traces and writes lessons into memory for next attempt.

Overview

After a failed attempt, the agent generates verbal feedback (a 'reflection') stored in memory, then retries with that memory in context.

When to use it: Agents that retry the same task and should improve across attempts.

Pattern details

Pattern classagent
Difficultyadvanced
Also known asverbal reinforcement
Last reviewed2026-06-07

Known failure modes

  • Vague reflection — Lesson is too abstract to help. Mitigation: Force reflection to cite a concrete trajectory step.

When not to use it

  • Reflexion without persistent memory (lessons lost).

Continue your research

Use these connected ModelRefs sections to compare alternatives, inspect implementation paths, and review the evidence and governance boundaries relevant to Reflexion — Prompt Pattern.

Frequently asked questions

When should I use the Reflexion prompt pattern?

Agents that retry the same task and should improve across attempts.

What are common failure modes of Reflexion?

Vague reflection

Does Reflexion work across models?

Yes when the anatomy is preserved — see model compatibility matrix on the pattern page.