liveBook · Manning

Instruction

As explained in Coding with AI

A directive that specifies an action or response an artificial-intelligence model should produce.

An instruction tells an artificial-intelligence model what action or response to produce. Clear, direct language generally improves results and reduces errors. section 9.2

Write instructions that:

  • Use simple language and avoid unnecessary jargon. section 9.2
  • State the desired action or response directly, using active wording. section 9.2
  • Break complex tasks into manageable steps. section 9.2
  • Supply relevant context and concrete examples alongside the instruction. section 9.2

A practical instruction

Give the existing project as context, then ask: “Add the requested feature. Explain the changes briefly, divide the work into steps, and show the resulting code.” If the response misses the goal, continue the conversation and clarify the request. section 9.2

Figure 9.3 A good prompt starts with great context (usually provided by the tool). This includes your existing project. Next, you add good examples and clear instructions. The process is very similar to communicating verbally with a human.
A diagram of a flowchart

Description automatically generated

Use the prompt anatomy diagram to see how context, examples, and clear instructions work together. section 9.2

How Coding with AI covers it

How deep it goes
Defines clarity, directness, simple language, and task breakdown, but does not descend into model internals.
Examples
Uses existing project context, concrete examples, conversational clarification, and stepwise task requests.
What it assumes
Assumes basic human communication skills while teaching context, clarity, specificity, and examples for LLM interactions.
What you can do after
Apply it to write clearer prompts and improve model responses through clarification and task decomposition.
How it connects
Connects instructions with prompt engineering, context, examples, LLMs, and IDE tools.

Also explained in

Compare how 5 books explain instruction →

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.