liveBook · Manning

Instruction

An instruction is a directive specifying an action, operation, task, constraint, or expected behavior for a person or computational system.

How 6 Manning books explain it

Prompt Engineering in Practice

An instruction is a directive within a prompt that specifies the task the model should perform.

How it is used
Defines the task within a structured prompt for software-engineering work, from incident updates to deployment decisions.
How deep it goes
Defines instructions and gives writing rules for actions, audience, scope, and sequence, without descending into model internals.
Examples
Uses secure logging guidelines, an incident status update, and a deployment GO/NO-GO brief as structured prompt examples.
What you can do after
Build it from scratch by drafting a clear task directive, separating other prompt elements, and placing stable instructions for repeated use.

Read how Prompt Engineering in Practice explains instruction →

Building LLM Applications with DSPy

Text within a prompt that directs a language model’s behavior or specifies how it should perform a task.

How it is used
Uses instructions to steer language-model tasks and provide a starting point for prompt optimization.
How deep it goes
Explains instruction placement, inspection, modification, and optimization, including the trade-off between manual tweaking and optimizer search.
Examples
Illustrates intent-label definitions and a question-answering module that appends “Answer very carefully.”
What you can do after
Apply instructions via DSPy signatures and custom modules, then inspect their generated prompts.

Read how Building LLM Applications with DSPy explains instruction →

Coding with AI

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

How it is used
Directs an LLM toward a desired response rather than posing a search-style query.
How deep it goes
Defines clear wording and task breakdown, then demonstrates iterative refinement without specifying a formal prompt syntax.
Examples
Uses repeated prompts for 234 × 432, adding specificity, multiple methods, and requests to show work.
What you can do after
Apply iterative prompting by stating the task clearly, requesting methods or shown work, and refining the request.

Read how Coding with AI explains instruction →

LLMs in Production

The instruction component of a prompt is the task-specific directive that specifies what the language model should do.

How it is used
Directs a language model toward a task-specific response within a structured prompt or reusable template.
How deep it goes
Defines the instruction’s role and illustrates it with Q&A and audience-level examples, without examining model internals.
Examples
Uses a 401k Q&A template and an instruction that explains the answer as if addressing a five-year-old.
What you can do after
Apply it via a prompt template to specify a model’s task and desired response behavior.

Read how LLMs in Production explains instruction →

The Art of AI Product Development

A prompt instruction is the task specification that tells a model what operation to perform.

How it is used
Specifies the operation a language model should perform within a prompt.
How deep it goes
Defines instructions and places them among prompt components, stopping short of implementation details.
Examples
Uses an EU AI Act article request and reusable topic, content-type, context, and demonstration patterns.
What you can do after
Apply via reusable prompt templates to specify tasks, audiences, topics, qualities, and supporting information.

Read how The Art of AI Product Development explains instruction →

Context Engineering

A directive supplied to an AI system that specifies desired behavior, constraints, or task requirements.

How it is used
Establishes behavioral rules and constraints for LLM applications across conversations, sessions, or task runs.
How deep it goes
Explains three instruction mechanisms and their context-window assembly, including staged skill loading to conserve tokens.
Examples
Illustrates a financial-services assistant, an incident-analysis skill, and repository guidance requiring unit tests and regression tests.
What you can do after
Evaluate and understand how layered instructions provide behavioral guidance while conserving the token budget.

Read how Context Engineering explains instruction →

Also covered in

What to know first

Related concepts

Questions about instruction

What is instruction?

An instruction is a directive specifying an action, operation, task, constraint, or expected behavior for a person or computational system.

Which Manning books explain instruction?

Prompt Engineering in Practice, Building LLM Applications with DSPy, Coding with AI, LLMs in Production, The Art of AI Product Development and Context Engineering.

What should I know before learning instruction?

Manning books that teach instruction usually introduce language model, prompt, ChatGPT and AI agent first.

What is the difference between instruction and constraint?

An instruction is a directive specifying an action, operation, task, constraint, or expected behavior for a person or computational system. A constraint is a condition or rule that restricts the permissible choices, states, actions, values, or solutions in a system or problem.

What kinds of instruction are there?

Kinds of instruction include lda instruction, ldx instruction, ldy instruction, machine instruction and stack instruction.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.