This prompt is designed for planning modules in autonomous agent systems that must validate a generated plan before execution begins. Use it when a single-pass plan from an LLM is likely to contain gaps, infeasible steps, or missing dependencies that would cause expensive runtime failures. The prompt instructs the model to act as a critical reviewer of its own output, producing a structured critique that identifies weaknesses and suggests concrete revisions. This is not a prompt for generating the initial plan. It is a second-pass validation step that sits between plan generation and plan execution. Apply it when the cost of a bad plan exceeds the cost of an extra inference call.
Prompt
Reflection and Self-Critique Prompt for Agent Plans

When to Use This Prompt
Defines the job-to-be-done for a reflection prompt that validates agent plans before execution, including the ideal user, required context, and clear boundaries for when not to use it.
The ideal user is an AI engineer or agent architect building a planning system where execution carries real cost—whether that cost is measured in API spend, irreversible side effects, or user trust. The required context includes the original goal, the generated plan, available tools and their capabilities, known constraints, and any explicit assumptions the planner made. Without this context, the critique will be shallow and may miss domain-specific feasibility issues. The prompt works best when the plan is complex enough to have non-obvious failure modes but structured enough that a reviewer can systematically check each step.
Do not use this prompt when the plan is trivial, when execution cost is negligible, or when the planning model already has strong self-consistency guarantees. It is also inappropriate for real-time systems where the latency of a second inference call violates the user's time budget. If your agent operates in a domain where plans rarely fail or where failures are cheap to detect and recover from at runtime, skip the reflection step and invest instead in better postcondition validation. For high-risk domains such as healthcare, finance, or safety-critical infrastructure, this prompt is necessary but not sufficient—you must also implement human review gates and evidence grounding checks before any action is taken.
Use Case Fit
Where a reflection and self-critique prompt for agent plans adds value, and where it introduces unnecessary cost, latency, or false confidence.
Good Fit: High-Cost or Irreversible Actions
Use when: The plan includes database migrations, production deployments, financial transactions, or sending customer-facing communications. Why: The cost of a bad step far exceeds the cost of a second-pass critique. A reflection prompt catches missing rollback steps, authorization checks, and blast-radius assumptions before execution.
Bad Fit: Low-Stakes, Stateless Queries
Avoid when: The agent is answering a factual question, summarizing a document, or performing a read-only lookup with no side effects. Why: Adding a reflection step doubles latency and token cost without meaningfully improving correctness. A single-pass generation with source grounding is sufficient.
Required Input: A Complete Initial Plan
Risk: Running reflection on an incomplete or vague plan produces shallow critiques that miss structural gaps. Guardrail: The prompt must receive a fully expanded plan with explicit steps, tool assignments, and stated assumptions. If the plan is a one-line goal, run a plan-generation prompt first. Validate plan completeness before invoking reflection.
Required Input: Tool and Capability Definitions
Risk: The critique model cannot identify infeasible steps if it does not know which tools, APIs, or permissions are available. Guardrail: Pass the full tool manifest, including parameter schemas, rate limits, and required permissions, as part of the reflection context. Without this, the critique will miss tool-selection errors.
Operational Risk: Critique Hallucination
Risk: The reflection model invents plausible-sounding but incorrect gaps, causing the agent to add unnecessary steps or remove valid ones. Guardrail: Treat the critique as advisory, not authoritative. Require a diff between the original and revised plan, and log critique-to-revision mappings for human audit. Never auto-apply revisions without validation in high-risk domains.
Operational Risk: Infinite Reflection Loops
Risk: An agent that critiques its own plan, revises it, then critiques the revision can loop indefinitely, burning tokens with diminishing returns. Guardrail: Set a hard limit of one or two reflection passes. Track a stability metric (e.g., number of changed steps between revisions) and stop when the plan stabilizes or a maximum token budget is reached.
Copy-Ready Prompt Template
A copy-ready template for generating a structured self-critique of an agent's execution plan before it runs.
This template is designed to be pasted directly into your planning validation module. It instructs the model to act as a skeptical reviewer, systematically identifying gaps, infeasible steps, and missing dependencies in a proposed agent plan. The output is a structured critique that can be parsed by an orchestrator to either approve the plan or route it back for revision, preventing costly execution errors.
textYou are a critical plan reviewer. Your task is to analyze the provided execution plan for an AI agent and produce a structured critique. Do not execute the plan. Focus exclusively on finding flaws before execution begins. **Objective:** [OBJECTIVE] **Available Tools (name, description, parameters):** [TOOLS] **Proposed Plan:** [PLAN] **Constraints and Risk Level:** [CONSTRAINTS] **Critique Instructions:** 1. **Completeness Check:** Identify any missing steps required to achieve the objective. Are there unhandled edge cases or implicit assumptions? 2. **Feasibility Check:** For each step, verify if the required tool exists and if the proposed parameters are valid. Flag any step that relies on an output from a previous step without a clear dependency chain. 3. **Dependency Analysis:** Map the execution order. Are there circular dependencies or steps that could be parallelized? Identify any step that is scheduled before its required inputs are guaranteed to exist. 4. **Risk Assessment:** Flag steps that are irreversible, destructive, or have a high blast radius. Note if the plan lacks a rollback or fallback strategy for these steps. 5. **Gap Analysis:** Identify what information is unknown before execution but is required for a decision point. The plan should request clarification, not guess. **Output Format:** Return a valid JSON object with the following schema: { "critique_summary": "A one-sentence overall assessment.", "verdict": "APPROVE" | "REVISE" | "REJECT", "critical_issues": [ { "step_id": "string or null", "severity": "BLOCKER" | "HIGH" | "MEDIUM", "category": "MISSING_STEP" | "INFEASIBLE_STEP" | "DEPENDENCY_ERROR" | "RISK_EXPOSURE" | "MISSING_INFORMATION", "description": "Clear explanation of the flaw.", "suggestion": "Actionable recommendation to fix the issue." } ], "revised_plan_skeleton": "A high-level corrected sequence of steps, only if the verdict is REVISE. Otherwise, null." }
To adapt this template, replace the square-bracket placeholders with your specific context. The [TOOLS] placeholder should be populated with a strict JSON schema defining your agent's available functions, as this is the contract the critique will validate against. The [CONSTRAINTS] placeholder is critical for high-risk workflows; use it to specify rules like 'no destructive actions without approval' or 'must handle PII data.' After receiving the critique, your harness should parse the verdict field: an APPROVE verdict can proceed directly to execution, a REVISE verdict should feed the revised_plan_skeleton back into your plan generation prompt, and a REJECT verdict should halt the workflow and escalate to a human operator for goal clarification.
Prompt Variables
Required inputs for the reflection and self-critique prompt. Each placeholder must be populated before the prompt is assembled and sent to the model. Missing or malformed inputs are the most common cause of shallow critiques that miss infeasible steps or dependency gaps.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[ORIGINAL_PLAN] | The complete multi-step plan that the model must critique. Includes step descriptions, assigned tools, expected outputs, and declared dependencies. | {"goal": "Deploy auth service", "steps": [{"id": "1", "action": "Run DB migration", "tool": "db_migrate", "depends_on": []}, {"id": "2", "action": "Deploy container", "tool": "k8s_apply", "depends_on": ["1"]}]} | Must be valid JSON with a steps array. Each step requires id, action, and depends_on fields. Reject if steps array is empty or any dependency references a non-existent step id. |
[AVAILABLE_TOOLS] | The complete tool manifest available to the agent, including function signatures, parameter schemas, and capability descriptions. The critique must verify that every planned tool call is actually available. | ["db_migrate", "k8s_apply", "run_tests", "notify_slack"] | Must be a non-empty array of tool names or a full tool schema object. Validate that every tool referenced in [ORIGINAL_PLAN] appears in this list. Flag missing tools as a critical critique finding. |
[CONSTRAINTS] | Explicit boundaries the plan must respect: security policies, resource limits, ordering rules, approval gates, and operational constraints. The critique checks for constraint violations. | ["No production DB writes without approval", "Max 2 concurrent deployments", "Rollback must be possible after each step"] | Must be a non-empty array of constraint strings. Each constraint should be specific enough to test against plan steps. Vague constraints like 'be safe' produce useless critiques. Validate that constraints are falsifiable. |
[SUCCESS_CRITERIA] | Measurable conditions that define plan completion. The critique evaluates whether the plan, if executed, would actually satisfy these criteria. | ["Auth service responds to /health within 5s", "All existing API keys remain valid", "Zero 5xx errors during rollout"] | Must be a non-empty array of testable criteria. Each criterion should include a metric, threshold, or observable condition. Reject criteria that are subjective or unverifiable by the agent's available tools. |
[CRITIQUE_DEPTH] | Controls how exhaustively the model searches for issues. Higher depth values instruct the model to examine second-order effects, edge cases, and implicit assumptions. | "deep" | Must be one of: "basic", "standard", "deep". Basic checks step feasibility only. Standard adds dependency and constraint checks. Deep adds assumption surfacing, failure mode analysis, and revision suggestions. Default to "standard" if not specified. |
[OUTPUT_FORMAT] | Defines the structure of the critique response. The reflection prompt must produce a parseable, machine-readable output for downstream validation or plan revision. | {"critique": {"issues": [{"severity": "blocker", "step_id": "2", "finding": "...", "suggestion": "..."}], "overall_assessment": "needs_revision"}} | Must be a valid JSON schema or a named format reference. Validate that the output schema includes severity, step reference, finding description, and actionable suggestion fields. Reject schemas that allow findings without step traceability. |
[PRIOR_CRITIQUE_HISTORY] | Optional. Previous critique outputs for the same or related plans. Used to prevent the model from repeating the same findings or to track whether prior issues were addressed. | null or [{"timestamp": "...", "issues": [...]}] | If provided, must be an array of prior critique objects with timestamps. Validate that step references in prior critiques are still valid against the current plan. Set to null for first-run critiques. Do not inject stale critiques that reference removed steps. |
[REVISION_CONTEXT] | Optional. Notes from a human reviewer or upstream system about what to focus on or ignore during critique. Used to suppress known acceptable risks or direct attention to specific concerns. | "Focus on data migration rollback safety. The deployment ordering is already approved." | If provided, must be a non-empty string. Validate that revision context does not contradict [CONSTRAINTS] or [SUCCESS_CRITERIA]. Set to null when no external guidance is available. Do not allow revision context to silently disable safety checks. |
Implementation Harness Notes
How to wire the reflection prompt into an agent planning pipeline with validation, retries, and human review gates.
The reflection prompt is not a standalone artifact—it is a planning-stage validator that sits between plan generation and plan execution. In a typical agent pipeline, the planner produces a multi-step plan, and the reflection prompt critiques that plan before any tool calls or state mutations occur. This gate prevents the agent from executing infeasible steps, missing dependencies, or committing to irreversible actions without adequate justification. The harness should treat the reflection output as structured feedback that can trigger plan revision, human escalation, or plan rejection—not as a pass/fail stamp that the agent blindly trusts.
Integration pattern: Wire the reflection prompt as a synchronous validation step in the planning loop. After the planner generates a plan, serialize it into the [PLAN] placeholder along with the original [GOAL], [CONSTRAINTS], and [AVAILABLE_TOOLS]. The reflection model returns a structured critique containing gaps, infeasible_steps, missing_dependencies, risk_flags, and an overall_confidence score. Parse this output with a schema validator (e.g., Pydantic or JSON Schema) and apply decision rules: if overall_confidence is below a configurable threshold (start with 0.7), route the plan back to the planner with the critique as feedback for revision. If confidence is above threshold but risk_flags contain high-severity items, surface to a human review queue with the plan, critique, and a summary of flagged risks. If confidence is high and no critical risks exist, release the plan for execution. Model selection: Use a capable reasoning model (e.g., Claude 3.5 Sonnet, GPT-4o) for the reflection step—cheaper models often produce shallow critiques that miss dependency gaps. The planner and reflector can be the same model with different system prompts, but using a separate model instance for reflection reduces self-consistency bias where the model rubber-stamps its own output.
Retry and loop control: Implement a maximum revision count (recommended: 3) to prevent infinite critique-revise loops. On each revision, append the previous critique to the planner's context so it can address specific gaps. If the plan still fails reflection after max revisions, escalate to a human operator with the full revision history. Logging and observability: Log every reflection output alongside the plan version, revision count, and final disposition (accepted, revised, rejected, escalated). This trace is essential for debugging planning failures and tuning confidence thresholds. What to avoid: Do not use the reflection prompt as a post-execution audit—by then, irreversible actions may already be taken. Do not skip schema validation on the reflection output; unstructured critiques are hard to act on programmatically. Do not assume the reflection model catches everything—it can miss subtle domain-specific constraints that require human expertise, which is why the high-risk escalation path must remain available.
Expected Output Contract
Defines the structure, types, and validation rules for the JSON critique object returned by the reflection prompt. Use this contract to parse, validate, and route the critique before feeding it to a plan revision module.
| Field or Element | Type or Format | Required | Validation Rule |
|---|---|---|---|
critique_id | string (UUID v4) | Must parse as valid UUID v4. Reject if missing or malformed. | |
plan_id | string | Must match the [PLAN_ID] input exactly. Reject on mismatch. | |
overall_assessment | string, enum: ['APPROVE', 'REVISE', 'REJECT'] | Must be one of the three enum values. Default to 'REVISE' if confidence is low. | |
critical_gaps | array of objects | Must be a JSON array. Each object must contain 'description' (string) and 'severity' (enum: 'BLOCKER', 'MAJOR', 'MINOR'). Reject if 'BLOCKER' items exist and overall_assessment is 'APPROVE'. | |
infeasible_steps | array of strings | Must be a JSON array of strings. Each string must match a step ID from the input [PLAN_STEPS] array. Null allowed if empty. | |
missing_dependencies | array of objects | Must be a JSON array. Each object must contain 'dependent_step' (string) and 'missing_prerequisite' (string). Both must reference step IDs from [PLAN_STEPS] or known tool names. | |
revision_suggestions | array of objects | Must be a JSON array. Each object must contain 'target_step' (string), 'suggestion' (string), and 'rationale' (string). Array must be non-empty if overall_assessment is 'REVISE' or 'REJECT'. | |
confidence_score | number (0.0 to 1.0) | Must be a float between 0.0 and 1.0 inclusive. Flag for human review if below 0.7 and overall_assessment is 'APPROVE'. |
Common Failure Modes
Reflection prompts fail in predictable ways. Here are the most common failure modes when using self-critique for agent plans and how to guard against them before execution.
Shallow Critique That Misses Structural Gaps
What to watch: The model produces a critique that focuses on surface-level wording or minor ordering issues while missing missing dependencies, infeasible steps, or incorrect tool assumptions. This happens when the reflection prompt lacks explicit evaluation dimensions. Guardrail: Require the critique to address specific categories: dependency completeness, tool availability, step feasibility, assumption validity, and failure recovery. Use a structured output schema that forces coverage of each dimension.
Critique That Reinforces the Original Plan's Errors
What to watch: The model generates a plan with a flawed assumption, then the reflection step validates that same assumption instead of challenging it. This confirmation-bias loop produces a critique that rubber-stamps the original plan. Guardrail: Include explicit counterfactual instructions in the reflection prompt: 'Identify at least two assumptions the plan makes that could be wrong. For each, describe what would break if the assumption is false.' Force disagreement with the original plan.
Overcorrection That Destroys a Viable Plan
What to watch: The reflection prompt produces an overly aggressive critique that recommends replacing a workable plan with a completely different approach, losing the original's valid structure. This is common when the critique prompt lacks a 'preserve what works' constraint. Guardrail: Add a preservation rule: 'Identify which steps in the original plan are correct and should be retained. Only suggest revisions for steps that are infeasible, missing, or incorrectly ordered.' Require the output to distinguish between keep, modify, and replace.
Critique Without Actionable Revision Suggestions
What to watch: The reflection identifies problems but produces vague feedback like 'step 3 could be improved' without specifying what the improvement should be or how to implement it. This leaves the planning module without a clear path to revision. Guardrail: Require each critique point to include a concrete revision: 'For each identified gap or issue, provide the specific change needed—a replacement step, an added dependency, a removed assumption, or a reordered sequence.' Validate that revision suggestions are executable.
Infinite Reflection Loops With Diminishing Returns
What to watch: The system applies reflection repeatedly, and each pass produces smaller and smaller changes while consuming tokens and latency budget. After 2-3 passes, the plan oscillates between alternatives without converging. Guardrail: Set a hard limit on reflection passes (maximum 2). Add a stopping condition: 'If the critique identifies no high-severity issues, stop and return the plan as final.' Track the delta between plan versions and abort if changes fall below a significance threshold.
Critique That Hallucinates Missing Context or Tools
What to watch: The reflection prompt causes the model to invent constraints, tools, or dependencies that don't exist in the actual execution environment. The critique says 'step 4 requires access to the user database' when no such database is available, leading to a revised plan that is less executable than the original. Guardrail: Ground the reflection in a provided tool manifest and environment spec. Add a constraint: 'Only reference tools, APIs, and data sources that appear in the provided capability list. If a step requires something not in the list, flag it as infeasible rather than assuming it exists.'
Evaluation Rubric
Criteria for testing whether the reflection prompt produces a critique that is deep, actionable, and safe to use before plan execution. Run these checks against a sample of generated plans and their corresponding critiques.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Gap Identification Completeness | Critique identifies at least one missing step, dependency, or resource for every plan that contains a deliberate gap seeded in the test set. | Critique returns 'no gaps found' for a plan known to be missing a required authentication step or data dependency. | Run against 10 seeded plans with known omissions. Require >= 90% recall on gap detection. |
Infeasible Step Flagging | Critique correctly flags steps that require unavailable tools, impossible time constraints, or contradictory preconditions. | Critique approves a step that calls a tool not present in [AVAILABLE_TOOLS] or requires a 1ms response time. | Inject 5 infeasible steps across test plans. Require 100% detection rate with specific reason cited. |
Dependency Chain Validation | Critique catches any step that consumes output from a later step or references a resource created in a parallel uncoordinated branch. | Critique misses a step that reads from a database table populated three steps later in the sequence. | Parse the plan's DAG. Assert critique output mentions the specific dependency violation by step ID. |
Actionable Revision Suggestion | Every flagged issue includes a concrete revision suggestion that references specific step IDs, tool names, or resource identifiers from the original plan. | Critique says 'Step 3 might be risky' without proposing a modified step, reordering, or alternative tool call. | Regex check for step ID references in suggestion text. Manual review of 20 random suggestions for actionability. |
No Hallucinated Tool References | Critique only references tools present in the provided [AVAILABLE_TOOLS] list. Zero invented tool names or capabilities. | Critique suggests using a 'database_backup_service' that does not exist in the tool manifest. | Extract all tool names from critique output. Assert set difference against [AVAILABLE_TOOLS] is empty. |
Critique Structure Compliance | Output strictly matches the [OUTPUT_SCHEMA] with all required fields present and no extra top-level keys. | Missing 'severity' field on one finding or includes an unrequested 'confidence_score' field. | JSON Schema validation against [OUTPUT_SCHEMA]. Fail on any schema violation. |
Severity Classification Accuracy | Blocking issues (plan cannot proceed) are labeled 'critical'. Improvements are labeled 'advisory'. No 'critical' label on style suggestions. | A missing required input is labeled 'advisory' or a wording preference is labeled 'critical'. | Spot-check 30 labeled findings. Require >= 95% agreement with human severity labels. |
Self-Critique Depth Threshold | Critique produces at least 2 distinct findings for plans longer than 5 steps. Findings cover at least 2 different categories (gap, infeasibility, dependency, ambiguity). | Critique returns a single vague finding like 'plan looks mostly fine' for a 10-step plan with known issues. | Count distinct findings and category tags. Fail if count < 2 or all findings share the same category. |
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Adapt This Prompt
How to adapt
Use the base reflection prompt with a single model call. Remove strict schema requirements and accept free-text critique. Focus on catching obvious plan gaps without building validation infrastructure.
codeYou are a planning reviewer. Review the following plan and list any gaps, infeasible steps, or missing dependencies. Plan: [PLAN_TEXT] Return a bulleted list of issues.
Watch for
- Critiques that are too vague to act on ("this plan could be better")
- Model agreeing with its own plan without real scrutiny
- Missing checks for tool availability or permission assumptions
- No structured output, making it hard to parse programmatically

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us