Back matter
Appendix, Glossary & Acknowledgements
The reference shelf — a glossary, an appendix, and thanks.
Glossary
Plain, working definitions for the terms this book leans on. Where a term has a whole chapter behind it, the chapter is noted.
Token — the unit a model reads and writes; a chunk of text (or image or audio) roughly a few characters long. You are billed per token, in and out (Ch 5).
Context window — the maximum number of tokens a model can consider at once. The effective context — how much it can actually use well — is usually smaller than the advertised number (Ch 5).
Inference — running a trained model to get an output. The whole cost-and-latency game of serving AI is inference, not training (Ch 5).
Embedding — a numeric representation of meaning, so that similar things sit close together in vector space. The basis of semantic retrieval (Ch 7).
Vector store — a database that indexes embeddings for similarity search; a production decision, not a default (Ch 7).
RAG (retrieval-augmented generation) — fetching relevant information at query time and feeding it to the model as context, instead of relying on the model’s baked-in knowledge (Ch 7).
Chunking / reranking / hybrid search — the mechanics of good retrieval: splitting documents sensibly, re-scoring candidates for relevance, and combining keyword with semantic search (Ch 7).
Prompt / system prompt — the instructions given to a model; the system prompt sets standing behavior. A prompt is code, and a prompt change is a deployment (Ch 6, Ch 8).
Context engineering — deliberately assembling what goes into the context window (instructions, examples, retrieved data) for a given task (Ch 6).
Structured output — forcing a model to return machine-readable data (e.g., a fixed schema) your code can act on (Ch 6).
Tool use — letting a model call functions or services to fetch data or take actions, often via an open protocol (Ch 6).
MCP (Model Context Protocol) — an open standard for connecting models to tools and data sources without bespoke glue (Ch 3, Ch 6).
Agent vs. workflow — a workflow runs predetermined steps; an agent decides its own steps at runtime. Start with workflows; earn agents (Ch 6).
Orchestration / durable execution — coordinating multi-step processes and surviving crashes mid-run (state, retries, recovery). Agents are long-running distributed systems (Ch 8).
Gateway — an abstraction layer in front of model providers that lets you route, swap, pin, and fall back without rewriting the application. Your main defense against lock-in (Ch 3).
Fine-tuning — adapting the model’s own weights to your task. Good for form (tone, schema, vocabulary), bad for facts (use RAG). Usually not the first move (Ch 7).
LoRA / QLoRA — parameter-efficient fine-tuning: train a small adapter on a frozen base model rather than retraining everything (Ch 7).
Distillation — training a smaller, cheaper model to mimic a larger one on a task (Ch 7, Ch 10).
Quantization — compressing a model’s weights to lower precision to cut memory and cost, usually with modest quality loss (Ch 4, Ch 5).
Reasoning model / reasoning tax — models that “think” before answering, spending extra tokens (and cost and latency) for better results on hard tasks. Worth it sometimes, not always (Ch 5).
Multimodal — models that take images, audio, or video as well as text; everything still becomes tokens, and images are token-hungry (Ch 5).
Hallucination — a confident, fluent, wrong output. The failure mode that looks like success (Ch 1, Ch 9).
Non-determinism — the same input can produce different outputs. The one genuinely new engineering muscle; you can’t make it predictable, but you can make it observable and bounded (Ch 1, Ch 8, Ch 9).
Guardrail — a runtime check that inspects inputs or outputs and blocks, rewrites, or escalates the risky ones (Ch 9, Ch 11).
Evaluation / LLM-as-judge / golden dataset — measuring output quality; often using a model to score another model’s output against a rubric; the golden dataset is your standing set of known-good cases (Ch 9).
Observability / trace — instrumenting a request so you can see the whole path (prompt, retrieval, tools) as a tree of spans, with quality scored on it (Ch 9).
Drift / prompt drift — silent quality decay, often because a provider updated the base model underneath your unchanged prompt (Ch 8, Ch 9).
LLMOps — the discipline of deploying and operating LLM applications: prompts as deployments, evals as gates, the whole response path as the versioned artifact (Ch 8).
FinOps / TokenOps — treating AI cost as an engineering metric: visibility, attribution, and value per token, owned by the team that writes the code (Ch 10).
Least privilege / blast radius — giving a system only the access its task requires, so that when something goes wrong, the damage is contained (Ch 8, Ch 11).
Prompt injection — an attack that hides instructions in input (directly, or indirectly via retrieved content) that the model then obeys. A design property you can’t patch, only contain (Ch 11).
Jagged frontier — the finding that AI helps on some tasks and hurts on others of similar difficulty, unpredictably; you map a workflow against it task by task (Ch 2).
Co-invention — the complementary redesign of workflows, processes, and skills around a new technology, which is where its value actually comes from. The thing the 5% do (Ch 2).
General-purpose technology — the economists’ category for technologies like electricity and the internet that end up embedded in everything. AI’s destination, and why the chatbot is a trap (Ch 2).
Edge inference — running models close to users and data rather than in a central cloud, to cut latency, egress, and residency exposure (Ch 10).
Appendix — Staying Current
This book taught the layer beneath the tools on purpose, because that layer is durable. But the surface moves monthly — new models, new prices, new features — and you’ll need a way to stay current without drowning in it. A few habits keep the map fresh:
Follow primary sources, not the hype cycle. The labs’ own documentation, the standards bodies (OWASP, NIST), the research institutions (Stanford HAI’s AI Index, MIT, Harvard), and independent benchmarks tell you more than aggregators and vendor leaderboards. A small rotation of trustworthy sources beats a firehose of takes.
Track the layer, not the release. When a new model lands, don’t just read the benchmark score. Ask the structural questions this book taught you: what changed in the cost curve, the effective context, the modalities, the reasoning behavior, the tool support? Those tell you whether anything in your architecture should change.
Keep your own evals. Your golden dataset is your private source of truth. When a model updates or a price shifts, re-run it. Your evals will tell you whether a shiny new release is actually better for you, which no leaderboard can.
Verify the fast-moving facts. Prices, model names, context limits, and regulatory dates (the EU AI Act timeline especially) change in weeks. Treat any specific number in this book as current-as-of-writing and check it before you rely on it.
Live pointers to current sources, benchmarks, and the regulatory status are kept at leapfrog.lerias.org, alongside the hands-on labs.
Standing on Shoulders
This book is a map, and the territory was charted by others. Almost every idea in it belongs to someone smarter than me, and this page is where I say so plainly.
The framing of where AI belongs rests on the “jagged frontier” work of Fabrizio Dell’Acqua, Karim Lakhani, Ethan Mollick, Katherine Kellogg, and their colleagues across Harvard Business School, MIT Sloan, Wharton, and BCG — and on Erik Brynjolfsson and the Stanford Digital Economy Lab, whose work on general-purpose technologies, the productivity J-curve, and enterprise co-invention runs underneath Chapters 1 and 2. Andrew Ng’s “AI is the new electricity” gave the whole thing its shortest expression. Stanford HAI’s AI Index and MIT’s work on the enterprise “GenAI divide” supplied the numbers that anchor the argument.
The build and operate chapters stand on the open-source and open-standards communities: the people behind the Model Context Protocol and OpenTelemetry, and behind the serving, retrieval, and observability tools that made all of this reachable by ordinary teams. The security and governance chapters lean on OWASP’s LLM and Agentic Top 10 projects, NIST’s AI Risk Management Framework, MITRE’s ATLAS, the authors of ISO/IEC 42001, and the drafters of the EU AI Act. And throughout, the specific studies cited in each chapter’s references — on retrieval, on context limits, on evaluation, on cost — did the real intellectual work.
To all of them: thank you. The credit here is yours. Any mistakes are mine alone. This book only tried to arrange your work into a path a busy engineer could walk.
— Hugo Lerias