What is the reflection pattern?
The reflection pattern has an AI model critique and revise an initial answer, optionally using external checks, before the model produces the final result.
The reflection pattern is an approach in which an artificial intelligence model produces an answer, examines it for weaknesses, and revises it before delivery. The review can repeat, and it can draw on external feedback, such as a test result, or on a critique the model writes itself. The Self-Refine method uses the same model to generate, critique, and revise an answer without additional training. A distinct approach, Reflexion, saves reflections in a text memory for later attempts without changing the model's weights (the parameters learned during training). Memory is therefore a design choice rather than a requirement for every review loop. A plausible critique can still be wrong. Deciding whether to adopt the pattern means comparing results with and without review on the real task, against independent checks chosen for that business use case and its risks.
See also: AI Agents (Agentic AI)An AI agent is a system that uses a model and external tools to select and perform actions toward a goal, within established boundaries and permissions.
What feedback guides revision
Asking for self-critique adds a step; it does not prove correctness. In a study of self-correcting reasoning without external feedback, the models tested struggled to correct themselves and sometimes performed worse. The Self-Refine study, by contrast, reports improvements on tasks like dialogue and code but near-zero gains on math reasoning, where the model often fails to recognize its own errors. Neither study shows that revision improves every answer.
Where an independent check exists, its result can guide the critique. For code, an automated test verifies an expected behavior, though passing it does not prove every case is correct. Saving the critique as text lets it carry over to the next attempt, but the model may still ignore it. Unlike task decomposition, which plans the steps, reflection examines a result already produced.
An enterprise example
A team asks an agent to write a function that processes orders. The team writes its own tests for missing fields and invalid amounts and runs them on the first draft. If a test fails, the model receives the error message, writes a critique, and generates a revised version. The tests run again; a reviewer checks the code and untested cases before release. This is an illustrative scenario, not a measured result from a client.
The software coordinating the model and its tools, the agent harness, can record drafts, critiques, and test results. If reflections are retained between attempts, the team must decide which data to include and for how long, and avoid treating an old critique as valid for every new order.
Why it matters for decision makers
Before purchasing or releasing, compare the review loop against a single answer generated from equally complete instructions on the same representative cases. Measure remaining errors, answers flipped from correct to incorrect, time, token usage, and human interventions. Each round adds processing, so cap attempts and hand the case to a person when checks fail. Ask the vendor which feedback is independent, which records are retained, and whether reflections persist beyond the session. For sensitive decisions, a revised answer still needs verification and does not count as approval. It remains a proposal.
Frequently asked questions
Related terms
- AI Agents (Agentic AI)An AI agent is a system that uses a model and external tools to select and perform actions toward a goal, within established boundaries and permissions.
- Agent harnessAn agent harness is the software scaffolding around an LLM that makes it an agent: the execution loop, the tools, the context and the limits you give it.
- Task decompositionThe process by which an agent breaks a complex goal into smaller sub-goals before acting.
- Argumentation frameworkA formal structure of arguments and attacks that decides which conflicting claims survive, and shows why.