

AI Engineering Patterns: Hands on Engineering Patterns for Building AI Systems
AI ENGINEERING PATTERNS
內容簡介
Building AI features that work in demos is easy; building ones that survive real-world production is not. This book is a practical field guide for engineers navigating this gap. It distills hard-earned lessons into fifty actionable patterns that cover the full lifecycle of AI systems from early decision-making to production operations helping teams move from experimental prototypes to reliable, scalable deployments.
The book begins with pre-coding fundamentals, introducing frameworks such as the AI versus no-AI decision model, the failure-first mindset, and evaluation gates that ensure teams build the right solution from the start. It then treats prompts as production code, covering output contracts, versioning, and testing practices, before diving into context management and retrieval design to improve accuracy and efficiency. From there, the focus shifts to integration and production reliability streaming, retries, caching, and protocols like MCP and A2A that enable robust system composition. A significant portion is dedicated to security, addressing prompt injection, input defense, data protection, and trust propagation across multi-step agent workflows. The final sections cover evaluation, testing infrastructure, deployment strategies, observability, and incident response practices required to operate AI systems at scale. Two end-to-end examples, a support agent copilot and a customer-facing assistant evolve throughout the book, demonstrating how patterns apply in real systems.
By the end, readers will be equipped to design, test, secure, and operate AI systems with production-grade discipline. This book provides a clear blueprint for building AI features that are not just functional, but reliable and resilient under real-world conditions.
What you will learn:
- Design prompts as production code using contracts, validation, clear roles, tuning, and CI pipelines to prevent regressions.
- Build robust RAG systems with efficient chunking, hybrid search, reranking, and context control for consistent accuracy.
- Secure AI systems against injection, data leaks, and trust failures using proven patterns from real production incidents.
- Operate AI in production with eval-driven metrics, regression gates, versioning, canary releases, drift checks, and incident playbooks.
Who this book is for:
The primary audience is mid-level to senior software engineers and AI/ML engineers building LLM-backed features in production. The book also speaks directly to security architects evaluating AI systems, ML platform engineers building shared infrastructure and engineering managers responsible for AI initiatives.
作者介紹
Urooj Siraj is a cybersecurity and AI leader with proven experience securing complex systems in highly regulated environments. She manages and leads AI and cyber programs across multiple lines of business, primarily at fintech companies, driving cybersecurity efforts across fraud detection, behavioral analytics, and platform engineering, embedding security into fast-paced, high-impact AI environments. She holds the AWS Certified Machine Learning Specialty and Artificial Intelligence Governance Professional (AIGP) certifications, and has filed five GenAI-enabled cybersecurity patents in threat detection, abuse case automation, and intelligent risk remediation. Urooj is a frequent speaker, mentor, and advocate for the next generation of cybersecurity leaders. She holds a Master of Science in Management and Information Technology from the University of Virginia and a Bachelor of Science in Software Engineering from Champlain College.
Rob Murphy has spent more than two decades at the intersection of cybersecurity and emerging technology, primarily inside federal and defense environments where the consequences of failure are severe. He holds the Certified Information Systems Security Professional (CISSP) credential and the Artificial Intelligence Governance Professional (AIGP) certification. His current work focuses on orchestrating multi-agent AI platforms with a security-first mindset, designing systems where failure modes are visible, irreversible actions require human approval, and the boundary between what the model decides and what production code commits to is sharp enough to defend in an incident review. Rob is an author, public speaker and a graduate of the Naval Postgraduate School, Master of Science in Information Technology Management.
規格
退貨說明
退貨須知:
- 依照消費者保護法的規定,您享有商品貨到次日起七天猶豫期(含例假日)的權益(請注意!猶豫期非試用期),辦理退貨之商品必須是全新狀態(不得有刮傷、破損、受潮)且需完整(包含全部商品、配件、原廠內外包裝、贈品及所有附隨文件或資料的完整性等)。
- 請您以送貨廠商使用之包裝紙箱將退貨商品包裝妥當,若原紙箱已遺失,請另使用其他紙箱包覆於商品原廠包裝之外,切勿直接於原廠包裝上黏貼紙張或書寫文字。若原廠包裝損毀將可能被認定為已逾越檢查商品之必要程度,本公司得依毀損程度扣除回復原狀必要費用(整新費)後退費;請您先確認商品正確、外觀可接受,再行拆封,以免影響您的權利;若為產品瑕疵,本公司接受退貨。
依「通訊交易解除權合理例外情事適用準則」,下列商品不適用七日猶豫期,除產品本身有瑕疵外,不接受退貨:
- 易於腐敗、保存期限較短或解約時即將逾期。(如:生鮮蔬果、乳製品、冷凍冷藏食材、蛋糕)
- 依消費者要求所為之客製化給付。(如:客製印章、鋼筆刻字)
- 報紙、期刊或雜誌。
- 經消費者拆封之影音商品或電腦軟體。
- 非以有形媒介提供之數位內容或一經提供即為完成之線上服務,經消費者事先同意始提供。(如:電子書)
- 已拆封之個人衛生用品。(如:內衣褲、襪類、褲襪、刮鬍刀、除毛刀等貼身用品)
- 國際航空客運服務。
若您退貨時有下列情形,可能被認定已逾越檢查商品之必要程度而須負擔為回復原狀必要費用(整新費),或影響您的退貨權利,請您在拆封前決定是否要退貨:
- 以數位或電磁紀錄形式儲存或著作權相關之商品(包含但不限於CD、VCD、DVD、電腦軟體等) 包裝已拆封者(除運送用之包裝以外)。
- 耗材(包含但不限於墨水匣、碳粉匣、紙張、筆類墨水、清潔劑補充包等)之商品包裝已拆封者(除運送用之包裝以外)。
- 衣飾鞋類/寢具/織品(包含但不限於衣褲、鞋子、襪子、泳裝、床單、被套、填充玩具)或之商品缺件(含購買商品、附件、內外包裝、贈品等)或經剪標或下水或商品有不可回復之髒污或磨損痕跡。
- 食品、美容/保養用品、內衣褲等消耗性或個人衛生用品、商品銷售頁面上特別載明之商品已拆封者(除運送用之包裝外一切包裝、包括但不限於瓶蓋、封口、封膜等接觸商品內容之包裝部分)或已非全新狀態(外觀有刮傷、破損、受潮等)與包裝不完整(缺少商品、附件、原廠外盒、保護袋、配件紙箱、保麗龍、隨貨文件、贈品等)。
- 家電、3C、畫作、電子閱讀器等商品,除商品本身有瑕疵外,退回之商品已拆封(除運送用之包裝外一切包裝、包括但不限於封膜等接觸商品內容之包裝部分、移除封條、拆除吊牌、拆除貼膠或標籤等情形)或已非全新狀態(外觀有刮傷、破損、受潮等)與包裝不完整(缺少商品、附件、原廠外盒、保護袋、配件紙箱、保麗龍、隨貨文件、贈品等)。
- 退貨程序請參閱【客服專區→常見問題→誠品線上退貨退款】之說明。


