Skip to content

Reflection Pattern


🎯 Difficulty Level: Complex
⏱️ Reading Time: 15 minutes
👤 Author: Rob Vettor
📅 Last updated on: November 27, 2025

Behind Image

What is Reflection?

The Reason-Act-Reflect (sometimes called “Reflection Agent” or “Reflection Loop”) adds a critical, third phase: reflection after action:

Reason: Analyze the situation, break down the problem.

Act: Take a step (e.g., extract info, call a tool, output an answer).

Reflect: Critically review the action and its result:

Was the outcome correct and complete?

Did it address the goal?

What, if anything, is missing or needs clarification?

Optionally, revise the reasoning or actions based on reflection.

The “Reflect” phase is what elevates the workflow—allowing for self-correction, error detection, and higher reliability.

Why Reflection Matters in Agentic Workflows Catches errors before results are finalized.

Surfaces missing information or gaps (very useful in customer/engagement scenarios).

Emulates expert human workflows, where professionals review and double-check before delivery.

Example in your scenario:

Reason: Infer customer’s business problem.

Act: Extract from transcript.

Reflect: Did I infer all drivers? Did I miss context? Do I need to ask clarifying questions?

Key Difference ReAct: Cycles between reasoning and acting—good for exploration and tool use, but may miss errors or gaps unless prompted again.

Reason-Act-Reflect: Adds a dedicated, explicit reflection/validation step, increasing robustness and reliability.

References/Recent Work “Reflexion: an autonomous agent with dynamic memory and self-reflection” (arxiv)

“Reflection” in agentic workflows discussed by OpenAI, Microsoft, and Anthropic in their latest agent orchestration frameworks.

Summary:

Reason-act-reflect improves upon ReAct by embedding an explicit self-check or validation step after each act, making the workflow more resilient and suitable for high-stakes, enterprise, or multi-step tasks—like your Engagement Lens Workflow.

origin/main

Reflection Pattern


🎯 Difficulty Level: Complex
⏱️ Reading Time: 15 minutes
👤 Author: Rob Vettor
📅 Last updated on: November 27, 2025

Behind Image

What is Reflection?

The Reason-Act-Reflect (sometimes called “Reflection Agent” or “Reflection Loop”) adds a critical, third phase: reflection after action:

Reason: Analyze the situation, break down the problem.

Act: Take a step (e.g., extract info, call a tool, output an answer).

Reflect: Critically review the action and its result:

Was the outcome correct and complete?

Did it address the goal?

What, if anything, is missing or needs clarification?

Optionally, revise the reasoning or actions based on reflection.

The “Reflect” phase is what elevates the workflow—allowing for self-correction, error detection, and higher reliability.

Why Reflection Matters in Agentic Workflows Catches errors before results are finalized.

Surfaces missing information or gaps (very useful in customer/engagement scenarios).

Emulates expert human workflows, where professionals review and double-check before delivery.

Example in your scenario:

Reason: Infer customer’s business problem.

Act: Extract from transcript.

Reflect: Did I infer all drivers? Did I miss context? Do I need to ask clarifying questions?

Key Difference ReAct: Cycles between reasoning and acting—good for exploration and tool use, but may miss errors or gaps unless prompted again.

Reason-Act-Reflect: Adds a dedicated, explicit reflection/validation step, increasing robustness and reliability.

References/Recent Work “Reflexion: an autonomous agent with dynamic memory and self-reflection” (arxiv)

“Reflection” in agentic workflows discussed by OpenAI, Microsoft, and Anthropic in their latest agent orchestration frameworks.

Summary:

Reason-act-reflect improves upon ReAct by embedding an explicit self-check or validation step after each act, making the workflow more resilient and suitable for high-stakes, enterprise, or multi-step tasks—like your Engagement Lens Workflow.

<<<<<<< main

<!—

Links:

https://med <!—

Links:

https://medium.com/data-science-collective/stop-prompting-start-designing-5-agentic-ai-patterns-that-actually-work-a59c4a409ebb

—>

-main ntic Apps? Reflection is a deliberate step where an agent (or multi-agent system) pauses after one or more actions to analyze its own reasoning, outputs, and progress toward its goal. The agent “looks back” at what it just did, evaluates whether the outcome is satisfactory, and may revise its plan, state, or next steps before proceeding.

Purpose: To catch errors, refine actions, recover from confusion, and improve performance mid-process—not just at the end.

Common in: Chain-of-Thought prompting, ReAct, Reflexion, AutoGPT-style systems, and multi-step tool use.

  1. How is Reflection Implemented? A. Single-Agent Implementation Prompt Engineering: After a step, inject a prompt like:

“Reflect: Was your last answer correct? Did you miss anything? Should you adjust your plan?”

State Update: The agent’s state or memory is updated with the reflection output.

+Updated upstrea ormation needed? Should you revise? ```

B. Multi-Agent Implementation Specialist Reflector Agent: Assign a dedicated “reflector” agent to audit others’ outputs.

Peer Review: One agent performs a task, another reflects and suggests improvements.

Supervisor Pattern: A “supervisor” agent collects step results and triggers reflection/rewind when necessary.

C. Automated Reflection Heuristic Triggers: If confidence score is low, or a contradiction is detected, initiate reflection.

Scheduled Reflection: After each major step, or after a fixed number of actions.

  1. Best Practices for Reflection Granularity: Reflect after significant actions, not after every trivial step.

Prompt Clarity: Use explicit, focused reflection prompts (e.g., “Did you satisfy all user constraints?”).

Self-critique: Encourage the agent to generate reasons why an output might be incomplete or flawed.

Iteration Cap: Prevent infinite reflection loops by limiting retries or “reflection depth.”

Memory Integration: Store reflection notes in the agent’s memory to inform future steps.

Tool Use: For complex tasks, reflection can trigger re-invocation of tools or alternate tools.

  1. Contrast: Reflection vs. Feedback Loops Aspect Reflection Feedback Loop Timing During/after each action or phase Typically after final output, or via user signals Who Triggers Agent self-initiated (internal) User/system-initiated (external) Purpose Immediate self-correction or plan revision System improvement, learning, or ongoing tuning Scope Local (to the current process/run) Global (improves future runs/overall performance) Example “Was my answer correct?” (agent asks itself) User says “That’s wrong,” system learns for next time Implementation Internal prompting, memory update User rating, A/B testing, RLHF, logging

Summary Table Reflection (Internal) Feedback Loop (External) When In-process, mid-task Post-process, after task/user Driver Agent self-review User/system feedback Action Immediate correction/adaptation Future learning/improvement Example Self-critique, plan revision User thumbs-down, retraining

  1. Example Agentic Purchase Order App

Step: Agent suggests a supplier.

Reflection: “Did I consider all vendor policies? Was the user’s preferred vendor evaluated?”

Action: If the agent missed a constraint, it re-plans before finalizing.

Feedback Loop: After user accepts/declines, app learns user preferences for next time.

  1. References for Further Reading ReAct: Synergizing Reasoning and Acting in Language Models (Yao et al.)

Reflexion: Language Agents with Verbal Reinforcement Learning (Shinn et al.)

OpenAI Cookbook: Reflection and Tool Use

In short: Reflection is a self-driven, in-run “check and adapt” step, while feedback loops are for longer-term, external signals to improve the system over time. Both are crucial—reflection improves reliability now, feedback loops improve performance next time.

--> <<<<<<< Updated upstream

origin/main