Agentic Design PatternsPart 2: Reflection
Andrew Ng on the simplest agent pattern: let a model critique its own work, then improve it. Summarized for the club.

REFLECTION. LOOK AGAIN, THEN IMPROVE.
A club summary. The full letter lives in The Batch.
READ THE ORIGINALThe idea.
Most people ask a model for an answer and keep the first draft. Reflection adds one step: ask the model to review that draft, find what's wrong, and fix it.
It hands the model the feedback you would normally give it yourself. Andrew describes it as quick to implement, with results that often surprise.
Try it on code.
Ask for a function. Send it back with a request to check it for bugs, style and speed. Take the critique, ask for a rewrite, and repeat until it holds up.
Review the function you just wrote.
Where could it break? Where is it slow?
List the problems first. Then rewrite it.The same loop works for writing, answers and plans.
Let it check with tools.
Reflection gets sharper when the model can test its own work. Run the unit tests. Search the web to confirm a fact. Then ask it to reflect on real results instead of guesses.
Ask for a draft. Then ask what's wrong with it.
Split the roles.
Use two agents. One writes. The other critiques. Their back and forth pushes the answer further than a single pass can.
Go deeper.
Andrew points to three papers behind the pattern.
- Self-Refine: Iterative Refinement with Self-FeedbackMADAAN ET AL.
- Reflexion: Language Agents with Verbal Reinforcement LearningSHINN ET AL.
- CRITIC: Large Language Models Can Self-Correct with Tool-Interactive CritiquingGOU ET AL.
Summary by the club. Original by Andrew Ng in The Batch.
READ THE ORIGINAL