liveBook · Manning

Chain-of-thought prompting

As explained in Grokking AI Applications

A prompting technique that asks a language model to express intermediate reasoning steps before presenting a conclusion.

A vague request can produce a vague answer: asking for an energy-drink tagline may return only “Stay energized!” Chain-of-thought prompting makes the task more structured by asking the language model to reason through intermediate steps before giving its conclusion. section 3.2

Use chain-of-thought prompting as part of a practical prompt-enhancement workflow:

  • Break a complex task into smaller steps, such as listing the sections of a business plan before outlining each section’s goals. section 3.2
  • Ask the model to explain its reasoning for each step and then provide a final answer. section 3.2
  • Request self-validation by asking the model to verify its answer or explain why it makes sense. section 3.2
  • Add a fallback response when the requested information is unavailable, reducing the chance of misleading output. section 3.2

A structured prompt

Instead of asking, “Give me a tagline for an energy drink,” ask the model to generate several options, explain the reasoning behind each choice, select the strongest tagline, and verify that it fits the product. Experiment with the wording and compare the results. section 3.2

How Grokking AI Applications covers it

How deep it goes
Defines step-by-step prompting and pairs it with decomposition and self-validation, without discussing model internals.
Examples
Uses business-plan decomposition and energy-drink tagline generation to contrast unstructured and structured requests.
What it assumes
Builds on breaking tasks down and uses basic prompt components such as roles, tasks, features, and examples.
What you can do after
Apply CoT by writing prompts that request intermediate reasoning, final answers, and response verification.
How it connects
Ties chain-of-thought prompting to task decomposition, self-validation, prompt structure, and large language models.

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 Grokking AI Applications. The section links point to the parts of the book it draws on.