Reflection Pattern
An agent technique where the AI evaluates its own output or reasoning, identifies weaknesses or errors, and generates an improved version. Reflection enables self-correction without external feedback.
The reflection pattern adds a self-evaluation step to agent workflows. After generating an initial output, the agent is prompted to critically review its own work: Is the reasoning sound? Are there errors or omissions? Does the output meet the original requirements? Based on this self-assessment, the agent produces a refined version. This can repeat for multiple rounds of improvement.
For content generation, code writing, and analysis tasks, reflection significantly improves output quality. A marketing copy agent that drafts, critiques, and revises produces noticeably better results than one that generates a single draft. The practical considerations are cost and latency, since each reflection cycle doubles or triples the token usage. Set clear improvement criteria so the agent knows what to look for during reflection, and limit reflection rounds to prevent diminishing returns. Two to three reflection cycles typically capture the majority of quality improvements. Beyond that, you are often paying for marginal gains that a human reviewer could achieve more efficiently.
Related Terms
Model Context Protocol (MCP)
An open standard that defines how AI models connect to external tools, data sources, and services through a unified interface. MCP enables agents to dynamically discover and invoke capabilities without hardcoded integrations.
Tool Use
The ability of an AI model to invoke external functions, APIs, or services during a conversation to perform actions beyond text generation. Tool use transforms language models from passive responders into active problem solvers.
Function Calling
A model capability where the AI generates structured JSON arguments for predefined functions rather than free-form text. Function calling provides a reliable bridge between natural language understanding and programmatic execution.
Agentic Workflow
A multi-step process where an AI agent autonomously plans, executes, and iterates on tasks using tools, reasoning, and feedback loops. Agentic workflows go beyond single-turn interactions to accomplish complex goals.
ReAct Pattern
An agent architecture that interleaves Reasoning and Acting steps, where the model thinks about what to do next, takes an action, observes the result, and repeats. ReAct combines chain-of-thought reasoning with tool use in a unified loop.
Chain of Thought
A prompting technique that instructs the model to break down complex problems into sequential reasoning steps before producing a final answer. Chain of thought significantly improves accuracy on math, logic, and multi-step tasks.