Week 2: LLM Foundations for Agents
Chain-of-Thought, Tree-of-Thoughts, prompting strategies
Week 2 of 12
Learning Objectives
- Implement CoT, ToT, and Self-Consistency
- Compare prompting strategies on reasoning tasks
- Analyze accuracy vs. cost trade-offs
Topics Covered
- Chain-of-Thought prompting
- Self-Consistency decoding
- Tree-of-Thoughts reasoning
- Zero-shot vs few-shot approaches
Resources
Jupyter Notebooks
Required Readings
| Paper | Authors | Year | Link |
|---|---|---|---|
| Chain-of-Thought Prompting Elicits Reasoning | Wei et al. | 2022 | arXiv |
| Tree of Thoughts | Yao et al. | 2023 | arXiv |
Reading Guide: Chain-of-Thought Paper
Analysis of Chain-of-Thought prompting and its role in agent reasoning
Primary Paper
Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
Wei, J., Wang, X., Schuurmans, D., et al. (2022)
NeurIPS 2022 arXiv
Wei, J., Wang, X., Schuurmans, D., et al. (2022)
NeurIPS 2022 arXiv
Exercise: Prompt Engineering
Compare prompting strategies on reasoning tasks
Learning Objectives
- Apply: Implement CoT, ToT, and Self-Consistency
- Analyze: Compare accuracy vs cost trade-offs
- Evaluate: Select optimal strategy for task type
Tasks
| Task | Points | Description |
|---|---|---|
| CoT Implementation | 30 | Implement chain-of-thought prompting |
| ToT Implementation | 30 | Implement tree-of-thoughts reasoning |
| Strategy Comparison | 40 | Benchmark and compare strategies |
Exercise
Compare prompting strategies on a set of reasoning problems:
- Implement zero-shot, few-shot, and Chain-of-Thought prompting
- Measure accuracy and token usage
- Analyze when each strategy is most effective
Discussion Questions
- When should you use Self-Consistency over standard CoT?
- How does Tree-of-Thoughts trade off exploration vs. exploitation?
- What role does temperature play in reasoning quality?
Additional Resources
Discussion & Questions
Join the Conversation
Have questions about this week's material? Want to discuss concepts with fellow students?