Series Editor Foreword xi
Preface xiii
Acknowledgments xvii
About the Author xix
Part I: Getting Started with Foundations of AI, LLMs, and Experimentation 1
Chapter 1: An Introduction to AI, LLMs, and Agents 3
Introduction 3
The Basics of Large Language Models 3
The Family Tree of LLM Tasks 10
Alignment 10
Prompt Engineering 12
Special LLM Features 17
LLM Workflows 25
AI Agents 25
Conclusion 28
Chapter 2: First Steps with LLM Workflows 31
Introduction 31
Case Study 1: Text-to-SQL Workflow 32
Conclusion 57
Chapter 3: AI Evaluation Plus Experimentation 59
Introduction 59
Evaluating and Experimenting with LLMs 59
Case Study 1, Revisited: The Text-to-SQL Workflow 61
Case Study 2: A Simple Summary Prompt 77
Conclusion 83
Part II: Moving the Needle with AI Agents, Workflows, and Multimodality 85
Chapter 4: First Steps with AI Agents and Multi-Agent Workloads 87
Introduction 87
Case Study 3: From RAG to Agents 88
When Should You Use Workflows Versus Agents? 104
Case Study 4: A (Nearly) End-to-End SDR 105
Evaluating Agents 118
Conclusion 121
Chapter 5: Enhancing Agents with Prompting, Workflows, and More Agents 123
Introduction 123
Case Study 5: Agents Complying with Policies Plus Synthetic Data Generation 124
Building Our Policy Bot Agent 127
Case Study 6: Deep Research Plus Content Gel(