Step by Step
Z
Zero-shot — just ask, no examples
Zero-shot prompting simply asks the model directly, with no examples provided at all.
Example: asking "Classify this email as spam or not spam" with no example emails or classifications shown beforehand.
F
Few-shot — provide 2-5 examples first
Few-shot prompting provides 2-5 input-output examples before the actual query, demonstrating the desired pattern to the model.
Example: showing 3 example emails each labeled "spam" or "not spam" before asking the model to classify a new, similar email.
C
Chain-of-Thought — think step by step
Chain-of-Thought (CoT) prompting adds the phrase "Let's think step by step," dramatically improving accuracy on math, logic, and multi-step reasoning tasks by forcing the model to work through intermediate steps rather than jumping straight to a final answer.
Example: adding "Let's think step by step" to a multi-step math word problem, measurably improving the model's accuracy compared to asking for the answer directly.
T
Tree-of-Thought — exploring multiple reasoning paths
Tree-of-Thought prompting generates multiple distinct reasoning paths, evaluates each one, and selects the best path — a more sophisticated extension of Chain-of-Thought. Self-consistency, a related technique, generates multiple CoT answers and takes a majority vote to reduce reasoning errors.
Example: generating three different reasoning paths for a complex problem, evaluating which one seems most sound, and selecting that path's answer as the final response.
Applied Walkthrough
1
A user needs an LLM to correctly solve a complex multi-step math word problem, and a simple zero-shot request produces an incorrect answer.
2
Adding the Chain-of-Thought phrase "Let's think step by step" to the same prompt encourages the model to work through its reasoning explicitly, measurably improving accuracy on this kind of task.
3
For an even more complex problem where a single reasoning chain might still go wrong, Tree-of-Thought could be used instead, generating multiple different reasoning paths and selecting whichever one seems most sound.
4
This progression — zero-shot, then few-shot with examples, then Chain-of-Thought, then Tree-of-Thought — represents increasing sophistication, each technique adding a layer of structure that can improve accuracy on progressively harder reasoning tasks.
Exam Application
Exams test whether you can describe all four techniques (zero-shot, few-shot, Chain-of-Thought, Tree-of-Thought) in order of increasing sophistication, and whether you know the specific, well-documented finding that adding "Let's think step by step" measurably improves accuracy on reasoning-heavy tasks.
⚠ Common Trap
The most common trap is confusing Chain-of-Thought with Tree-of-Thought. Chain-of-Thought generates a single sequential reasoning path; Tree-of-Thought generates and evaluates MULTIPLE distinct reasoning paths before selecting the best one — a meaningfully more sophisticated (and computationally expensive) approach.
✓ Quick Self-Check
1. What does zero-shot prompting involve?
Simply asking the model directly, with no examples provided.
Tap to reveal / hide
2. What does few-shot prompting involve?
Providing 2-5 input-output examples before the actual query.
Tap to reveal / hide
3. What specific phrase is associated with Chain-of-Thought prompting, and what effect does it have?
"Let's think step by step" — it dramatically improves accuracy on math, logic, and multi-step reasoning tasks.
Tap to reveal / hide
4. How does Tree-of-Thought differ from Chain-of-Thought?
Tree-of-Thought generates multiple distinct reasoning paths and evaluates each to select the best one, rather than following just one sequential chain.
Tap to reveal / hide
5. What does self-consistency do to reduce reasoning errors?
Generates multiple Chain-of-Thought answers and takes a majority vote among them.
Tap to reveal / hide