The LLM Primer Series
A seven-volume field guide to generative AI by Sho Shimoda, now complete.
What this series is
The LLM Primer Series is a structured, mechanism-first treatment of large language models — written for engineers, technical product managers, curious practitioners, and anyone willing to read carefully. Each volume takes one layer of the field in depth, holding technical precision while keeping the explanations clear enough to actually use.
The series is designed to work two ways. You can read Volume I as a complete foundation and stop there. Or you can follow the whole arc — fundamentals, mathematics, retrieval, cognition design, production engineering, scaling, and security — and finish with an end-to-end working understanding of how to build with large language models responsibly.
All seven volumes are now published and available on Amazon. Together they form a single, coherent map of the LLM engineering stack, written by the same author in the same voice, from the first token through to the last defensive control on a production system. A standalone companion volume, Physical AI, extends the map into embodied systems and robotics.
All volumes are written by Sho Shimoda, CTO of Receipt Roller Inc., who builds and operates AI systems in production and writes about them in language clear enough to be followed.
Who this is for: engineers and architects looking for a durable understanding. Product managers and executives who have to decide which AI to build. Curious practitioners and students who want to understand the technology behind the headlines. The series is written so you do not need a mathematical background to read it, but it keeps enough technical precision that an experienced engineer will not feel their time is being wasted.
How to read this page
Each volume below lists its full table of contents, organized by Part, with a chapter-by-chapter walkthrough article linked for every chapter. If you want the deepest treatment, read the book; the walkthroughs summarize each chapter and give you a place to think through the mechanics on the web.
Appendices are listed for transparency, but they are book-only content — reference material, worksheets, exercises with solutions, and other blocks that belong at the back of the book rather than as standalone walkthroughs. To get the appendices, read the book.
The seven volumes
Volume I — How Generative AI Works
A clear, practical guide to the fundamentals of large language models.
The plain-language on-ramp to the whole series. Starting from zero — tokens, training, and the simple act of predicting the next word — it builds an honest, jargon-free picture of what a large language model is, how it is trained, and why it behaves the way it does, assuming no prior background. It is the foundation every later volume sits on.
|
 |
Series introduction: A chapter-by-chapter walkthrough of LLM Primer I — Series introduction & index
Part I — Concepts and foundations
Part III — Practical perspectives
Part IV — Advanced topics
Appendices (book only)
| A — |
LLM glossary |
| B — |
The mathematics behind attention |
| C — |
Prompting reference sheet |
| D — |
Tools and libraries |
| E — |
Further reading |
Volume II — Language Models Through Mathematics
A mathematically rigorous yet readable tour of how the machinery actually works.
A rigorous but readable walk through the internals — attention, optimization dynamics, loss landscapes, and scaling behavior, explained through the mathematics that holds them up. Every equation that matters is derived in full, each one wrapped in a story, an analogy, and a worked numerical example. For readers who want the mathematics that the first volume keeps in its sidebars.
|
 |
Series introduction: A chapter-by-chapter walkthrough of LLM Primer II — Series introduction & index
Part I — Mathematical intuition
Part II — Anatomy of a Transformer
Part III — Training, alignment, and evaluation
Part IV — Applications, limits, and practice
Appendices (book only)
| LLM mathematics reference sheet |
| A statistical perspective on LLMs |
| Questions people ask |
| Worked derivations |
| Exercises with solutions |
| Index of symbols |
| A complete forward pass, in numbers |
| A timeline of the ideas |
Volume III — Enhancing Enterprise AI with RAG
A practitioner's walkthrough of the full retrieval-augmented generation stack.
Retrieval-augmented generation in practical terms — parsing, chunking, vector storage, retrieval, security, evaluation, and continuous updates — the architecture of anchoring a model in your own documents so you can get enterprise answers that are reliable and current. The volume to read if your job is shipping AI features that have to stay up to date and cite their sources.
|
 |
Series introduction: LLM Primer III — Series introduction & index
Part I — RAG foundations
Part II — Ingestion, parsing, and chunking
Part III — Vector databases and retrieval optimization
Part IV — Security, privacy, and access control
Part V — Evaluation, monitoring, and maintenance
Appendices (book only)
| A — |
Essential mathematical formulas for optimizing RAG |
| B — |
Sample system prompts for anonymization and evaluation |
| C — |
Vector database and tooling decision matrices |
| D — |
Reference datasets for evaluating RAG |
Volume IV — Designing AI Cognition with MCP
Engineering context, tools, and memory for reliable AI agents.
The architecture that surrounds the model — the Model Context Protocol, orchestration patterns, attention and memory budgets, and the security model for agentic systems. Structured context modeling and orchestration: how to shape the model's reasoning by engineering the context and the situations it sees, rather than modifying the model itself. The volume to read if you are building agentic systems — tool inventories, long-running loops, cross-session memory, and the discipline of designing what the model is allowed to look at.
|
 |
Series introduction: LLM Primer IV chapter-by-chapter walkthrough — Series introduction & index
Part I — The paradigm shift in AI integration
Part II — Core MCP mechanics
Part III — Multi-agent orchestration patterns
Part IV — Designing cognition: context and memory
Part V — Securing agentic flows
Part VI — Production engineering and scale
Appendices (book only)
| A — |
MCP quick reference and cheat sheet |
| B — |
Implementation blueprints and code examples |
| C — |
Production readiness and security checklists |
| D — |
Advanced specifications and Standard Enhancement Proposals (SEPs) |
| E — |
Benchmarks and performance data |
| F — |
Official resources and ecosystem links |
Volume V — Building Real-World LLM Applications
Designing, evaluating, and operating LLM systems in production.
A systems-focused guide from prototype to production — prompt engineering, retrieval, agents and tool calling, evaluation loops, observability, security, and serving economics — for turning a capable model into a reliable product. The volume that turns architectural understanding into deployed services with real users sitting on top of them.
|
 |
Series introduction: A chapter-by-chapter walkthrough of LLM Primer V — Series introduction & index
Part I — Foundations of AI engineering
Part II — Building agentic and retrieval capabilities
Part III — Quality assurance and observability
Part IV — Security, scale, and optimization
Appendices (book only)
| A — |
Production readiness and security checklists |
| B — |
Tool and framework selection matrices |
| C — |
Protocols, streaming, and structured outputs |
| D — |
Rate-limiting architecture and cost management |
| E — |
Glossary of AI engineering metrics and terms |
Volume VI — Scaling AI Systems
Architecting low-latency LLM inference for production scale.
Inference at scale, cost modeling, and infrastructure: token generation mechanics, KV cache management, GPU and specialized silicon, quantization and distillation, batching and speculative decoding, disaggregated serving, and the economics of systems that have to answer millions of times a day. The volume to read once your AI system has grown beyond a single server and now needs to behave like a real piece of infrastructure.
|
 |
Series introduction: A chapter-by-chapter walkthrough of LLM Primer VI — Series introduction & index
Part I — Foundations of LLM inference
Part II — The hardware substrate
Part III — Model-level optimization (compression)
Part IV — System- and engine-level optimizations
Part V — Serving frameworks and orchestration
Part VI — Application-level economics and TCO
Appendices (book only)
| A — |
Reference of mathematical formulas and cost modeling |
| B — |
Hardware specifications and accelerators guide |
| C — |
Deployment configurations and code snippets |
| D — |
Benchmarking methodology and metric definitions |
Volume VII — AI Security
Defending LLM systems against prompt injection, jailbreaks, and adversarial threats.
The series finale. Defensive design for systems that have to be treated as security-relevant infrastructure — adversarial risks, prompt injection, RAG poisoning, supply-chain integrity, incident response, access control, governance, bias and fairness, and the discipline of building a secure AI organization. The volume to read when your AI system has to be treated as production infrastructure that adversaries will actively probe.
|
 |
Series introduction: A chapter-by-chapter walkthrough of LLM Primer VII — Series introduction & index
Part I — Foundations of AI security
Part II — Prompt and interaction security
Part III — Model robustness and reliability
Part IV — System-level security architecture
Part V — Governance, ethics, and compliance
Part VI — Advanced topics
Appendices (book only)
| A — |
AI security checklist for production systems |
| B — |
Sample threat model template |
| C — |
Secure prompt design patterns |
| D — |
Incident response template for LLM applications |
| E — |
Recommended tools and frameworks |
Physical AI — a companion volume
Engineering Embodied Intelligence for the Real World. A standalone sister volume by the same author that extends the LLM Primer map into embodied systems: perception, planning, control, safety, and the engineering discipline of putting intelligence into things that move. Where the seven-volume series treats language models as software systems that generate text, Physical AI treats them as one component in a larger stack that also has sensors, actuators, and physical consequences. It stands on its own; you do not have to read the LLM Primer Series first, though the two are designed to complement each other.