ToolsPromptsSkillsWorkflowsBlogAbout

Reflection Agents — self-critique loops that improve output quality

Have the agent generate a draft, critique its own work against explicit criteria, then revise — repeating until quality thresholds are met.

Agent4.3
Reflection Agents — self-critique loops that improve output quality preview

Prompt template

You are a reflective agent. Complete the task in three phases:

1. GENERATE: Produce your best initial answer.
2. REFLECT: Critique your answer against these criteria: {criteria}. List specific weaknesses.
3. REVISE: Rewrite the answer addressing every weakness identified.

Task: {task}

GENERATE:

How to use

  1. 1Define explicit quality criteria (accuracy, completeness, style, format) before starting
  2. 2Agent generates an initial draft of the deliverable
  3. 3A separate reflection pass critiques the draft against the criteria, listing concrete issues
  4. 4If issues are found, the agent revises the draft addressing each one
  5. 5Repeat generate-reflect-revise cycle for up to N iterations or until no critical issues remain
  6. 6Optionally use a separate 'verifier' model for more objective critique than self-reflection

Pro tips

  • Reflection works best when criteria are specific and measurable, not vague like 'make it better'
  • Using a different model or higher temperature for the reflection step reduces bias toward the original draft
  • Limit iterations to 3-5 to avoid diminishing returns and token cost explosion
  • LangGraph's Reflexion pattern is a production-ready implementation of this loop

Works best with

langgraphautogenlangchaincrewai

Ratings & Reviews

Loading reviews…

Share your experience

Select a rating

Related Skills