Skip to main content

What is chain-of-thought prompting?

The Harvard Chan AI Glossary

In our classes, we often pause to explain the ideas behind AI and the language used to describe it. These posts grew out of those conversations. They’re for anyone who would like to understand AI better, with no technical background assumed.

Chain-of-thought prompting is a way of asking an AI language system to produce intermediate steps before giving a final answer. A prompt is the instruction and information supplied to the system. Rather than asking only for a result, this approach encourages an explanation of how the problem can be broken into smaller parts.

For example, consider: “A notebook costs three dollars. What do four notebooks cost after a two-dollar discount?” An answer can be organized as: four notebooks cost twelve dollars; subtracting two dollars leaves ten dollars. The intermediate steps make the proposed calculation visible rather than presenting only the final number.

Researchers initially demonstrated this approach by including worked examples in the prompt. The AI then followed a similar pattern on a new problem. Another approach simply asks it to work step by step. Both try to give a language model—a system trained to recognize language patterns and generate responses—a useful structure for handling a multistep task.

Producing intermediate text can help on some problems, but it does not make every answer correct. A mistaken early step can be carried through consistently. The final explanation may look orderly while resting on an incorrect assumption. More steps can also create more opportunities for irrelevant or mistaken claims.

There is a second, less obvious limitation: the explanation is not necessarily a faithful record of what caused the answer. Studies have shown that models can produce plausible explanations while omitting influences that affected their responses. We should therefore treat the text as a proposed line of reasoning to inspect, not as direct access to a machine’s inner experience.

Some reasoning models perform intermediate computation without displaying all of it. They do not necessarily benefit from an instruction to “think step by step”; OpenAI advises that this is unnecessary for its reasoning models. Ask instead for a checkable answer, with the assumptions, calculations or sources needed to assess it. Follow the guidance for the model you are using.

For outpatient clinic capacity planning, ask for an inspectable calculation: the number of staffed exam rooms, available hours, assumed visit durations by appointment type and the resulting number of slots. Check the arithmetic with a calculator and the assumptions with the people running the clinic. A convincing explanation cannot establish that staffing or demand matches those assumptions. The useful output is an auditable calculation, not a longer narrative that substitutes for evidence.

Sources: OpenAI — Reasoning Best Practices; Wei and colleagues — Chain-of-Thought Prompting Elicits Reasoning in Large Language Models; Turpin and colleagues — Language Models Don’t Always Say What They Think.

If you would like to find out more about AI and improve your leadership skills, consider the AI in Health Care Certificate of Specialization from the Advanced Learning Academy at Harvard T.H. Chan School of Public Health. You can take an individual course or work toward the full certificate.


AI is a fast-moving field. This explanation reflects our class discussions and related material at the time of writing. Terminology, capabilities and tools may change.

For suggested additions or corrections, please email me at tpanch@hsph.harvard.edu.

Dr. Trishan Panch
Program Director, AI in Health Care
Harvard T.H. Chan School of Public Health — Advanced Learning Academy