chain of thought
Prompting a model to write out intermediate reasoning steps before its final answer.
In more detail
Wei and colleagues showed in 2022 that worked reasoning in examples improves multi-step tasks, and Kojima and colleagues found that "Let's think step by step" alone helps. Ask for a final line code can parse, read the reasoning when an answer is wrong, and drop the wording for reasoning models, which do this on their own.
Related terms
- self-consistency — Sampling several reasoning paths for the same question and taking the most common final answer.
- reasoning model — A model trained to work through a problem in hidden or summarised reasoning tokens before it writes its answer.
- step-back prompting — Asking a model first for the general principle behind a question, then answering the question with that principle in view.
Taught in
- Reasoning Techniques — AI Engineering: LLM Apps, RAG & Agents
- The Agent Loop — AI Engineering: LLM Apps, RAG & Agents
References
- Wei et al. (2022): Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Kojima et al. (2022): Large Language Models are Zero-Shot Reasoners