liveBook · Manning

Chapter 1: Prompt engineering: The blueprint

What you will learn in chapter 1 of Prompt Engineering in Practice

The introduction argues that prompts used in software products should be treated as engineered interfaces rather than adjusted by intuition.

After this chapter you will be able to

Section by section

Introduction

The introduction argues that prompts used in software products should be treated as engineered interfaces rather than adjusted by intuition.

Key terms: casual prompting, prompt engineering, engineering artifacts, engineered interfaces, inconsistent output, interpretive room, specification, support-ticket routing, defining tasks precisely, constraining outputs

1.1 The prompt engineering mental model

This section frames prompts as engineered interfaces with distinct parts, an iterative lifecycle, and reusable patterns analogous to software design patterns.

Key terms: engineered interface, instructions, context, constraints, inputs, expected output, design, test, iterate, manage

1.2 From casual prompting to prompt engineering

The section contrasts casual prompting with deliberate prompt engineering and uses a pull-request summary to show how prompt design can improve output without changing the model or source information.

Key terms: prompt engineering, acceptance criteria, reliable and predictable, model fine-tuning, interface level, model’s weights, casual prompting, shared engineering artifacts, review focus, input boundary

1.3 Why prompt engineering matters for software engineers

This section argues that prompts in software systems deserve the same specification, review, testing, and maintenance discipline as code and APIs.

Key terms: first-class engineering concern, specification, constraints, inputs, output format, maintainable artifact, reviewable interface, version controlled, representative inputs, audit trail

1.4 Prompts as designed artifacts

This section treats prompts as designed artifacts whose parts shape the output and whose specific failures can be diagnosed.

Key terms: message, prompt, designed artifact, instructions, incident report, components, failure modes, prompt template, {{incident_report_text}}, placeholder

1.5 The prompt engineering lifecycle

A bug-report classification example shows how prompt engineering moves through design, test, iterate, and manage, with each phase producing a concrete engineering deliverable.

Key terms: Design, classification criteria, variable input, response shape, Test, known label, failure mode, Iterate, explicit criterion, targeted prompt surgery

1.6 Three diagnostic lenses

Introduces a three-question checklist for diagnosing prompts that fail or produce plausible but unsuitable output.

Key terms: diagnostic checklist, contract, context, variability

1.6.1 Prompts as specifications

This section reframes prompts as software specifications so engineers can write and review them for specificity rather than treating them as casual messages.

Key terms: software specification, constraints, acceptance criteria, specificity, review vocabulary, underspecified, ambiguous interpretation

1.6.2 Prompts must be self-contained

This section explains why a prompt must include the context needed for the model to produce the intended output.

Key terms: request, conversation context, message history, self-contained, implicit knowledge, severity taxonomy, customer effect statement, context

1.6.3 Inspecting the prompt first when output varies

This section teaches readers to inspect an inconsistent prompt for underspecification before blaming the model or API.

Key terms: underspecification, output schema, constraint, worked example, variance, internal taxonomy, reference list, interpretive gap

1.7 Summary

The chapter summary recaps prompt engineering as deliberate design of prompts as software artifacts, with explicit task requirements and a repeatable lifecycle.

Where this is used later

Concepts explained in this chapter

Chapter 2: Prompt design: Structural elements →

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.