Self-Critique Fundamentals
What You'll Learn
You'll discover how large language models can act as their own editors, evaluating and iteratively improving their outputs without external feedback.
The Core Idea
Self-critique is the process where an LLM generates an initial response, then evaluates that response for quality, correctness, or adherence to requirements, and finally revises it based on its own analysis. Think of it as giving the model a "second look" at its work—like a writer reviewing their draft before submission.
This technique leverages the model's reasoning capabilities (from approaches like Chain-of-Thought) to identify flaws in its own output. Rather than accepting the first answer, you prompt the model to:
- Generate an initial response
- Critique that response against specific criteria
- Refine the output based on the critique
Why This Matters
Self-critique addresses a fundamental challenge: LLMs can produce outputs that violate constraints, contain logical errors, or miss requirements—even when using structured output formats or function calling. By adding a critique step, you create an internal quality control mechanism.
For example, after generating JSON output, the model might check: "Does this JSON include all required fields? Are the values sensible given the context?" This reflection often catches mistakes the initial generation missed.
The Analogy
Imagine asking someone to solve a math problem. They write an answer, then you say: "Now check your work—did you follow all the steps correctly?" Often they'll spot their own mistake. Self-critique works the same way for LLMs.
Key Takeaway: Self-critique enables LLMs to serve as both generator and evaluator, creating a feedback loop that improves output quality through iterative refinement—a simple yet powerful extension of reasoning techniques you've already learned.