What a Language Model Does
What is actually happening when you type a message to an AI? This is Liam, in for Bear. This is part one of chapter one, and the answer is smaller and stranger than most people expect. One prediction. Run in a loop. Everything else is scaffolding around it.
What a Language Model Does
What is actually happening when you type a message to an AI? This is Liam, in for Bear. This is part one of chapter one, and the answer is smaller and stranger than most people expect. One prediction. Run in a loop. Everything else is scaffolding around it.
Topic: INFO 7375 PROMPT ENGINEERING · CHAPTER 1, PART 1
Chapters
0:00 Introduction 0:30 Course Credit 0:38 Act I: The Unfinished Script 0:40 Act I: The Unfinished Script 1:26 Act Ii: One Question, Asked Over And Over 1:29 Act Ii: One Question, Asked Over And Over 2:17 Act Iii: The Transcript Is The Whole Trick 2:20 Act Iii: The Transcript Is The Whole Trick 3:12 Act Iv: Where The Numbers Come From 3:15 Act Iv: Where The Numbers Come From 4:21 Act V: Scale, In Units You Can Check 4:24 Act V: Scale, In Units You Can Check 5:17 Act Vi: Inside One Prediction Step 5:20 Act Vi: Inside One Prediction Step 6:19 Act Vii: Stochastic Parrots 6:22 Act Vii: Stochastic Parrots 7:30 Verdict 7:50 Your Turn
YOUR TURN
Your turn. Open a fresh conversation and paste this. Then open three more and paste the same thing. You are not testing whether it knows the answer. You are watching how much of the reply moves when nothing about your input changed — and asking which part of the machine that variation is coming from.
@NikBearBrown
Sources and citations: see the reel's SOURCES.md in the open textbook.
▶ The full series playlist — Brutalist https://www.youtube.com/playlist?list=PLG9H-C6rp5RU
What this video covers
- 0:00 — Introduction
- 0:30 — Course Credit
- 0:38 — Act I: The Unfinished Script
- 0:40 — Act I: The Unfinished Script
- 1:26 — Act Ii: One Question, Asked Over And Over
- 1:29 — Act Ii: One Question, Asked Over And Over
- 2:17 — Act Iii: The Transcript Is The Whole Trick
- 2:20 — Act Iii: The Transcript Is The Whole Trick
- 3:12 — Act Iv: Where The Numbers Come From
- 3:15 — Act Iv: Where The Numbers Come From
- 4:21 — Act V: Scale, In Units You Can Check
- 4:24 — Act V: Scale, In Units You Can Check
- 5:17 — Act Vi: Inside One Prediction Step
- 5:20 — Act Vi: Inside One Prediction Step
- 6:19 — Act Vii: Stochastic Parrots
- 6:22 — Act Vii: Stochastic Parrots
- 7:30 — Verdict
- 7:50 — Your Turn
Transcript
A lightly formatted transcript of the video, with timestamps so you can jump to any section on YouTube.
Introduction
[0:00] What is actually happening when you type a message to an AI? This is Liam in for Bear. This is part one of chapter one and the answer is smaller and stranger than most people expect. One prediction, run in a loop. Everything else is scaffolding around it. Here is the whole film in one breath. A language model is a function that scores every possible next token. A loop samples one, appends it, and asks again. Training moved those scores toward text that was actually written and toward replies people preferred. Neither target is truth. That gap is the course.
Course Credit
[0:30] This is part one of chapter one from info 7375, prompt engineering at Northeastern University.
Act I: The Unfinished Script
[0:38] Act one, the unfinished script. Picture
Act I: The Unfinished Script
[0:40] A page of dialogue with the assistant's half torn away. Now picture a machine that takes any stretch of text and returns a ranked field of candidates for what comes next. You could rebuild the missing half mechanically. Feed in what you have, take a candidate, append it, feed the longer text back in, repeat. That is not an analogy for chatbot, it is a description of one. Watch the token travel back into the transcript. Hold that shape because the rest of the course is a study of what can be bolted onto it. Nothing in the loop reads a document. Nothing checks an answer key. Nothing knows whether the growing text is true. Retrieval tools, permissions, approval gates, every one of them arrives later in this course as an attempt to supply something this loop does not contain. Watch them dock around it. Not one of them is inside it. Act two, one question
Act Ii: One Question, Asked Over And Over
[1:28] Asked over and over.
Act Ii: One Question, Asked Over And Over
[1:29] Be precise about the unit. The machine does not predict words, it predicts tokens, fragments from a fixed vocabulary. A common word is one token. A rare one arrives in pieces. Watch the seam open. This matters more than it sounds. Ask it to count the letters in a word and you are asking a system whose atoms are sub-word chunks to reason about a unit it does not natively see. The output of one step is not a token. It is a number for every token in the vocabulary, tens of thousands of them, non-negative, summing to one. Every continuation gets a share. The absurd ones get small shares. Nothing is excluded. Read that carefully. The ranking describes how the phrase tends to continue in the text the model was fit to. It is not a look up against an atlas. Here the two agree. Their agreement is a fact about the corpus, not a guarantee.
Act Iii: The Transcript Is The Whole Trick
[2:17] Act three, the transcript is the whole trick.
Act Iii: The Transcript Is The Whole Trick
[2:20] If the model only continues text, how does it hold a conversation? By being handed text that looks like one. Underneath a chat is a single string with role markers. The most plausible continuation of a string ending in assistant colon is an assistant-sounding reply. Two consequences follow. First, a system prompt is not an enforcement mechanism. It is a paragraph near the top of a document competing for influence with every other paragraph, including ones a user pastes in later. Second, the model does not remember your last conversation. The entire transcript is resupplied every turn. What feels like memory is a growing string, which is why long conversations behave differently from short ones. Here is a raw transcript log with the markers left in. Once you have seen this, two later chapters stop being surprising. Access control has to be enforced by the runtime, and context becomes something you engineer.
Act Iv: Where The Numbers Come From
[3:12] Act four, where the numbers come from.
Act Iv: Where The Numbers Come From
[3:15] The parameters that fix those probabilities start random. The model starts by producing noise. Then, take a passage, hide the next token, ask for distribution, compare it with the token that actually followed. Then back propagation nudges every parameter slightly. So, next time this context arises, the true token gets a little more probability, and everything else a little less. Repeat across an enormous corpus. Nothing here is told what is true. Two published numbers, and they are worth drawing rather than repeating. 175 billion parameters, 300 billion training tokens. Every rung of that ladder is a thousand times the one below it. A second stage adjusts for the fact that completing internet text is not the same job as being an assistant. People rank candidate replies. The parameters shift toward what raters approved of. Approval and correctness overlap, but where they diverge, the signal follows approval. But where does that preference data come from? From this, a rating control under a reply. Somebody clicks the arrow, and that click is the whole training signal. The parameters shift toward whatever got the arrow, not toward whatever happened to be true.
Act V: Scale, In Units You Can Check
[4:21] Act five, scale in units you can check.
Act V: Scale, In Units You Can Check
[4:24] You have heard the comparison, it would take a person thousands of years to read that much text. Do not take the number, take the script that produces it and change one assumption. 300 billion tokens at about 3/4 of a word each is 225 billion words. Read non-stop at 250 words a minute, and that is 1,711 years. At 200, 2139. At 150, 2852. Sit with that spread. The headline is not a measurement. It is a division whose answer moves by more than a thousand years depending on a reading rate nobody stated. Every version says the same real thing, more text than a person could read. The compute figure behaves the same way. The reported training compute done by hand at billion operations a second is about 10 million years. You may have heard over 100 million. That needs roughly 10 times the budget. Both sentences can be true. They are not the same sentence.
Act Vi: Inside One Prediction Step
[5:17] Act six, inside one prediction step.
Act Vi: Inside One Prediction Step
[5:20] The architecture that made this scale practical arrived in 2017. Its relevant property is not cleverness, it is parallelism. Before it, a model walked through text one position at a time, every step waiting on the last. A transformer takes every position in the same instant. Each token becomes a list of numbers because the fitting procedure only works on continuous values. Then attention lets those lists read each other and revise themselves according to context. Watch what the word river does. A feed-forward layer adds patterns stored during training. Both operations repeat layer after layer. At the end, the vector at the final position, influenced by everything else, becomes one score per token, and those scores are normalized into a distribution. One more property because it constrains every honest claim you will make. Researchers design the operations. They did not design the behavior. It emerges from how the parameters were fitted, which is why nobody, including the people who built it, can read off why a particular prediction was made.
Act Vii: Stochastic Parrots
[6:19] Act seven, stochastic parrots.
Act Vii: Stochastic Parrots
[6:22] The most influential name for the skeptical reading of all this comes from a 2021 paper. The claim in outline, the system stitches together forms it observed according to probabilistic information about how they combine with no access to meaning. Fluency is not comprehension. The argument has two halves, and conflating them is the usual mistake. The conceptual half says meaning is a relation between form and something outside language, so a system trained on form alone has no channel to it. The empirical half is about consequences, cost, uncurated corpora, and fluency that invites unearned trust. It is contested, and you should know where. Critics argue the conceptual half settles by stipulation what ought to be investigated, and point to probing work suggesting internal structure. Defenders reply that structure is not grounded reference, and that the empirical half stands regardless. Both replies are reasonable. In practice, the phrase gets used as a conversation ender, meaning it is just autocomplete, nothing to see here. That is weaker and lazier than the paper. Here is the version this film will stand behind because part two demonstrates it in code. Ranking a continuation highly is not evidence that it is true. The
Verdict
[7:30] Verdict, a chatbot is one next token prediction run in a loop. The unit is a token, not a word. Roles are text, not modes. Pretraining targets the token that actually followed. Preference tuning targets what raters preferred. Neither is an answer key. Scale slogans are divisions with unstated assumptions, and ranking a continuation highly is not evidence that it is true. Your turn.
Your Turn
[7:51] Open a fresh conversation and paste this. Then open three more and paste the same thing. You are not testing whether it knows the answer. You are watching how much of the reply moves when nothing about your input changed, and asking which part of the machine that variation is coming from.





