Duration: 60 minutes
Introduction
First drafts are rarely perfect. The key to high-quality outputs is iteration—generating, critiquing, and refining. In this lesson, you’ll learn how to make LLMs critique and improve their own outputs, creating a systematic refinement process that dramatically improves quality.Why Self-Refinement Works
Multiple Perspectives
Generation and critique use different cognitive modes
Error Detection
Critique mode catches mistakes generation mode missed
Incremental Improvement
Each iteration builds on previous improvements
Quality Assurance
Built-in verification before final output
Self-Consistency Methods
Generate multiple reasoning paths and use majority voting.The Self-Consistency Pattern
1
Generate Multiple Solutions
Create 3-5 independent solutions to the same problem
2
Compare Answers
Check if solutions agree or differ
3
Use Majority Vote
Select the answer that appears most frequently
4
Verify Consensus
If no consensus, investigate discrepancies
Example: Math Problem
Research Finding: Self-consistency can improve accuracy by 20-30% on reasoning tasks compared to single-path solutions.
When Solutions Disagree
Iterative Improvement
The Generate → Critique → Refine cycle.Three-Step Refinement Pattern
Example: Email Writing
Multi-Iteration Refinement
Self-Critique Prompting
Make the model evaluate its own output.The Self-Critique Pattern
Example: Code Review
Verification Strategies
Fact-Checking Pattern
Example: Fact Verification
Logic Verification
When Refinement Helps Most
Quality-Critical Outputs
Quality-Critical Outputs
Use when: The output will be published, presented, or used for important decisionsExample: Business proposals, research papers, legal documents
Complex Creative Tasks
Complex Creative Tasks
Use when: The task requires creativity and multiple iterations improve qualityExample: Marketing copy, story writing, design briefs
Technical Accuracy Required
Technical Accuracy Required
Use when: Errors could have serious consequencesExample: Code, medical information, financial advice
Ambiguous Requirements
Ambiguous Requirements
Use when: The initial requirements weren’t perfectly clearExample: First attempt reveals misunderstandings that need correction
Advanced Refinement Techniques
Targeted Refinement
Focus refinement on specific aspects.Comparative Refinement
Generate multiple versions and select the best.Stakeholder-Focused Refinement
Refine based on different stakeholder perspectives.Best Practices
Specific Criteria
Define clear criteria for what makes a good output
Multiple Iterations
Don’t stop at one refinement—iterate 2-3 times for critical content
Objective Critique
Focus on concrete issues, not vague “could be better”
Track Changes
Document what changed and why in each iteration
Practice Exercises
Exercise 1: Email Refinement
Refine this customer service email through 2 iterations. Initial: “We got your complaint. The problem is being looked at. We’ll let you know.”Sample Solution
Sample Solution
Exercise 2: Code Refinement
Refine this function through self-critique.Sample Solution
Sample Solution
Exercise 3: Explanation Refinement
Refine this technical explanation for a non-technical audience. Initial: “The API uses RESTful architecture with JSON payloads over HTTPS, implementing OAuth 2.0 for authentication.”Sample Solution
Sample Solution
Real-World Application: Content Quality System
Key Takeaways
Use self-consistency (multiple paths + majority vote) for critical reasoning
Apply Generate → Critique → Refine cycle for quality improvement
Make critiques specific and actionable, not vague
Iterate 2-3 times for important outputs
Verify facts and logic before finalizing
Focus refinement on specific aspects when needed
Next Steps
You’ve mastered self-refinement. Now learn to combine multiple reasoning paths through ensembling for even more robust solutions.Next: Lesson 3.4 - Ensembling & Multi-Path Reasoning
Combine multiple approaches for robust solutions