Skip to content
LinkedInX

Self-Correction and Reflection

Target audience: Those whose AI proceeds without noticing wrong results, those designing self-check mechanisms
Prerequisites: Basic understanding of Planning and Task Decomposition

Self-correction, also called reflection, is the mechanism by which an AI checks its own execution results and adjusts course when they differ from expectations. If planning sets the direction, self-correction is how the system gets back on track after drifting.

The Basic Flow

graph LR
    Act["Execute\nadvance a step"] --> Check["Verify\ndoes the result match expectations"]
    Check -->|Yes| Next["Move to the next step"]
    Check -->|No| Fix["Adjust the approach and retry"]
    Fix --> Act

The design hinges on one question: what evidence is used for verification.

Self-Assessment Is Not Enough

The simplest check is asking the AI whether its own result is correct. It is easy to set up, but it has a structural weakness: when the error originated in its own judgment, reviewing from the same viewpoint will not surface it.

Reliability improves when objective external facts serve as the evidence.

EvidenceExampleReliability
Self-assessmentThe AI reviews its own outputLow, since blind spots repeat
Execution resultsTest outcomes, command exit codesHigh
Independent reviewA check by a subagentMedium to high
Human reviewApproval by a reviewerHigh, but costly
This table scrolls horizontally. Keyboard users can focus the table and use the left and right arrow keys.

In practice the split is mechanical checks where tests can confirm the result, and independent or human review where judgment is required.

Cap the Loop

Self-correction can repeat indefinitely. Retrying the same fix without improvement only consumes time and cost.

  • Set a retry ceiling, such as three attempts per step
  • On reaching the ceiling, hand off to a human instead of continuing automatically
  • After the same failure twice, revisit the plan rather than the fix

Distinguish What to Correct

What needs fixing after a failure is not always the same thing.

Failure typeWhat to correct
Runtime errorInputs or parameters
Output differs from expectationThe instruction or the context supplied
Assumption no longer holdsThe plan itself
This table scrolls horizontally. Keyboard users can focus the table and use the left and right arrow keys.

Retrying the same procedure does nothing for the third category.

Summary

  • Self-correction verifies execution results and adjusts the approach
  • Self-assessment alone repeats the same blind spots, so use objective external facts
  • Cap correction loops and hand off to a human beyond the limit
  • Match the correction target — inputs, instruction, or plan — to the failure type
Quiz