Nearby lessons

16 of 49

Prompt 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
Loading editor…

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 OutputReflection + Self-Consistency
One answerMultiple checks
Errors possibleReduced errors
Less reliableMore reliable
No validationValidated output
Example02
Loading editor…

Combined Reflection + Consistency

For important tasks, use both together: solve multiple times, then reflect on the best answer.

Example03
Loading editor…

Putting It Together

TechniqueOne-Line Purpose
ReflectionAI reviews and improves its own answer
Self-ConsistencySolve multiple times, compare, trust the common answer
Tree of ThoughtsGenerate options, compare, decide
Chain of HindsightLearn from the mistake and improve
Step-BackUnderstand the concept before solving
Example04
Loading editor…
📝 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 Questions
Progress: 0 / 2

Finished this lesson?

Mark it as complete to track your progress and see technology completion stats.