P

Chain Of Thought Reasoning: Definition and Examples

Chain of Thought Reasoning is a prompting technique that involves asking an AI model to break down its reasoning into explicit intermediate steps before providing a final answer, thereby improving the accuracy and reliability of results.

Full definition

Chain of Thought Reasoning is a fundamental approach in prompt engineering that replicates the human step-by-step thought process. Rather than asking a language model to directly produce an answer, it is prompted to explicit each step of its reasoning, creating a traceable logical chain from problem to solution.

This technique was formalized by Google researchers in 2022 in the paper "Chain-of-Thought Prompting Elicits Reasoning in Large Language Models" by Jason Wei et al. The study demonstrated that simply adding step-by-step reasoning examples in a prompt significantly improves the performance of large language models on arithmetic, logical, and common-sense reasoning tasks.

The principle is remarkably simple: instead of asking a question and expecting a direct answer, you guide the model to 'think out loud.' This can be done by adding an instruction like 'Reason step by step' (zero-shot CoT) or by providing examples of decomposed reasoning (few-shot CoT). The model then produces a sequence of intermediate steps that logically lead to the conclusion.

The effectiveness of Chain of Thought is explained by several mechanisms: it forces the model to allocate more computational capacity to the problem, reduces errors by making each step verifiable, and allows precise identification of where reasoning goes astray. This transparency makes it a valuable tool not only for obtaining better answers but also for understanding and auditing the AI's decision-making process.

Etymology

The term 'Chain of Thought' is borrowed from cognitive science, where it refers to the sequential flow of ideas and reasoning in the human mind. Its application to AI was popularized by a Google Brain paper published in January 2022, which gave rise to an entire family of derivative techniques (Tree of Thought, Graph of Thought, etc.).

Concrete examples

Solving a complex math problem

A store sells apples for €2 per kilo and oranges for €3 per kilo. Marie buys 4 kilos of apples and 2 kilos of oranges, then uses a 15% discount coupon. How much does she pay? Reason step by step before giving your final answer.

Logical analysis of an ambiguous situation

John says that if it rains, he will take the bus. He does not take the bus today. Can we conclude that it is not raining? Break down your reasoning by identifying the premises, applicable logical rules, and then your conclusion.

Strategic business decision-making

Our startup is hesitating between raising funds or staying bootstrapped. We have 18 months of cash runway, a MRR of €25K growing at 10% per month, and a competitive market. Analyze the options step by step considering the financial, strategic, and operational implications of each choice.

Practical usage

To apply Chain of Thought in practice, simply add 'Reason step by step' or 'Explain your reasoning' at the end of your complex prompts. For even better results, provide an example of decomposed reasoning before asking your question. This technique is particularly effective for math problems, logic tasks, planning, and multi-criteria analysis.

Related concepts

Zero-Shot PromptingFew-Shot PromptingTree Of ThoughtSelf-Consistency

FAQ

Does Chain of Thought work with all AI models?
Chain of Thought is most effective with large language models (starting from ~10 billion parameters). Smaller models generally lack the capacity to produce coherent intermediate reasoning. With recent models like GPT-4, Claude, or Gemini, the technique yields excellent results on a wide variety of tasks.
What is the difference between zero-shot and few-shot Chain of Thought?
In zero-shot, you simply add an instruction like 'Reason step by step' without providing an example. In few-shot, you include one or more complete examples showing the expected decomposed reasoning. Few-shot typically produces better results because the model has a concrete example to follow, but zero-shot is faster to implement and often sufficient.
Does Chain of Thought slow down AI responses?
Yes, Chain of Thought produces longer responses since the model generates intermediate steps in addition to the final answer. This increases generation time and token consumption. However, this extra cost is largely offset by the improvement in quality and reliability of responses, especially for complex tasks where a direct answer would be highly likely to be incorrect.

See also

How to use this prompt

  1. Copy the prompt with the button above.
  2. Paste it into ChatGPT, Claude or your favorite AI assistant.
  3. Replace the bracketed variables with your details, then refine the result.

About Prompt Guide

Prompt Guide is a free library of 2500+ ready-to-use prompts for ChatGPT, Claude and other AIs, with guides to learn prompting and tools to build and optimize your own prompts.

More definitions

Get new prompts every week

Join our newsletter.