PaPoo
cover

What is reflection / self-critique in agents?

Reflection, or self-critique, is when an AI agent reviews its own output or plan, spots mistakes or weaknesses, and then revises itself before acting.

Why it matters

Agentic systems can make more than one kind of error: they may miss a constraint, choose a bad tool, hallucinate a fact, or produce a plan that looks plausible but won’t work. Reflection adds a built-in “check yourself” step, which is useful when you want better reliability than a single pass from the model.

In practice, teams reach for reflection when:

How it works

At a high level, the agent does a first pass, then evaluates that pass, then optionally rewrites it.

A common pattern is:

  1. Draft: the model produces an answer, plan, or action.
  2. Critique: the model, or a separate model/prompt, reviews the draft against criteria such as correctness, completeness, style, or safety.
  3. Revise: the agent updates the draft based on the critique.

This can happen as a simple prompt loop (“review your answer and fix any errors”) or as a more structured agent design where different steps have different roles, such as writer, critic, and verifier. Some systems use the same model for both roles; others use a separate evaluator to reduce self-confirming mistakes.

Reflection is not magic. It works best when the critique has something concrete to check against: a spec, test output, retrieved evidence, a schema, or explicit constraints. If the critique is only “be better,” it tends to be vague.

Tiny concrete example

Task: “Write a SQL query to count active users last week.”

First pass

SELECT COUNT(*) FROM users WHERE status = 'active';

Self-critique

Revised answer

SELECT COUNT(*)
FROM users
WHERE status = 'active'
  AND last_login >= CURRENT_DATE - INTERVAL '7 days';

Common pitfalls / when NOT to use it

In practice, most teams start with a simple draft-and-check pattern, then add stronger verification only where the cost of mistakes justifies it.

Related terms

同じ著者の記事