Reflection pattern for LLMs: a self-critique loop that improves correctness, clarity, and reliability with measurable quality gates, ROI, and safety controls
September 11, 2026 ∙ 5 minutes read

The reflection pattern is one of four key agentic AI design patterns (alongside tool use, planning, and multi-agent collaboration) that enable AI systems to handle complex tasks. It allows an AI agent to generate an output, critique it, and amend it. This feedback loop makes it easier for the agent to catch errors and improve output quality.
How the reflection pattern worksLet’s say a team has built a business process automation solution, such as a customer support agent chat, that uses a reflection pattern. Once the agent is triggered, it follows a three-stage loop.
1.GenerateFirst, the agent’s attached AI model creates an initial response to the prompt, which in this case is a customer’s question. It accesses its resources, such as product documentation or company policies, to create a “first draft” response. It then holds the output in a temporary state for self-evaluation.
2.ReflectNext, the agent prompts either the same or a different model to critique the initial generation based on predefined criteria a developer has built into the pattern design. In this case, it may ask itself questions like “Did I consider all company policies?” and “Did I provide an answer that could be harmful or incorrect?” If the agent developer has opted to use a tool-augmented reflection pattern, the model may access external systems, such as a search engine, to complete its evaluation. The model catches and catalogs potential flaws that need to be fixed before responding to the customer.
3.RefineThe agent feeds its original draft and critique back into the generative model. It uses the additional context to revise its response. It corrects errors and removes irrelevant information to produce a higher-quality output.
It’s important for the agent’s developer to establish stopping criteria, such as a fixed number of iterations, to stop the agent from getting stuck in an indefinite refinement loop. Without stopping criteria, the agent might burn through model tokens or iterate past the optimal response and reduce its quality. Setting the right stopping point can reduce computational cost and latency while preserving output quality.
Once the agent has reached its stopping point, it returns the refined output to the customer, answering their question.
A simplified diagram illustrating the reflect-refine pattern. Note that the Generate / Refine steps are not necessarily single-turn LLM completions. These can be multi-turn AI-agents with their own tools and RAG.Reflection pattern variationsAgent developers should choose a reflection pattern variation that meets their needs for output quality and latency tolerance. This is particularly important as the agent parses multiple sources of feedback.
Single-model self-reflectionSingle-model self-reflection is the simplest reflection pattern design strategy. In this setup, the model that the agent uses is both the generator and the evaluator. The model critiques its generative output based on predetermined criteria. The agent then feeds the model’s critique back into its generation prompt. This design pattern is straightforward and can improve an agent’s output. But the model is limited to its own internal knowledge and reasoning processes to evaluate its work. It may fail to recognize its errors and possibly reinforce hallucinations in its final output, which is often called a self-preference bias.
Multi-agent reflectionAgent developers may choose to design reflection patterns with multiple agents to reduce the quality risks associated with single-model reflection. In this approach, one agent controls the model’s generation and sends the first draft to a second agent to oversee the reflection. Think of it as a type of peer review. An agent or model with a distinct reasoning process can catch errors or hallucinations the original model may overlook.
Tool-augmented reflectionThis design pattern introduces external tools into the reflection stage. If the model determines that its internal knowledge and reasoning is insufficient to correct an error, it can invoke an external tool, such as a search engine or database. This process often improves the model’s ability to validate factual claims, but it depends on the accuracy of the external tool or data used.
AI architects and engineers can use workflow automation tools like n8n to run multi-step reasoning agents or agentic Retrieval-Augmented Generation (RAG). Engineers can work with SDKs. However, when using workflow automation tools with a visual interface, they can iterate more quickly and better track the progress of each stage. n8n is a source-available, AI-native automation platform, where engineers and nontechnical users alike can create AI agents and agentic workflows. Users can chain multiple AI agent nodes with a distinct system prompt for generation and another for critique. These nodes are connected via sub-workflows to manage complex modular processes.
When to use the reflection pattern (and when not to)Choosing the right design pattern can have a significant impact on the performance and cost of your AI task automation. The reflection pattern can improve output quality, but it may not be the best choice for your project.
You might want to use a reflection pattern if your project meets the following criteria:
You might want to use a different design pattern if your project meets the following criteria:
If you’re interested in using the reflection pattern but are worried about cost, n8n can help. You can use the platform to track AI agent token consumption and costs with an API, easily swapping between models. If reflection ends up being too expensive for your use case, you can adjust your workflow.
Implement agentic design patterns with n8nIf you need to improve the accuracy and quality of an AI agent’s output, the reflection pattern may be a good design pattern to try. You can use n8n’s sub-workflow architecture, AI agent nodes, and conditional branching to implement reflection loops visually. Get started with a free trial today.
FAQWhat are common uses of reflection patterns?In addition to software development, the reflection pattern is used in areas such as content creation and editing, data analysis and reporting, as well as legal and financial summaries. In all these cases, the initial result may be incomplete or contain inaccuracies, so a single cycle of automatic review and correction often helps improve the results.
What’s the difference between Reflexion and reflection patterns?A reflection pattern is a specific design strategy for models to iterate their way to better answers. Reflexion is a general research approach that helps AI systems learn from mistakes across multiple independent trials.
| # | Наименование новости | Тональность | Информативность | Дата публикации |
|---|---|---|---|---|
| 1 | Reducing AI Workflow Latency: Patterns That Actually Work | 0 | 6.85 | 19-09-2026 |
| 2 | AI Agent Reliability: Debug, Evaluate, and Monitor in Production | 0 | 5.74 | 08-09-2026 |
| 3 | Prompt Testing Frameworks for Production AI Workflows | 0 | 8.04 | 21-09-2026 |
| 4 | Long-running agents beyond prompt engineering | 0 | 8.79 | 31-08-2026 |
| 5 | Process Orchestration: Execution Models, Observability, and Production Challenges | 0 | 7.16 | 11-09-2026 |
| 6 | United States: Legal Accountability for AI Agents | 0 | 10 | 01-07-2026 |
| 7 | The search for consciousness inside LLMs | 0 | 10 | 20-08-2026 |
| 8 | AI Agents Teamed Up to Cheat at Blackjack. Their Collusion Is Getting Harder to Spot | 0 | 14.22 | 23-09-2026 |
| 9 | Linux Kernel Developers Consider Adding AGENTS.md To Help Guide AI/LLM Agents | 0 | 5.48 | 25-09-2026 |
| 10 | How to Reason with Words: Models, Metaphors, Metaphysics | 0 | 5.25 | 06-10-2026 |