Edition 1 · November 2026

AI Systems Engineering

A visual desk reference

LLMs, RAG, agents, and LLMOps. One diagram per page, and only what you need to recall how it works.

  • 42 pages
  • 28 one-page diagrams
  • 2 reference architectures
  • 20 formulas
  • 236-term glossary

PDF · 42 pages · A4 · 1.3 MB

Cover of AI Systems Engineering, a visual desk reference by Raza Jahangir

Build · Evaluate · Deploy · Monitor

Free to share unchanged, with credit to razajahangir.dev. Not for resale.

Inside the book

How today’s transformer models work, how to fine-tune them, and how to build RAG and agent systems on top. It is not a course in the deeper ML maths and science.

  1. The diagram

    One concept, drawn so you can recall how it works at a glance. Read it before the text.

  2. In production

    What changes once real users arrive: the limits, defaults, and failure modes worth knowing.

  3. Web-dev lens

    The idea mapped to something a backend or web developer already knows.

Contents

Each topic opens the PDF at its page, in browsers that support it.

Part 1 · Foundations

  1. How an LLM generates textA decoder-only transformer, one token at a time.3
  2. Attention, up closeEvery token looks at every earlier token and takes a weighted mix.4
  3. Embeddings & vector searchText becomes a point; similar meaning means a nearby point.5
  4. Inference: prefill, decode, KV cacheWhy the first token is slow and the rest are fast.6
  5. How models are trainedFour stages make a model. One simple loop drives all of them.7
  6. Fine-tuning with LoRAChange behaviour by training a small add-on, not the model.8
  7. Choosing a modelFour questions narrow down the options.9

Part 2 · RAG

  1. RAG: ingestionEverything that happens before the first question is asked.10
  2. RAG: retrievalHybrid search, fused, then re-ranked, then handed to the model.11
  3. RAG: patternsFive options. Add complexity only when your evals show a gap.12
  4. RAG: evaluationTest the retriever and the generator separately.13

Part 3 · Agents

  1. The ReAct agent loopThink, act, observe. Repeat until done.14
  2. LangGraph in one pageAn agent is a graph: state flows through nodes along edges.15
  3. Workflows vs agentsFive patterns. Most production work is a workflow.16
  4. Subagents, handoffs, skills, routerThe four multi-agent building blocks.17
  5. How agents act and planFour ways an agent turns a decision into action.18
  6. Memory & MCPWhat an agent remembers, and how it reaches the outside world.19
  7. Context engineeringDecide what the model sees at each step. Nothing else reaches it.20

Part 4 · LLMOps

  1. The LLMOps lifecycleBuild, evaluate, deploy, monitor. Then loop.21
  2. Structured outputGet data your code can trust, not text you have to parse.22
  3. Tracing & evalsSee what happened. Prove it still works.23
  4. Guardrails & privacyCheck what goes in. Check what comes out.24
  5. Cost & latencyTwo formulas explain almost every bill and every wait.25

Part 5 · Decide & design

  1. Decision treesThree yes/no questions that settle most design arguments.26
  2. Numbers to knowTypical values, so you can tell normal from broken at a glance.27
  3. Anti-patternsCommon mistakes, and what to do instead.28
  4. Reference: enterprise RAG chatbotEvery piece from Parts 2 and 4, wired into one system.29
  5. Reference: private AI stackA self-hosted setup where sensitive data never leaves the network.30

Reference

  1. Formula cheat sheetTwenty formulas that cover most of this book.31
  2. Glossary A–Z236 terms, linked to related terms and their diagrams.32

Download the full PDF