Prompting techniques
Chain-of-thought prompting
Definition
Chain-of-thought prompting asks a model to work through its reasoning step by step before answering. It measurably improves accuracy on maths, logic, and multi-step problems by forcing intermediate steps instead of an immediate guess.
The technique can be as simple as appending "think step by step" to a question. The effect is real and well documented: on multi-step reasoning benchmarks, chain-of-thought prompting can lift accuracy substantially compared to asking for the answer directly.
The mechanism is that generating intermediate steps gives the model more computation to work with, and lets each step condition on the previous one. Asked for an answer immediately, the model must produce it in a single forward pass; asked to reason, it can decompose.
Use it for arithmetic, logic puzzles, debugging, and decisions with multiple competing criteria. Skip it for simple factual lookup and short creative tasks, where it adds latency and cost without improving the answer. Newer reasoning models do this internally, making explicit instruction less necessary.
Example
"Product A costs $340 and lasts 2 years. Product B costs $610 and lasts 4 years. Which has the better cost per year? Think step by step, show your maths, then give a one-line recommendation."
Related terms
Prompt engineering
Prompt engineering is the practice of designing model inputs that reliably produce the output you want. It combines clear instruction-writing, structured formatting, worked examples, and systematic testing.
Reasoning model
A reasoning model is trained to generate extended internal deliberation before answering. It trades latency and cost for substantially better performance on maths, logic, coding and multi-step problems.
Self-consistency
Self-consistency runs the same reasoning prompt several times at non-zero temperature and takes the most common answer. It trades cost for accuracy on problems with a single verifiable result.
Tree-of-thought
Tree-of-thought extends chain-of-thought by exploring several reasoning branches in parallel, evaluating each, and pursuing the most promising. It helps on problems where the first plausible path is often wrong.
Zero-shot prompting
Zero-shot prompting means asking a model to do a task with no worked examples — just an instruction. It works well for common tasks the model has seen extensively in training.
Few-shot prompting
Few-shot prompting means including two to five worked examples of the input-output pattern you want before making your real request. It is the fastest way to lock in a consistent format, tone or edge-case behaviour.
Put this into practice
Understanding the term is step one. Our free courses and tools let you actually use it.