Agent Reflection
Definition
Reflection is a metacognitive strategy where an agent evaluates, critiques, and iteratively improves its own outputs. It shifts models from “fire-and-forget” generation to deliberate, System-2-style reasoning through self-assessment loops.
Details
Reflection is not an innate LLM capability but an engineered technique implemented through prompting, fine-tuning, or architectural patterns. Key mechanisms:
1. Output Reevaluation The model feeds its own response back into the prompt with a critique instruction: “Was the previous answer correct? If not, why?”
2. Reflexion Framework A structured method where the agent:
- Attempts a task
- Observes the outcome (success/failure)
- Reflects on what went wrong
- Re-attempts with improved strategy
3. Memory-Enhanced Reflection Stores episodic memory of past failures and successes, which the agent queries before generating new outputs to avoid repeating mistakes.
4. Multi-Agent Reflection Uses separate “Generator” and “Reflector” agents in a feedback loop, where the Reflector critiques the Generator’s output until quality thresholds are met.
Trade-offs:
- Benefits: Improved accuracy, logical soundness, bias mitigation
- Costs: Significant latency increase (multiple inference passes) and higher token consumption
Connections
- Related to: Self-Evolving Agents (reflection enables continuous improvement)
- Related to: Agent Memory (episodic memory stores reflection outcomes)
- Technique used in: Cognitive Depth Adaptation (System 2 thinking)
Sources added by Heal on 2026-04-06:
- Iguazio - LLM Agent Reflection · 2026-04
- ArXiv - Reflexion Framework · 2026-04
- LangChain - Reflection Patterns · 2026-04