liveBook · Manning

Sequential thinking

As explained in Coding with AI

A reasoning approach that decomposes a task into ordered logical steps and considers the actions or decisions required at each step.

Sequential thinking breaks a complex task into ordered logical steps, making each action or decision explicit. In prompt work, it helps an AI clarify the task, identify missing context, and refine the wording toward a more useful result. section 9.3 section 9.5.1

A practical sequential prompt typically asks the model to:

  • Break the task into logical steps and identify the actions or decisions required at each step. section 9.3
  • Check contextual details, expose missing information, and ask clarifying questions about audience, tone, or constraints. section 9.3
  • Evaluate and revise its approach repeatedly so the final prompt becomes clearer, more precise, and more adaptable. section 9.3 section 9.5.1

Diagnosing a Python application in Docker

A sequential prompt can turn an unclear debugging request into a checklist: ask whether the container is running with docker ps -a; inspect failures with docker logs if it stopped; examine internal application logs if it is running; verify the Python version and dependencies; then inspect the Dockerfile for configuration problems such as its base image. Each question narrows the next diagnostic action instead of requesting an unexplained final answer. section 9.5.1

Figure 9.6 A chain-of-thought prompt gets the model to reason out a problem like a human would. You break down the problem and experiment with answers until you get the results you desire.
A diagram of a diagram

Description automatically generated

Use the figure to see how a chain-of-thought prompt decomposes a problem and experiments with possible answers. section 9.5.1

How Coding with AI covers it

How deep it goes
Explains decomposition, contextual awareness, and iterative refinement through a concrete debugging workflow.
Examples
Uses prompt analysis and Python-in-Docker diagnosis to demonstrate ordered questions and corrective actions.
What it assumes
Assumes a task or draft prompt, while supporting users who need to discover missing context through clarifying questions.
What you can do after
Apply it via structured prompts that guide clarification, diagnosis, and progressive refinement.
How it connects
Connects prompt engineering with chain-of-thought prompting, contextual awareness, iterative refinement, Docker, and Python debugging.

Related concepts

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