When One Answer Isn't Enough
Self-consistency, Tree of Thoughts, and ReAct
Making Big Decisions 🤔
When you have a really important decision to make, you don't just ask one friend. You ask 5 friends, hear all their opinions, and go with the most sensible answer. When you plan a long road trip, you look at ALL possible routes on the map before choosing the best one. And when a detective solves a crime, they don't just think — they actually go out and investigate, gather evidence, and piece it all together. In this chapter, you'll learn three advanced techniques that go beyond a single answer: Self-consistency, Tree of Thoughts, and ReAct.
🗳️ Self-Consistency: The Majority Vote
Self-consistency is simple: ask the AI the SAME question multiple times (with a higher creativity setting) and pick the most common answer. Why? Because AI can be inconsistent on tricky questions. Running it 5 times and taking the answer that appears most often is like asking 5 smart people the same question — the consensus is usually right.
By running 3 times and voting, we get a more reliable answer than any single response.
🌳 Tree of Thoughts: Explore All Paths
Chain of Thought follows one reasoning path. Tree of Thoughts (ToT) explores multiple paths simultaneously — like a chess player thinking several moves ahead. Instead of one line of reasoning, the AI branches out, evaluates each branch, prunes the bad ones, and follows the most promising path to a solution. This is powerful for: ✅ Complex planning problems ✅ Creative writing with multiple valid directions ✅ Strategy and decision problems ✅ Puzzles with many possible solutions
🔍 ReAct: Reason + Search + Act
ReAct (Reason and Act) is what happens when you give AI the ability to actually DO things, not just think. Instead of relying only on its training data (which has a cutoff date), a ReAct-powered AI can: 🔍 Search the web for current information 💻 Run code to calculate exact answers 📊 Look up real-time data 🛠️ Use external tools It creates a loop: Think → Act → Observe → Think again → Act again → Final Answer
Without ReAct, AI would have guessed from memory. With ReAct, it verified each answer live.
Quick Quiz
Test what you learned from this chapter. No pressure — it's just for you!
Self-consistency works by: