Frontend Labs
⋯
🤖

AI from Zero to LLMs — A Beginner's Guide (v1)

You do not need to know anything about AI, machine learning, or advanced maths to read this. You need to be able to read code loosely and be willing to run a few commands. Everything else is explained when it first appears.

89 chapters · 7 h 17 min of reading


Contents

89 chapters, one page each. Prefer one long page? Read the whole book on one page.

  1. What you will be able to do at the end1 min
  2. Contents5 min
  3. Part 0 — Start here: how to use this guide
  4. 0.1 Who this guide is for1 min
  5. 0.2 The learning flow (use this for every chapter)2 min
  6. 0.3 The roadmap2 min
  7. 0.4 Set up your computer (do this now, ~20 minutes)2 min
  8. 0.5 The tiny bit of maths you actually need2 min
  9. 0.6 How to not get stuck1 min
  10. Part 1 — What is AI, really?
  11. Chapter 1 — Programs vs models: the one idea that starts everything5 min
  12. Chapter 2 — What "data", "features", and "learning" mean here4 min
  13. Chapter 3 — The family tree: AI, ML, deep learning, LLMs4 min
  14. Chapter 4 — Our running example: the Help Desk problem2 min
  15. Part 2 — Era 1: Rules (1950s–1980s)
  16. Chapter 5 — Teaching a computer with IF-THEN rules4 min
  17. Chapter 6 — Building a rule system (a real historical example)2 min
  18. Chapter 7 — Why rules broke down (the five walls)2 min
  19. Part 3 — Era 2: Learning from examples (1990s–2000s)
  20. Chapter 8 — The big switch: from rules to examples1 min
  21. Chapter 9 — Your first model: is this email spam?4 min
  22. Chapter 10 — How a model learns: loss and gradient descent4 min
  23. Chapter 11 — Turning words into numbers: bag-of-words and TF-IDF3 min
  24. Chapter 12 — Predicting the next word by counting (n-grams)6 min
  25. Chapter 13 — How do you know if a model is any good?4 min
  26. Part 4 — Era 3: Neural networks (2010s)
  27. Chapter 14 — What a neural network actually is6 min
  28. Chapter 15 — How neural networks learn: backpropagation, gently5 min
  29. Chapter 16 — Why "deep" matters2 min
  30. Chapter 17 — Networks that read sequences (RNNs) and why they struggled4 min
  31. Part 5 — Teaching machines what words mean
  32. Chapter 18 — The problem with treating words as symbols2 min
  33. Chapter 19 — word2vec: meaning from company6 min
  34. Chapter 20 — GloVe, FastText, and the family2 min
  35. Chapter 21 — The limit of static vectors, and what came next3 min
  36. Part 6 — The Transformer
  37. Chapter 22 — The problem: reading a sentence all at once2 min
  38. Chapter 23 — Attention explained with a highlighter2 min
  39. Chapter 24 — Self-attention, step by step with real numbers5 min
  40. Chapter 25 — Multiple heads, position, and the full block4 min
  41. Chapter 26 — Hands-on: a tiny Transformer you can run4 min
  42. Part 7 — Tokens
  43. Chapter 27 — Computers don't see words2 min
  44. Chapter 28 — How BPE builds a vocabulary (by hand)5 min
  45. Chapter 29 — Tokens in practice: cost, context, and fairness3 min
  46. Chapter 30 — Special tokens and chat templates2 min
  47. Part 8 — What an LLM actually is
  48. Chapter 31 — An LLM is a next-token guesser (that's genuinely it)3 min
  49. Chapter 32 — Walking through one prediction, end to end3 min
  50. Chapter 33 — How an LLM is trained (pretraining)4 min
  51. Chapter 34 — Making it an assistant (SFT and RLHF/DPO)5 min
  52. Chapter 35 — Why LLMs make things up4 min
  53. Part 9 — How an LLM answers you (inference)
  54. Chapter 36 — From your question to the first word2 min
  55. Chapter 37 — Choosing the next word: temperature, top-p, and friends4 min
  56. Chapter 38 — The memory trick that makes it fast (the KV cache)3 min
  57. Chapter 39 — What it costs, and how to think about it3 min
  58. Part 10 — Build your own LLM
  59. Chapter 40 — What you can realistically build1 min
  60. Chapter 41 — Project 1: train a language model from scratch6 min
  61. Chapter 42 — Project 2: fine-tune a real model with LoRA4 min
  62. Chapter 43 — Teaching preferences (a taste of DPO)2 min
  63. Part 11 — Making LLMs useful
  64. Chapter 44 — Prompting that actually works4 min
  65. Chapter 45 — The context window: your working-memory budget2 min
  66. Chapter 46 — Saving tokens and money2 min
  67. Chapter 47 — Project 3: give the model your own documents (RAG)5 min
  68. Chapter 48 — Tools, structured output, and agents3 min
  69. Chapter 49 — Testing your LLM app4 min
  70. Part 12 — Agents: LLMs that do things
  71. Chapter 50 — What "agentic" actually means (and when you don't need it)4 min
  72. Chapter 51 — The agent loop, spelled out5 min
  73. Chapter 52 — Tools: giving the model hands4 min
  74. Chapter 53 — Memory: how an agent remembers3 min
  75. Chapter 54 — Multi-agent systems and orchestration3 min
  76. Chapter 55 — Why agents fail, and how to tell3 min
  77. Part 13 — MCP: the universal adapter
  78. Chapter 56 — Why MCP exists (the N×M problem)3 min
  79. Chapter 57 — How MCP works: hosts, clients, servers, and primitives4 min
  80. Chapter 58 — Hands-on: build an MCP server and connect it5 min
  81. Part 14 — Guardrails: making it safe
  82. Chapter 59 — Why AI security is different4 min
  83. Chapter 60 — Guardrails: the layered defence5 min
  84. Chapter 61 — Securing prompts, context, and tools6 min
  85. Part 15 — Project 4: a real agent, end to end
  86. Chapter 62 — Build a support agent that can actually do things9 min
  87. Part 16 — Where to go next
  88. Chapter 63 — What you know now, and the honest gaps1 min
  89. Chapter 64 — A six-month plan after this guide1 min
  90. Chapter 65 — Project ideas by level1 min
  91. Part 17 — Model compression: distillation & small models
  92. Chapter 66 — What model weights actually are5 min
  93. Chapter 67 — Knowledge distillation: teaching a small model to imitate a big one6 min
  94. Chapter 68 — Project 5: distill a tiny model and run it in the browser (Bengaluru, next 30 days)12 min
  95. Part 18 — Agent frameworks & AI governance
  96. Chapter 69 — Agent frameworks: LangGraph, CrewAI, and the SDKs7 min
  97. Chapter 70 — AI governance and compliance6 min
  98. Part 19 — Under the hood: optimizers, efficient attention, and quantization
  99. Chapter 71 — How AdamW actually works6 min
  100. Chapter 72 — GQA: shrinking the KV cache without losing (much) quality5 min
  101. Chapter 73 — Quantization: from float32 to int4, the actual algorithm7 min
  102. Part 20 — Agents in the real world: harnesses, loops, and production
  103. Chapter 74 — The harness: everything around the loop15 min
  104. Chapter 75 — Loops that run for hours: long-horizon agents12 min
  105. Chapter 76 — Evaluating agents: "works once" vs "works every time"8 min
  106. Chapter 77 — Deploying agents to production12 min
  107. Chapter 78 — Agent interop: AGENTS.md, Skills, MCP, and A2A8 min
  108. Chapter 79 — Project 6: an overnight agent that opens real pull requests8 min
  109. Part 21 — Beyond next-token prediction: decision models and world models
  110. Chapter 80 — System One models: Jev and "LLM writes, model decides, code acts"14 min
  111. Chapter 81 — JEPA and world models: predicting meaning, not tokens11 min
  112. Appendix A — Glossary (plain language)
  113. Appendix B — Math corner (only what you need)
  114. Appendix C — Setup and troubleshooting
  115. Appendix D — Cheat sheets
  116. Appendix E — Master reading list
  117. Appendix F — Answers to "Check yourself"

Generated from real-life-ai-example-v1.md · 8 Oct 2026 16:36