Chapter 0: Introduction
What this book is
The artificial intelligence landscape is currently noisy. Between marketing jargon, breathless hype, and bloated framework abstractions, it is easy to feel as though building AI systems requires arcane wizardry or a PhD in machine learning.
The central thesis of this book is simple: Working with LLMs is ordinary software engineering, and you can think of LLMs as simple, stateless APIs.
Prerequisites
Some people find it surprising how few prerequisites are needed to start working with LLMs:
- You have basic programming knowledge.
- You know how to make an API call.
- You have some experience with chatbots like ChatGPT.
A few years of experience help, but are not required.

Who this book is for
- Junior Developers: You are just starting off in your career. It's clear to you that LLMs are the future, and you want to go beyond just using coding agents.
- Software Engineers & Full-Stack Developers: You want to integrate LLMs into your systems cleanly without taking on heavy, opaque dependencies.
- Architects & Tech Leads: You need to evaluate the real capabilities, latency trade-offs, security hazards, and failure modes of LLMs in production architectures.
- Pragmatic Builders: You want to understand how autonomous agents, tool calling, and retrieval pipelines actually work from first principles.
What you will learn
By the end of the book, if everything goes well, you will be able to answer the following questions:
- Where do LLMs fit into my application's architecture?
- Which trade-offs should I be aware of when working with LLMs?
- What are the component parts of an AI agent?
- How can I use LLMs to build classifiers, summarizers, and translators?
Things you DO NOT need to know
You might expect to need a library of heavy mathematical grimoires to work with AI:
- You don't need math (Tensor calculus is off-duty today)
- You don't need data science (Loss surfaces are taking a nap)
- You don't need machine learning (Backpropagation is sleeping in)
The heavy titans did their hard work during model training. In our workshop, all we need are the nimble tools of everyday software engineering.

Structure of the book
The chapters are organized into two sequential parts:
Part 1: The Core Mental Models (Chapters 1 to 6)
We begin with the essential mechanics. You will learn what LLMs are, how the fundamental agent loop works, how chat requests are packaged, why statelessness is your greatest architectural asset, how system prompts shape model behavior, and how context windows bound memory.
Part 2: The Single Call (Chapters 7 to 8)
Next, we explore what a single model call can achieve (classification, extraction, summarization), and examine the common failure modes of early implementations: hallucinations, schema drift, truncation, and nondeterminism.
Multi-turn conversations, chatbots, retrieval, structured output, tool calling, and full agents continue in the next book in the series: Patchbook: Agents are just loops.
About the Patchbook Series
Patchbook is a series of short technical books by Monarch Wadia, written as practical conceptual upgrades for working software engineers.
Patchbook titles are not academic textbooks stuffed with differential geometry, nor are they brittle tutorials for a third-party framework that will be obsolete next quarter. Instead, each chapter delivers a single, durable mental model or architectural pattern. You can read a chapter in five minutes, understand the fundamental mechanics under the hood, and apply it directly to your codebase in any language: Go, Python, TypeScript, Rust, or Java.