LLMs Guru
LLMs Guru
Explore Tools
AI ToolsUtilitiesCalculatorsGamesSEO ToolsAI NewsTech NewsSpeakRightAstrology
Explore All Tools
Chapter 6 of 7·8 min read·Quiz included
🚀

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.

Question: Is this email about a security bug "IMPORTANT" or "NOT IMPORTANT"?
Run 1:IMPORTANTJavaScript vulnerability could allow code execution...
Run 2:NOT IMPORTANTThe sender seems to be just giving feedback...
Run 3:IMPORTANTThe "inv0k3d" language suggests active exploitation...
Verdict: IMPORTANT (2/3 votes → majority wins)

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

How should I launch my new product?
Social media blitz
Instagram + TikTok ads
Influencer partnerships
Good reach but expensive
Launch with a waitlist
Build hype before launch
Create scarcity
✅ Best: lower cost, higher engagement
Press & media coverage
Pitch to tech journalists
Product Hunt launch
Good but unpredictable
Winner: Launch with a waitlist → Build hype before launch

🔍 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

Question: How many kids do the members of Metallica have in total?
ThinkMetallica has 4 members. I need to search for each.
SearchHow many kids does James Hetfield have?
ObserveJames Hetfield: 3 children
SearchHow many kids does Lars Ulrich have?
ObserveLars Ulrich: 3 children
SearchHow many kids does Kirk Hammett have?
ObserveKirk Hammett: 2 children
SearchHow many kids does Robert Trujillo have?
ObserveRobert Trujillo: 2 children
Answer3+3+2+2 = 10 children total.

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!

Question 1 of 3

Self-consistency works by:

← PreviousNext Chapter →