LLM self-correction is the process in which a large language model reviews its own output, identifies errors or weaknesses and generates a revised answer, either within one response or across several inference passes. In the study of language models, the term covers both prompting patterns such as critique-and-revise loops and training methods that teach a model to repair its mistakes.
Self-correction matters because a first draft from a model often contains factual slips, arithmetic errors or broken code. The central research finding is sobering: intrinsic self-correction, where the model relies only on its own judgment without outside feedback, frequently fails to improve reasoning and can even make correct answers worse. External feedback from tools, tests or retrieval is what usually makes correction reliable.
How a self-correction loop operates
A self-correction loop has three stages: generate, critique and revise. The model first produces an initial answer, then receives a prompt asking it to inspect that answer for problems, and finally writes an improved version that takes the critique into account. The loop may repeat until a stopping condition is met, such as a fixed number of rounds or a critique that reports no remaining issues.
The critique stage is the weak point. A model that produced a wrong answer usually did so because its internal knowledge or reasoning was flawed, and the same flawed knowledge then evaluates the draft. For this reason practitioners distinguish sharply between feedback sources. The table below lists the common sources and how much each one tends to help.
| Feedback source | What it provides | Typical reliability |
|---|---|---|
| Model self-critique | Natural-language review by the same model | Low to moderate |
| Separate critic model | Review by a second, often specialized model | Moderate |
| Code execution and tests | Error messages and failing test cases | High |
| Retrieval or search | Documents that confirm or contradict claims | Moderate to high |
| Symbolic tools | Calculator, solver or schema validator output | High for narrow checks |
| Human review | Expert judgment on the draft | High but costly |
In reasoning models, part of this loop moves inside the hidden chain of thought. The model spends reasoning tokens checking intermediate steps and backtracking before it commits to a final answer, which makes self-correction a form of test-time compute rather than a separate prompting step.
Intrinsic and extrinsic self-correction
The most important distinction is whether the correction signal comes from inside or outside the model. Intrinsic self-correction uses only the model and its prompt. Extrinsic self-correction adds a verifiable signal, such as a compiler error or a retrieved fact, that the model did not generate itself. The comparison below summarizes the practical difference.
| Property | Intrinsic self-correction | Extrinsic self-correction |
|---|---|---|
| Correction signal | Model judgment only | Tool, test, retrieval or human |
| Effect on reasoning tasks | Often neutral or negative | Usually positive |
| Risk of flipping correct answers | Significant | Lower |
| Extra cost | One or more extra passes | Extra passes plus tool calls |
| Best fit | Style, tone, format fixes | Code, math, factual claims |
Intrinsic correction works reasonably well for surface-level issues: missing required fields, wrong output format, inconsistent tone or a violated length limit. These errors are easy to recognize once the model rereads its draft. It works poorly for deep reasoning errors, because recognizing a subtle logical flaw requires the very capability the model lacked when it made the error.
Training models to correct themselves
Prompting alone has limits, so researchers also train self-correction directly. Supervised approaches fine-tune a model on pairs of flawed drafts and corrected versions. Reinforcement learning approaches reward the model when a second attempt fixes an error in the first attempt and penalize it when a correct answer becomes wrong. The aim is to avoid behavior collapse, in which a model learns to repeat its first answer unchanged.
Large-scale reinforcement learning on verifiable tasks, such as mathematics with known answers and code with unit tests, has produced models that spontaneously revisit and fix steps in their reasoning. This learned behavior is more robust than a prompted critique because the reward comes from an objective verifier, not from the model’s own opinion of its work.
Where self-correction helps and where it fails
The value of self-correction depends on how easy errors are to verify. When checking an answer is much easier than producing it, a correction loop pays off. When checking is as hard as solving, the loop mostly adds cost. The decision table below reflects common engineering practice.
| Situation | Recommended approach | Reason |
|---|---|---|
| Code generation | Run tests, feed errors back | Execution gives an objective signal |
| Structured output | Validate against a schema, then retry | Format errors are easy to detect |
| Factual question answering | Retrieve sources, then revise | Claims can be checked against documents |
| Multi-step math | Use a reasoning model or a checker | Self-critique alone rarely finds the flaw |
| Open-ended writing | Critique against an explicit rubric | A rubric makes criteria concrete |
| Simple factual lookup | Skip correction | Extra passes add latency without benefit |
Typical deployments use one to three revision rounds. Additional rounds show diminishing returns and raise the chance that the model drifts away from a correct answer or starts making cosmetic edits that do not change correctness.
Limitations and common misconceptions
Several beliefs about self-correction do not survive careful testing. The most frequent misunderstandings and their consequences are listed below.
- Asking a model to double-check is not verification. Without new information, the model may simply restate or rationalize its first answer.
- Prompt wording can bias the outcome. A prompt such as “find the error” pushes the model to change a correct answer, which inflates reported failures.
- Reported gains can hide oracle leakage. Some evaluations stop the loop only when the answer is already known to be correct, which overstates real performance.
- Self-correction does not remove hallucination. A model can confidently confirm a fabricated fact unless retrieval or another source contradicts it.
- Cost grows with each round. Every pass adds tokens and latency, so loops should have a strict budget.
A related concern is sycophantic revision: when a user pushes back on a correct answer, many chat models change it to agree. Robust systems therefore treat a correction as valid only when it is backed by evidence, not merely by a request to reconsider.
The simple explanation
Self-correction means a model checks its own work and tries to fix it. Think of a student who rereads an exam answer before handing it in. Sometimes the student spots a typo. Sometimes the student misses a deeper mistake, because the same misunderstanding is still in their head.
Models behave in a similar way. They are good at fixing obvious, visible problems, such as a wrong format. They are much better at fixing real errors when something outside them gives a hint, such as a failed test or a source that says otherwise.
How it is used in practice
A software team uses a language model to write small data-processing functions. Each request asks the model for a Python function together with the expected behavior. The system then runs the project’s unit tests in an isolated sandbox. If any test fails, the error message and the failing input are sent back to the model with an instruction to fix the function.
The loop is limited to three attempts. In internal measurements the team sees that most functions pass on the first attempt, and a meaningful share of the failures pass after one or two repair rounds. When the team tried a version without tests, where the model only reviewed its own code, the pass rate barely moved. The outcome confirmed the main lesson: concrete feedback, not self-review alone, drives the improvement.