Prompt Engineering in Practice cover
welcome to this free extract from
an online version of the Manning book.
to read more
or
about-this-book

about this book

 

Prompt Engineering in Practice treats prompt engineering as a design discipline, rather than as a bag of tricks that may or may not still work next quarter.

Prompts have become the interface between your code and language models such as ChatGPT, Claude, and Copilot. Yet most prompts are still written by feel: tweaked word by word until a run looks good enough, then quietly breaking in production when nobody changed anything obvious.

The goal of this book is to give you a systematic method for designing prompts that meet a specification, fail in diagnosable ways, and improve safely over time. To do that, the book builds a formal system from two halves:

  • The structural elements a prompt is composed of
  • A curated library of prompt patterns, the prompting equivalent of software design patterns

On top of that foundation, we add templates, prompt types, contextual prompting, sampling, security, and management. By the end, you will have not just a set of techniques, but a shared vocabulary and method you can apply, review, and teach.

Every example is drawn from work software engineers actually do: pull request descriptions, code review triage, incident summaries, refactor plans, runbook scoring, and support-bot audits.

Who should read this book?

This book is for software engineers and technical professionals who already use language models in their day-to-day work and want to stop guessing why their prompts sometimes regress.

How this book is organized: A roadmap

About the code

liveBook discussion forum