Nearby lessons
16 of 49Prompt Engineering - Reflection and Self-Consistency
Reflection — Review Before You Trust
Reflection means asking AI to review and improve its own answer. The first answer may not be perfect. Reflection adds a checking step:
Generate → Review → Fix → Give the improved final answer.
- Exam example: you write the answer, check it again, and correct the mistakes — that checking is reflection.
- AI can do the same when you ask it to.
Example01
Self-Consistency — Ask Three Friends
Self-consistency means solving the same problem multiple times and comparing the answers. If AI gives the same answer every time, you can trust it more.
- Three-friends analogy: ask three friends and choose the common answer — that is self-consistency.
- If all three give the same answer, it is probably right.
In simple words: Never trust the first answer blindly. Multiple attempts reduce errors.
| Normal Output | Reflection + Self-Consistency |
|---|---|
| One answer | Multiple checks |
| Errors possible | Reduced errors |
| Less reliable | More reliable |
| No validation | Validated output |
Example02
Combined Reflection + Consistency
For important tasks, use both together: solve multiple times, then reflect on the best answer.
Example03
Putting It Together
| Technique | One-Line Purpose |
|---|---|
| Reflection | AI reviews and improves its own answer |
| Self-Consistency | Solve multiple times, compare, trust the common answer |
| Tree of Thoughts | Generate options, compare, decide |
| Chain of Hindsight | Learn from the mistake and improve |
| Step-Back | Understand the concept before solving |
Example04
📝 Key Takeaways
- Reflection = AI reviews and improves its own answer.
- Reflection: generate → review → fix → give the improved final answer.
- Self-consistency = solve multiple times and choose the common answer.
- Never trust the first answer blindly — multiple attempts reduce errors.
- For important tasks, use both together.
- Check twice, answer once — combine reflection + consistency for trust.
🧠 Test Your Knowledge
2 QuestionsProgress: 0 / 2