Prompt & Context Engineering·Question 3 of 68BasicAI-75

What is chain-of-thought prompting? When does it help, and when is it unnecessary or harmful?

Type it the way you would explain it to an interviewer. A few sentences is enough; you can't break anything.

Model answer: the part to lead with

Chain-of-thought (CoT) prompting elicits intermediate reasoning steps before the final answer - either via few-shot exemplars with worked solutions (Wei et al., 2022) or zero-shot instructions. It works because autoregressive models compute a bounded amount per token; forcing intermediate tokens gives the model more serial computation and lets later steps condition on earlier ones, which dramatically helps multi-step arithmetic, logic, planning, and code reasoning. The original paper showed it's an emergent benefit of scale - small models produce fluent but wrong chains.

Full worked answer with diagram

Chain-of-thought (CoT) prompting elicits intermediate reasoning steps before the final answer - either via few-shot exemplars with worked solutions (Wei et al., 2022) or zero-shot instructions. It works because autoregressive models compute a bounded amount per token; forcing intermediate tokens gives the model more serial computation and lets later steps condition on earlier ones, which dramatically helps multi-step arithmetic, logic, planning, and code reasoning. The original paper showed it's an emergent benefit of scale - small models produce fluent but wrong chains.

When it helps: any task where a human would need scratch paper - multi-hop questions, math word problems, constraint satisfaction, root-cause analysis.

When it's unnecessary: single-step tasks - extraction, lookup, straightforward classification, formatting. "What's the capital of France?" gains nothing from three paragraphs of deliberation; you pay latency and cost for filler. CoT tokens also add a new surface for hallucination: a confident-sounding chain can rationalise a wrong answer, and users/downstream systems may over-trust visible reasoning that isn't faithful to the model's actual computation (faithfulness of CoT is a known open problem).

When it's actively the wrong tool: reasoning models (OpenAI's GPT-6 family and earlier GPT-5 and o-series models, Claude with adaptive thinking, or extended thinking on older models, Gemini thinking models, DeepSeek's reasoning modes) already perform internal chain-of-thought trained via RL; prompting them to "think step by step" is redundant, and stuffing the prompt with few-shot CoT exemplars can interfere with the reasoning style they were trained for. With these models you control deliberation through API parameters (an effort level or thinking level on current frontier models, a token budget on some older open-weight ones), not prompt incantations.

Practical engineering detail: if you need structured output and CoT, order matters - have the model reason first, then emit the answer (e.g., a reasoning field before the answer field in the schema). Answer-then-justify forfeits the benefit because the answer tokens are already sampled.

Worth sketching. The two branch points are the whole answer: does the task need scratch paper, and is the model already trained to produce it.

flowchart TD
    A["Task"] --> B{"Would a human<br/>need scratch paper?"}
    B -->|"no"| C["Answer directly,<br/>no CoT tokens"]
    B -->|"yes"| D{"Reasoning model?"}
    D -->|"yes"| E["Raise the thinking budget,<br/>drop CoT exemplars"]
    D -->|"no"| F["Elicit reasoning<br/>in the prompt"]
    F --> G["reasoning field first"]
    G --> H["answer field last"]

What a good answer covers

  • Chain-of-thought (CoT) prompting elicits intermediate reasoning steps before the final answer - either…
  • It works because autoregressive models compute a bounded amount per token; forcing intermediate tokens…
  • The original paper showed it's an emergent benefit of scale - small models produce fluent but wrong chains
  • When it helps: any task where a human would need scratch paper - multi-hop questions, math word…
  • When it's unnecessary: single-step tasks - extraction, lookup, straightforward classification, formatting

Key terms: reasoning models

Interviewer follow-ups to expect

  1. How would you decide empirically whether CoT is worth the latency for a given task?

  2. What does it mean for a chain of thought to be "unfaithful"?

  3. How does CoT relate to test-time compute scaling?

Worked answer from AI-Engineer-Interview-Questions by Om (MIT), reformatted for LLM Prep · answer text last updated 6 November 2026 · scoring and review schedule by LLM Prep