liveBook · Manning

Chain-of-thought prompting

As explained in The Art of AI Product Development

Chain-of-thought is a prompting technique that elicits an intermediate sequence of reasoning steps before a model produces a final answer.

A prompt that produces a short social media post may struggle when asked for a detailed article or a task with several decisions. Chain-of-thought (CoT) prompting addresses this by asking a language model to work through intermediate steps before producing its final answer. section 6.3 section 6.3.1

A chain-of-thought prompt gives the work a sequence:

  • Decompose the task into smaller, manageable components. section 6.3.1
  • Generate a partial solution for each component, then assemble the final response. section 6.3.1

From topic to article

For a blog article, the prompt can ask the model to brainstorm audience-relevant points, arrange an outline, write an introduction and body, conclude, and edit for clarity and flow. The sequence gives the model a path through the work instead of asking it to jump straight to a finished article. section 6.3.1

Use CoT when the task genuinely needs multiple steps; a straightforward request may need only a simple prompt. Stepwise work consumes more tokens and increases the chance of a useful result, but it is not a guarantee of correctness. For uncertain agent workflows, explicitly coded steps can reduce the error potential of probabilistic planning. section 6.5 section 9.2.2

The same pattern extends beyond article drafting. A retrieval-augmented report prompt can move from summarizing trends to explaining industry effects and proposing actionable insights. A roadmap agent can plan to fetch the current roadmap, research trends, analyze user feedback, and assess suggestions against company priorities. Reflection offers a separate pass to inspect and improve the result. section 7.3.3 section 9.2.2

How The Art of AI Product Development covers it

How deep it goes
Defines decomposition and partial-solution generation, then works through an article prompt without descending into model internals.
Examples
Uses a staged blog-article prompt, a technical report outline, and a product-roadmap agent plan.
What it assumes
Introduces the technique without requiring technical expertise, building from simpler zero-shot and few-shot prompting.
What you can do after
Apply it via structured prompts to break complex writing or planning tasks into steps and assemble a final output.
How it connects
Connects few-shot prompting, self-consistency, reflection, retrieval-augmented generation, and agent planning through their roles in handling complex tasks.

Also explained in

Compare how 18 books explain chain-of-thought prompting →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of The Art of AI Product Development. The section links point to the parts of the book it draws on.