Flashcard: how does Reflexion let an agent learn from failed runs?
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
Reflexion has the agent attempt a task, fail, write a natural-language post-mortem to episodic memory, and prepend that reflection on the next attempt. The agent learns from failure without any weight updates.
Imagine a student who fails a coding test, then sits down and writes a one-paragraph note to their future self: I used the wrong loop, I forgot the base case, next time check the edge cases first. They paste that note on their desk. The next time they take a similar test, they read the note before starting. They are not any smarter in the brain sense, but they are smarter in the context sense because the note tells them what to avoid. Reflexion does exactly that for an AI agent. After a failed attempt, the agent writes a short reflection about what went wrong, stores it, and reads it before the next attempt. No retraining, just self-written notes that make the next try better.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
Define Reflexion as an outer loop that attempts, reflects on failure in natural language, stores the reflection, and retries with it in context. Stress that no weights update. Name the four components: actor, evaluator, reflection module, episodic memory. Attribute to Shinn et al. 2023. Close with the two main failure modes: bad evaluator and unfiltered memory retrieval.
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Calling Reflexion a fine-tuning method or a weight update. The whole point is that no weights change; the learning lives in a self-written reflection that is fed back as in-context input.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.