Understand How Claude Works: Stanford's 2-Hour LLM Lecture in Plain English
Stanford's full lecture on how large language models are built, broken down for zero tech background, plus 3 Claude prompts that turn it into sharper thinking.
You use Claude every day, but you've got no idea what happens when you hit send. That's fine until it gives you a confident answer that's wrong. Then you either believe it or stop trusting it. Both cost you.
Stanford put a free lecture on YouTube that explains how models like Claude get built. I reckon it's one of the best explanations out there. It's also nearly 2 hours of a Stanford PhD student talking about probability. Not exactly a lunch-break watch.
So I've broken the whole thing down in plain English. No maths, no jargon. Only what matters, and what it changes for you.
What's inside:
What's inside
- The whole lecture in 8 plain-English parts, with timestamps so you can skip around
- 5 things that change how you use Claude once you know how it's built
- A tutor prompt that makes Claude teach you the lecture properly, plus 2 bonus prompts for fact-checking and better decisions
I'm not a developer and I don't have a tech background. I've used Claude every day for over 2 years, and understanding this stuff changed how I prompt it.
How a model like Claude gets built
Everything here comes from Stanford CS229 | Machine Learning | Building Large Language Models (LLMs), a guest lecture by Yann Dubois (then a Stanford computer science PhD student) in Stanford's CS229 Machine Learning course, Summer 2024. Stanford Online posted it free on YouTube on 27 August 2024, and all credit for the ideas goes to him and Stanford. The plain-English version, and any mistakes in it, are mine. This guide isn't affiliated with or endorsed by Stanford University.
The short version: models like Claude get built in 2 stages. Stage 1: it reads a huge chunk of the internet and learns one skill. Guessing the next word. Stage 2: people teach it to behave like an assistant. First by showing it a few thousand examples of great answers. Then, mostly, by showing a person 2 of its answers and asking which one is better. That's the whole process. The interesting part is where the effort goes. Researchers love tweaking how the model is designed. Dubois argues that what actually separates the best models is less glamorous: better data, better testing and better use of the computers they run on. One heads-up. The lecture explains how this kind of model gets built in general. Anthropic keeps Claude's exact process private, and the dollar and size figures are 2024 numbers that have grown since.
Part 1: Guessing the next word (from 0:00)
Stage 1 (the lecture calls it pretraining) has one job. Read some text, guess what comes next.
Dubois uses the sentence "the mouse ate the cheese". A good model knows that's likely. It knows a sentence with a doubled word is bad grammar, and that the cheese eating the mouse doesn't make sense. Nobody teaches it grammar or how the world works. It picks both up by guessing, billions of times. This is what happens every time Claude replies to you. It guesses the next bit, adds it, then guesses again. Your whole answer gets built one piece at a time. Those pieces are called tokens (from 8:48). They aren't whole words or single letters. They're chunks of about 3 to 4 letters, so typos and rare words still get recognised. The catch is that numbers get split up in odd ways too, so Claude doesn't see digits the way you do. That's a big reason it can stumble on maths or counting letters.
Part 2: Testing it (from 16:00)
How do you score something that's only ever guessed words? Early on, by measuring how unsure the model is about the next word. In 2017, a good model was torn between about 70 possible next words. By 2023, it was under 10.
These days researchers mostly use exams. The best-known one (MMLU, if you want to look it up) is multiple-choice questions across subjects like medicine, physics and astronomy. Dubois points out 2 problems. The same model can score differently depending on how the exam is run. And the exam questions are floating around online, so a model may have already seen the answers during Stage 1. What that means for you: a model topping a leaderboard tells you less than you'd think. The test that matters is how Claude handles your actual work.
Part 3: Cleaning up the internet (from about 29:00)
"Train it on the internet" sounds easy. It isn't. The starting point is a public copy of the web, around 250 billion pages, and most of it is rubbish. Dubois walks through the clean-up:
Pull the actual text out of each page Remove harmful content, adult content and people's personal details Remove duplicates, like the same website footer repeated a million times Drop pages that look broken or spammy Keep more of the pages that look like the ones Wikipedia links to Rebalance the mix: more code and books, less entertainment Save the highest-quality material for the end of training The biggest models of 2024 trained on around 15 trillion tokens. This data is what companies guard most closely, partly because of competition and partly because of copyright. It's also where a huge share of the real work happens.
Part 4: Bigger is predictably better (from about 40:00)
This is the big idea in the lecture. More data plus a bigger model gives you a better model, and the improvement is predictable. So predictable that teams test ideas on small models first, then forecast how the big one will turn out before they spend the money.
There's even a rough formula. One well-known study found the sweet spot is about 20 tokens of training text for every adjustable setting inside the model. Once you factor in the cost of running it for millions of people, teams push that closer to 150. Dubois also borrows from a famous essay called The Bitter Lesson. The short version: clever design tweaks matter far less than more data and more computing power. Then he works out what it costs (from about 55:00), using one of 2024's biggest open models. Roughly 26 million hours of specialist chip time over about 70 days. Around US$75 million all in, including the team's salaries. About 4,000 tonnes of carbon, which he compares to roughly 2,000 return flights from New York to London. It was even sized to land below the point where the US government at the time required extra scrutiny. Not exactly a side project.
Part 5: Teaching it to be an assistant (from about 1:00:00)
After Stage 1, the model knows a lot but has no idea how to help you. Ask a raw model to explain the moon landing to a 6-year-old and it might reply with a list of similar questions. Online, questions tend to sit next to more questions, so that's what it learned to do.
The first fix (the lecture calls it supervised fine-tuning) is to show it examples of great answers written by people and train it to copy them. The surprise is how few it needs. A few thousand good examples does most of the work, and one study he shows found that going from about 2,000 examples to 32,000 barely helped. This step teaches it how to answer. The knowledge was already there from Stage 1. There's a catch. People are better at judging a great answer than writing one. And if someone writes an example answer that includes a fact the model never learned, the model learns to produce confident-sounding facts it doesn't actually know. That's one of the roots of the made-up answers you've probably seen.
Part 6: Picking the better answer (from about 1:10:00)
The second fix is the one you'll see written as RLHF everywhere. The model writes 2 answers to the same question. A person reads both and picks the better one. The model learns to produce more answers like the winners.
The original method for this is famously messy. A newer, simpler version does the obvious thing: make winning answers more likely and losing answers less likely. You can skip the 10 or so minutes of equations here. Nothing you need is in them. The people doing the judging aren't perfect either: They prefer longer answers, even when the shorter one is better They're inconsistent. On a simple A-or-B choice, human judges only give a consistent answer about 66% of the time It's slow and expensive, and it raises real ethical questions about the low-paid workers doing it So now a lot of the judging is done by AI. It's far cheaper and agrees with the human majority surprisingly well. It also prefers longer answers.
Part 7: Testing the finished assistant (from about 1:29:00)
Once the model is trained to please people, the old guess-the-next-word score stops being useful. And there's no answer key for "help me plan my week". The field uses 2 workarounds:
Blind comparisons at scale. Real people ask 2 anonymous models the same question and vote for the better reply (Chatbot Arena is the famous one). Reliable, but slow, and skewed towards the kinds of questions tech people ask. An AI judge. Dubois's own team built one (AlpacaEval) whose rankings line up with the human votes at a 98% correlation, in minutes and for a fraction of the cost. The catch is that same preference for longer answers, which they had to correct for.
Part 8: The hardware (from about 1:33:00)
The last section is about the computers. The specialist chips that train these models are incredibly fast at maths but slow at moving data around, so a lot of time gets wasted waiting. Two fixes: use less precise numbers, which speeds things up with almost no drop in quality, and combine several steps into one so the data moves less.
Not into hardware? Skip this section. Nothing in it changes how you use Claude.
5 things this changes about how you use Claude
5 things this changes about how you use Claude
- Confident doesn't mean correct. Claude was trained on what people preferred, and some example answers included facts it never learned. A confident tone tells you nothing about accuracy. When an answer matters, run Bonus prompt 1.
- It only knows what it was trained on. Recent events, niche topics and anything about your life weren't in there. Give it the source: paste the document, the policy or the numbers.
- Tell it how long you want the answer. People rewarded longer answers during training, so long is the default. "3 dot points" or "under 100 words" gets you a tighter answer, not a worse one.
- Double-check maths and counting. Numbers and letters get split into chunks, so they're a weak spot. For anything involving money, ask Claude to show every step, then check the final number yourself.
- Judging is your edge. Stage 2 is built on one fact: people are better at judging answers than writing them from scratch. Use that. You set the direction and bring what only you know, Claude lays out the options, and you make the call. Bonus prompt 2 is built for exactly this.
The tutor prompt
This turns the lecture into a proper lesson. Claude teaches it part by part, makes you explain it back, and won't let you coast.
I want to genuinely understand a Stanford lecture, not collect a summary I'll forget by Friday. It's "Building Large Language Models" by Yann Dubois, from Stanford's CS229 Machine Learning course. I have no technical background. About me: [your job, and 1 or 2 things you use Claude for] The full transcript is pasted at the bottom. Be my tutor and follow these rules: 1. Split the lecture into its natural parts (aim for 6 to 8). List each with a one-line plain-English description and its rough timestamp. Then stop and wait for me to say "go". 2. Teach one part at a time, in under 200 words. Use everyday examples, ideally from my world. If you use a technical term, put its plain-English meaning straight after it. 3. After each part, ask me to explain it back in my own words. Don't explain it for me first. 4. Read my explanation. Tell me what I got right, then the single most important thing I've got wrong or fuzzy, and fix it in 2 sentences. Wait for me to say "next" before moving on. 5. Every 2 parts, ask me one question that connects what I've learned to how I use Claude day to day. 6. Treat the transcript as your source of truth. Auto-captions mishear technical words, so if a passage looks garbled, say so rather than guessing. If I ask about something the lecture doesn't cover, tell me it's outside the lecture before you answer. 7. When we finish, ask me to write my own 5-sentence summary of the whole lecture. Mark it up: what's accurate, what's missing, and the one idea worth remembering in 6 months. Start with step 1. TRANSCRIPT: [paste the full transcript here]
How to use it
- 1Open the original lecture on a computer. Click "...more" under the video to expand the description, scroll down and click "Show transcript".
- 2Click and drag from the first line of the transcript to the last, copy it, and paste it into the prompt where it says [paste the full transcript here]. Fill in the About me line too. About 2 minutes.
- 3Paste the whole prompt into a new Claude chat and send. Claude maps out the lecture, then waits for you.
- 4Work through 2 or 3 parts per sitting (about 15 minutes), then come back to the same chat tomorrow. Explaining each part back in your own words is where it actually sticks, so don't skip that bit.
Bonus: Bonus prompt 1: Fact-check before you act
Paste this under any answer you're about to rely on. Claude's sense of its own confidence isn't perfect either, so treat the result as a list of what to check, not a guarantee.
Before I act on your last answer, audit it for me. Sort every factual claim in it into 3 groups: 1. Solid: well established, the kind of thing you'd find stated the same way across many reliable sources. 2. Shaky: things you may have filled in because they fit the pattern, not because you know them. 3. Check before acting: any specific number, date, price, name, rule or law, anything that may have changed recently, and anything where being wrong would cost me money, time or trust. For every item in group 3, tell me exactly what to search for or who to ask to confirm it, one line each. Then name the one assumption your answer depends on most. If that assumption is wrong for my situation, what changes? Be blunt. I'd rather see the gaps now than find them later.
Bonus: Bonus prompt 2: 3 options, you decide
For any decision or plan you're working through. Claude lays out the options, you make the call, then it pressure-tests your reasoning.
I'm working through this: [describe the decision, plan or problem in a few sentences] What matters most to me here: [your priorities, in your words] What I can't change: [time, budget, people, anything fixed] Put 3 genuinely different approaches on the table. Different strategies, not the same idea reworded. For each one give me: - the core idea in one sentence - what it's best at - what it costs me (time, money, energy or risk) - the situation where it's the wrong choice Don't recommend one. I'm choosing. Once I tell you my pick and why, ask me 2 hard questions that test whether I'm choosing it for a good reason or a comfortable one. Then stop. The call stays mine.
Make it yours: Swap the transcript for any lecture, webinar or podcast that has one. Same prompt, same 15-minute sittings, and you'll remember far more than you would from a summary.
Do this today: open the lecture, grab the transcript and run the tutor prompt on the first part. 15 minutes. By the end, you'll understand what Claude is actually doing every time it replies to you.
You don't need to know how to build one of these. You need to know enough to push back on what it tells you. That's the whole skill.
Ready to go deeper?
Build your own AI assistant in one afternoon.
A step-by-step guide to building a custom AI assistant that actually fits your life and work — no coding, no overwhelm, just a system you can use from day one.
Get the guide — $47Daily Stack
The tools behind the work.
The tools that have earned a permanent spot in my workflow.
Claude
Anthropic's flagship product and the tool that almost every resource on this site is designed for.
ManyChat
The easiest way to build automated Instagram DM flows, comment replies and lead capture without coding.
Planoly
My go-to for planning, scheduling and visually mapping out social content across platforms.