Refresh Your Home For Fall
Buy New
To see product details, add this item to your cart.
Ships from: Amazon.com
Sold by: Amazon.com
To see product details, add this item to your cart. You can always remove it later.
Shipper / Seller
Amazon.com
Amazon.com
Shipper / Seller
Amazon.com
Returns
30-day refund / replacement
30-day refund / replacement
This item can be returned in its original condition for a full refund or replacement within 30 days of receipt.
Read full return policy
Payment
Secure transaction
Your transaction is secure
We work hard to protect your security and privacy. Our payment security system encrypts your information during transmission. We don’t share your credit card details with third-party sellers, and we don’t sell your information to others. Learn more
Gift options
Available at checkout
Available at checkout This item is a gift. Change
At checkout, you can add a custom message, a gift receipt for easy returns and have the item gift-wrapped
To see product details, add this item to your cart. You can always remove it later.
FREE Returns
No packaging damage observed during inspection. Item may not come in original packaging. No packaging damage observed during inspection. Item may not come in original packaging. See less
Access codes and supplements are not guaranteed with used items.
Added to

Sorry, there was a problem.

There was an error retrieving your Wish Lists. Please try again.

Sorry, there was a problem.

List unavailable.
Kindle app logo image

Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet, or computer - no Kindle device required.

Read instantly on your browser with Kindle for Web.

Using your mobile phone camera - scan the code below and download the Kindle app.

QR code to download the Kindle App

  • Generative AI Design Patterns: Solutions to Common Challenges When Building GenAI Agents and Applications

Follow the authors

Get new release updates & improved recommendations
Something went wrong. Please try your request again later.

Generative AI Design Patterns: Solutions to Common Challenges When Building GenAI Agents and Applications

4.6 out of 5 stars (26)

Purchase options and add-ons

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

Frequently bought together

This item: Generative AI Design Patterns: Solutions to Common Challenges When Building GenAI Agents and Applications
$68.99
Get it as soon as Sunday, Sep 20
In Stock
Ships from and sold by Amazon.com.
+
$52.40
Get it as soon as Sunday, Sep 20
In Stock
Ships from and sold by Amazon.com.
+
$56.44
Get it as soon as Sunday, Sep 20
In Stock
Ships from and sold by Amazon.com.
Total price: $00
To see our price, add these items to your cart.
Details
Added to Cart
Choose items to buy together.

Customers also bought or read

Loading...

From the brand


From the Publisher

Generative AI Design Patterns: Solutions to Common Challenges When Building GenAI Agents and Apps

From the Preface:

If you’re an AI engineer building generative AI (GenAI) applications, you’ve likely experienced the frustrating gap between the ease of creating impressive prototypes and the complexity of deploying them reliably in production. While foundational models make it easy to build compelling demos, production systems demand solutions to fundamental challenges: hallucinations that compromise accuracy, inconsistent outputs that break downstream processes, knowledge gaps that limit enterprise applicability, and reliability issues that make systems unsuitable for critical applications.

This book bridges that gap by providing 32 battle-tested design patterns that address the recurring problems you’ll encounter when building production-grade GenAI applications. These patterns aren’t theoretical constructs—they codify proven solutions that are often derived from cutting-edge research and refined by practitioners who have successfully deployed GenAI systems at scale.

This book bridges that gap by providing 32 battle-tested design patterns that address the recurring problems you’ll encounter when building production-grade GenAI applications. These patterns aren’t theoretical constructs—they codify proven solutions that are often derived from cutting-edge research and refined by practitioners who have successfully deployed GenAI systems at scale.

Supervised machine learning (ML) involves training a problem-specific model on a large training dataset of example inputs and outputs—but GenAI applications rarely include a training phase. Instead, they commonly use general-purpose foundational models. This book is focused on design patterns for AI applications that are built on top of foundational models, such as Open AI’s GPT, Anthropic’s Claude, Google’s Gemini, or Meta’s Llama.

Who Is This Book For?

This book is for software engineers, data scientists, and enterprise architects who are building applications powered by GenAI foundational models. It captures proven solutions you can employ to solve the common challenges that arise when building GenAI applications and agents. Read it to learn how experts in the field are handling challenges such as hallucinations, nondeterministic answers, knowledge cutoffs, and the need to customize a model for your industry or enterprise. The age-old problems of software engineering have new solutions in this realm. For example, ways to meet latency and constrain costs include distillation, speculative decoding, prompt caching, and template generation.

Understanding the different patterns in this book requires different levels of background knowledge. For example, Chain of Thought (Pattern 13) requires no more than a knowledge of basic programming, Tool Calling (Pattern 21) requires an understanding of API design, and Dependency Injection (Pattern 19) requires some experience developing large-scale software. However, Content Optimization (Pattern 5) requires familiarity with statistics and ML, and Small Language Model (Pattern 24) requires an understanding of hardware optimization. We expect that 75% of the book can be read and understood by a junior software engineer or a third-year computer science student. The remainder will require specialized knowledge or experience.

AI engineering overlaps heavily with software engineering, data engineering, and ML—but in this book, we’ve limited our focus to core AI engineering. We encourage you to think of this book as a companion to the literature on patterns in related areas. Specifically, the book Machine Learning Design Patterns (O’Reilly), also co-authored by Valliappa Lakshmanan, covers proven solutions to recurring issues you’ll encounter when training a bespoke machine-learning model for a specific problem.

You’ll also likely find yourself working with both bespoke ML models and general-purpose foundational models, depending on the use case. In some situations, you might start with a foundational model but then find that edge cases require you to customize (or fine-tune) it for your problem. This book and Machine Learning Design Patterns are complementary and will help you work with both models, so we recommend that you read both.

Generative AI Design Patterns
Machine Learning Design Patterns
Data Engineering Design Patterns
Cloud Application Architecture Patterns
Design Patterns for Cloud Native Applications
Learning JavaScript Design Patterns
Customer Reviews
4.6 out of 5 stars 26
4.6 out of 5 stars 417
4.0 out of 5 stars 20
4.4 out of 5 stars 34
4.2 out of 5 stars 52
4.1 out of 5 stars 48
Design Patterns from O'Reilly Media no data no data no data no data no data no data

Editorial Reviews

About the Author

Valliappa (Lak) Lakshmanan works closely with management teams across a range of enterprises to help them employ data and AI-driven innovation to grow their businesses. Previously, he was the Director for Data Analytics and AI Solutions on Google Cloud and a Research Scientist at NOAA. He co-founded Google's Advanced Solutions Lab and is the author of several O'Reilly books and Coursera courses. He was elected a Fellow of the American Meteorological Society (the highest honor offered by the AMS) for pioneering machine learning algorithms in severe weather prediction.

Hannes Hapke is a Senior Machine Learning Engineer at Digits, and has co-authored multiple machine learning publications, including the book Building Machine Learning Pipelines and Machine Learning Production Systems by O'Reilly Media. He has also presented state-of-the-art ML work at conferences like ODSC or O’Reilly’s TensorFlow World and is an active contributor to TensorFlow's TFX Addons project. Hannes is passionate about machine learning engineering and production machine learning use cases using the latest machine learning developments.

Product details

  • ASIN ‏ : ‎ B0FN37DV9N
  • Publisher ‏ : ‎ O'Reilly Media
  • Publication date ‏ : ‎ November 11, 2025
  • Edition ‏ : ‎ 1st
  • Language ‏ : ‎ English
  • Print length ‏ : ‎ 506 pages
  • ISBN-13 ‏ : ‎ 979-8341622661
  • Item Weight ‏ : ‎ 1.92 pounds
  • Dimensions ‏ : ‎ 7 x 1.02 x 9.19 inches
  • Best Sellers Rank: #115,096 in Books (See Top 100 in Books)
  • Customer Reviews:
    4.6 out of 5 stars (26)

About the authors

Follow authors to get new release updates, plus improved recommendations.