Self-Improvement: Reflection and Refinement
The Mirror That Makes AI Smarter
Imagine you’re learning to draw. You sketch a cat, then step back and look at it. “Hmm, the ears are too big,” you think. So you erase and fix them. Then you look again: “The tail needs to be longer.” You keep improving until you’re happy.
This is exactly what Self-Improvement prompts do for AI!
Instead of accepting the first answer, we teach AI to look in a mirror, spot its own mistakes, and make things better. It’s like giving AI a superpower: the ability to learn from itself.
The Five Magic Mirrors
Think of these five techniques as five different mirrors, each showing a different view:
graph LR A["🪞 Self-Improvement"] --> B["Self-Reflection"] A --> C["Self-Critique"] A --> D["Self-Ask"] A --> E["Reflexion"] A --> F["Self-Refine"] B --> G["Look at your thinking"] C --> H["Find your mistakes"] D --> I["Ask yourself questions"] E --> J["Learn from failures"] F --> K["Polish until perfect"]
1. Self-Reflection Prompts
What Is It?
Self-reflection is like asking: “What was I thinking when I did that?”
You ask the AI to explain its own reasoning. Why did it choose this answer? What assumptions did it make? This helps catch hidden mistakes.
Simple Example
Without Self-Reflection:
“What’s 15% of 80?”
AI: “12”
With Self-Reflection:
“What’s 15% of 80? After answering, explain your calculation step by step.”
AI: "12. Here’s how I calculated:
- 15% means 15 per 100
- 15/100 = 0.15
- 0.15 × 80 = 12"
Now you can verify the thinking!
Real-World Use
Imagine asking AI to recommend a vacation spot. With self-reflection:
“Recommend a vacation spot for my family. Then explain why you chose it and what assumptions you made about my preferences.”
The AI might say:
“I recommend Costa Rica. I assumed you want: warm weather, kid-friendly activities, and nature experiences. If any assumption is wrong, please tell me!”
Magic: You can now correct wrong assumptions before following bad advice!
2. Self-Critique Prompts
What Is It?
Self-critique means asking AI to be its own harsh teacher. Find the weak spots. Point out what’s wrong. Be tough!
It’s like proofreading your own essay with fresh eyes.
Simple Example
Step 1 - Get an Answer:
“Write a short product description for headphones.”
AI: “Great headphones with good sound.”
Step 2 - Ask for Self-Critique:
“Now criticize your answer. What’s missing? What could be better? Be harsh!”
AI: "My answer is too vague:
- No specific features mentioned
- ‘Good sound’ is meaningless
- Missing: comfort, battery life, price range
- Too short to be persuasive"
Step 3 - Improve Based on Critique:
“Now rewrite it, fixing all those problems.”
The Critique Formula
1. Generate first answer
2. Ask: "List 3-5 weaknesses in your answer"
3. Ask: "Now improve it, addressing each weakness"
This works for almost anything: code, writing, plans, explanations!
3. Self-Ask Prompting
What Is It?
Self-Ask is like being your own curious student. Before answering a hard question, you break it into smaller questions and answer those first.
The Journey Analogy
Imagine you need to get to a new city. Instead of just driving randomly:
- “Where exactly is this city?” (look at map)
- “What roads go there?” (find routes)
- “Which route is fastest?” (pick best one)
- “Do I need gas?” (check preparation)
Each small answer helps build the big answer!
Simple Example
Question: “Would a frozen lake be safe to walk on in March in Minnesota?”
Self-Ask Process:
AI thinks:
Sub-question 1: “What’s the typical temperature in Minnesota in March?”
- Answer: Average highs around 40°F, with freeze-thaw cycles
Sub-question 2: “How thick does ice need to be to walk safely?”
- Answer: At least 4 inches for walking
Sub-question 3: “Does March temperature affect ice stability?”
- Answer: Yes, warming days weaken ice even if nights freeze
Final Answer: “Likely unsafe. March temperatures in Minnesota cause freeze-thaw cycles that weaken ice unpredictably. Even ice that looks solid may have weak spots.”
How to Trigger Self-Ask
“Before answering, identify 3-4 sub-questions you need to answer first. Answer each one, then give your final response.”
4. Reflexion
What Is It?
Reflexion is learning from failure. When AI gets something wrong, it doesn’t just try again—it thinks about why it failed and uses that lesson.
Think of a video game. When you die, you don’t just restart. You think: “Oh, I shouldn’t have jumped there!” Next time, you avoid that mistake.
The Three-Step Dance
graph TD A["Try to solve problem"] --> B{Did it work?} B -->|Yes| C["Done!"] B -->|No| D["Reflect: Why did I fail?"] D --> E["Write down the lesson"] E --> F["Try again with new knowledge"] F --> B
Simple Example
Task: “Write code to find the average of a list of numbers.”
Attempt 1:
def average(numbers):
return sum(numbers) / len(numbers)
Test fails with empty list (division by zero!)
Reflexion:
“I failed because I didn’t handle the edge case of an empty list. Lesson: Always check for empty inputs before dividing.”
Attempt 2:
def average(numbers):
if not numbers:
return 0
return sum(numbers) / len(numbers)
Now it works! The AI learned from its mistake.
Real-World Power
Reflexion shines in complex tasks:
- Debugging code
- Solving puzzles
- Planning multi-step projects
Each failure teaches something new!
5. Self-Refine
What Is It?
Self-Refine is polishing until it shines. Generate an answer, then keep improving it through multiple rounds of feedback and revision.
It’s like sculpting: rough shape first, then finer and finer details.
The Refine Loop
graph TD A["Generate First Draft"] --> B["Get Feedback"] B --> C["Apply Improvements"] C --> D{Good Enough?} D -->|No| B D -->|Yes| E["Final Output"]
Simple Example
Task: “Write a haiku about coding”
Round 1 - First Draft:
“Code on the screen bright / Fingers typing all night long / Bugs are everywhere”
Round 1 - Self-Feedback:
“Problems: ‘all night long’ is cliché, ‘bugs are everywhere’ is negative, syllable count is off”
Round 2 - Refined:
“Logic flows like streams / Fingers dance on midnight keys / Solutions emerge”
Round 2 - Self-Feedback:
“Better! But ‘dance on midnight keys’ is a bit awkward”
Round 3 - Final:
“Logic flows like streams / Fingers tap through quiet night / Order from chaos”
Each round gets better!
How to Use Self-Refine
“Write [X]. Then provide 2-3 specific improvements. Apply those improvements and show the new version. Repeat until you’re satisfied.”
Putting It All Together
These five mirrors work beautifully together:
| Technique | When to Use | Key Question |
|---|---|---|
| Self-Reflection | After any answer | “Why did I think this?” |
| Self-Critique | When quality matters | “What’s wrong with this?” |
| Self-Ask | Complex questions | “What do I need to know first?” |
| Reflexion | After failures | “What went wrong and why?” |
| Self-Refine | Creative/writing tasks | “How can this be better?” |
A Combined Example
Task: “Help me plan a birthday party”
-
Self-Ask: Break into sub-questions
- How many guests?
- What’s the budget?
- Indoor or outdoor?
-
Generate plan based on answers
-
Self-Critique: Find weaknesses
- “I forgot about dietary restrictions”
- “No backup plan for rain”
-
Self-Refine: Improve the plan
-
Self-Reflect: Explain reasoning
- “I chose afternoon timing because…”
-
Reflexion: If something goes wrong, learn for next time!
Why This Matters
Without self-improvement, AI gives you its first guess. With these techniques, AI gives you its best thought-through answer.
It’s the difference between:
- A rough sketch vs. a polished painting
- A first draft vs. a published book
- A guess vs. an informed decision
You now have five powerful tools to make AI smarter!
Quick Reference
Self-Reflection: “Explain your reasoning after answering”
Self-Critique: “List weaknesses, then fix them”
Self-Ask: “Break the question into smaller questions first”
Reflexion: “Learn from failures before trying again”
Self-Refine: “Keep improving through multiple rounds”
Use them separately or combine them. Your AI answers will never be the same!
