← Back to the course home

📐 The 13 lessons as diagrams

Part 1: inside the model (purple, 1–7) · Part 2: using it (teal, 8–12). Follow the circled numbers 1 → 2 → 3.

1 📖 What is AI

Rulebooks vs learning from examples — the rules are grown, not written.

📜 the rulebook wayif ears AND whiskers AND tail…rule #41 breaks on cartoon cats 💥🐱 the examples way10,000 photos: cat / not-cat✏️ trainingrules GROW inside🧠 modelanswers even for NEW cats12AI ⊃ machine learning ⊃ deep learning ⊃ LLMs — this course walks inward3

Read full lesson 01 →

2 ✏️ Training

Practice tests + the red pen — loss and tiny downhill nudges.

📚 examplesquestion + true answer🧠 modelmillions of dials✍️ prediction🔴 lossHOW wrong?1⛰️ gradient descent: nudge EVERY dial slightly downhill2repeat millions of times🧪 validation set = unseen questions — catches memorizers (overfitting)3

Read full lesson 02 →

3 🧩 Tokens

Cutting text into puzzle pieces — why 'strawberry' is hard.

📝 text'the robot reads'🧩 tokenizer - BPEglue the most frequent pair,repeat thousands of times🔢 token IDs[464, 9379, 9743]12the model sees ONLY these pieces — never words, never letters:why 'how many R's in strawberry' is hard 🍓 · why pricing is per-token · why some languages cost 3×3

Read full lesson 03 →

4 🗺️ Embeddings

The seating chart of meanings — similar words sit together.

🧩 token 'cat'🗺️ its seat coordinates[0.31, -1.2, 0.88, …] ×768learned, not drawnthe seating hall - meaning spacecat 🐱kittendog 🐶📎 stapler - far12distance = similarity →semantic search, RAG (L10), king−man+woman≈queen 👑3

Read full lesson 04 →

5 🎲 Next-token prediction

The sentence-completion game, with a temperature dial.

📝 pieces so far'The dog chased the'📊 scoreboard over ALL piecescat 24% · ball 17% · car 9%… stapler 0.0001%one full scoreboard per step🎛️ temperature0: safe · 1: natural2: chaos12🧩 picked: 'cat' — glue on3repeat — that's whyanswers STREAM

Read full lesson 05 →

6 👀 Attention

Kids glancing around the class — who does 'it' refer to?

'The robot dropped the ball because IT was heavy'👀 'it' glances aroundlearned weights:robot 65% · heavy 14% · ball 5%🎨 blend'it' comes outROBOT-flavored 🤖🏗️ transformerthis, ×many heads,×32 layers, ALL tokensin parallel123query·key similarity on the seats (L04) → softmax → weighted blend — demo prints these exact numbers

Read full lesson 06 →

7 ⭐ RLHF & LoRA

Library, etiquette class, gold stars — and sticky notes.

📚 pretrainingread EVERYTHINGmonths · $$$M · once🎓 fine-tuningQ→A examples:learn to ANSWER⭐ RLHFhumans pick better →taste-judge → nudge🤖theassistant123🗒️ LoRA: freeze the brain, learn tiny sticky notes~0.1% of the size · one GPU · swappable per customer4

Read full lesson 07 →

8 🗣️ Prompting & context

How you ask the librarian — and the small desk it fits on.

🪑 the desk - context window: N tokens, that's ALL there is📜 role + rules (system)💬 conversation - oldest slides off📎 pasted docs + examples✍️ the answer itself - also here!🗣️ the craftsay who to be · exact ask ·show examples (few-shot) ·'think step by step first'1🕳️ not on the desk = doesn't exist:no memory between chats · middle gets skimmed2same model, 10× better output — prompting is iteration, not incantation3

Read full lesson 08 →

9 🙋 Hallucinations

The confident kid who never says 'I don't know'.

❓ thin-shelf question'books about Mongolianpirates?'🧠 the machineproduce the LIKELIEST continuationtruth was never in the loss (L02)🙋 fluent · confident · WRONGrealistic fake title,fake author, page count12📖 defense 1: facts ON the desk(paste them — or RAG, L10)🧾 defense 2: 'quote the exactsentence you base this on'🤷 defense 3: 'if unsure, say so'+ verify anything you'd act on3

Read full lesson 09 →

10 📖 RAG

The open-book exam, automated with the seating chart.

1 before exam season - once📚 handbook→ ✂️ chunks🗺️ vector DBseat per chunk❓ questionembedded too📍 nearest seats= most relevant chunks🪑 the deskquestion + those chunks +'answer ONLY from these, cite' 🧾234facts → RAG · style → fine-tune (L07) — the rule of rules

Read full lesson 10 →

11 📋 Agents & tools

A student with a to-do list and a hall pass.

📋 goal'organize theclass picnic'🧠 THINKnext-token planningin words (L05!)🧰 ACTwrites a tool call:roster.count()👀 LOOKresult → desk:23 kids123loop until the goal is met🚧 guardrails: read-only tools by default · spending caps · human sign-off for field-trip forms · logs of every step4

Read full lesson 11 →

12 📺 Diffusion & multimodal

Un-blurring TV static, step by step, toward your words.

🎨 homework, millions of times🐱 photo+noise ×1000📺 staticlearn: predictthe noise📺 purestatic🌀 un-noise ×20-50 stepsprompt's meaning-seat (L04) steers each step🐱👑 'cat witha crown'12👀 multimodal:images/audiobecome tokens too —same desk, sameattention (L03/L06)3

Read full lesson 12 →

13 🔌 Bonus: MCP

The universal plug — deep-dive course: learn-mcp-school 🔌

🍝 before MCPevery app × every tool =a hand-built adapter (N×M)🏫 hosts - the roomsClaude Desktop · IDE ·your agent — standard sockets 🔌🔬 MCP serversfiles · GitHub · your DB —standard plugs12each server announces: my TOOLS 🧰 · my RESOURCES 📁 · my PROMPTS 📜discover (tools/list) → call (tools/call) → result lands on the desk — L11's loop, standardized3🚧 a server runs with YOUR permissions — installing one = installing software; L11 guardrails apply double4

Read full lesson 13 →