Skip to Content
Generative AI Design Patterns
book

Generative AI Design Patterns

by Valliappa Lakshmanan, Hannes Hapke
October 2025
Intermediate to advanced content levelIntermediate to advanced
508 pages
13h 45m
English
O'Reilly Media, Inc.
Book available

Overview

Generative AI enables powerful new capabilities, but they come with some serious limitations that you'll have to tackle to ship a reliable application or agent. Luckily, experts in the field have compiled a library of 32 tried-and-true design patterns to address the challenges you're likely to encounter when building applications using LLMs, such as hallucinations, nondeterministic responses, and knowledge cutoffs.

This book codifies research and real-world experience into advice you can incorporate into your projects. Each pattern describes a problem, shows a proven way to solve it with a fully coded example, and discusses trade-offs.

  • Design around the limitations of LLMs
  • Ensure that generated content follows a specific style, tone, or format
  • Maximize creativity while balancing different types of risk
  • Build agents that plan, self-correct, take action, and collaborate with other agents
  • Compose patterns into agentic applications for a variety of use cases
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

LLM Design Patterns

LLM Design Patterns

Ken Huang

Publisher Resources

ISBN: 9798341622654Errata PageSupplemental Content