Secret Unreleased MFM Clip: Sam And Shaan Learn How ChatGPT Works

Dharmesh Shah explains how ChatGPT works through a fictional story about a secret demo. He breaks down the billions of parameters that act like knobs, how the model generates text token by token, and why it's more than just a next-word predictor despite being trained on autocomplete.
Chapters
And I'm using ChatGPT like 50 times a day, and it's incredible. I use it for medical, I use it for marketing, I use it for advice, I use it for, you know, writing emails, whatever. Anything I can think of, I just go to it. And it's weird because every explanation I've heard about how it works is like, oh, it's not really thinking, it's just kind of guessing the next word. It's just a, it's just an autocorrect on steroids. But I'm like, well, I can use it for everything. How is this possible? So my dumb question to a smart guy like you is, how does ChatGPT actually work? How does it do what it's doing?
I'm, I'm not as smart as you think I am, by the way. And I've seen, uh, most of your other guests, but, uh, I'll, I'll see what I can say. I'm gonna try something new. I'm gonna try something new.
I'm gonna— Dwarf among midgets or something. What's the, what's your phrase, Sam?
What? Uh, dwarf among midgets? Yeah. That doesn't, uh, that doesn't apply here, my friend. I, I think you are much smarter than you give your credit, self-credit to. Obviously all smart people say the same thing. So yeah, you've passed the test. I'm gonna try something new here. I'm gonna tell you a story, and this is completely fictional. Any resemblance to actual people or companies is completely coincidental, as they say in the media. So it's Sam and Sean, you two are both, you get a message. Someone slides into your DMs and invites you to this super secret demo. They're gonna show you something. Like, okay, well, we sort of know this person. We're not exactly sure what's up. And we're like, okay, we're in. So where are we going? Like, show up at the airport like this time. So can you not tell us where we're going? No. Like, how do we know like what to wear? Yes. It's like, okay, this is kind of weird. So you show up. It's not even like the regular air— like there's planes waiting for you. You fly in a private jet in the middle of nowhere. And then you drive for another hour, like in this black Escalade, right? You're just like, you show up at this like compound-looking thing. The driver won't talk to you at all. And then you show up and you meet this guy. It's like, oh, are you the person we're here to meet? What's this all about? It's like, no, I'm not the one. I'm just here to take you to the person. It's like, like, cool. Who is it? It's like, well, we jokingly refer to him as a superior alternative to man. Like, S-A-M? And Sam's like, his name is Sam? Like, no, he looks at you like you're an idiot. Like, no, S-A-M. Like, what part of that did you not understand? Well, sometimes, you know, we sort of drop the superior part because it's a little off-putting, uh, and he doesn't like it. So we just refer to him as Alternative Man, and we shorten it to Altman. And so that's what you're here to meet with, is this, this Altman. Um, So you're walking through and it's like this compound facility. And then a guy walks out. He looks vaguely familiar, but you can't quite put a finger on it. And walks you to any— and he actually, he gives you this kind of facial emotion that in some cultures would be called a smile, but he's obviously excited and kind of proud to show you what he's showing you. So you walk up to this room, closed off, no windows, it's black. Nothing, like no other than this door. And there's like a medium-sized sticker of like Marvin the Martian on the door. And it's got a sign, it's got just 3 letters on it, it's called GPT. It's like, okay. By the way, this is 2020 that this is happening. So it's like 2 BC, right? Before ChatGPT.
Historic times.
And yeah, prehistoric times. Okay. So Sam says, okay, he's got this like large sheet of paper. That's Sam, the other Sam. Sorry, I messed that up. Altman says, I've got this large sheet of paper. Tell me what you want this thing to do. It's like, what do you mean this thing? It's like, well, we have AI. And you guys are what? You have like artificial intelligence? And he looks at you like you're an idiot again. It's like, no, it's alien intelligence. You're just like, wait, you mean that you've, you found like some other species or whatever? It's like, no, it's just alien as in like it's foreign to us. I'm not saying there's some other species. You idiot. What do you want the thing to do? He's got this large sheet of paper. And so Sean says, okay, I want a 200-word history of classic piano instruction and how that's evolved over time. Sam writes it out on the sheet of paper, puts it in a slot in the door, waits 30 seconds, sheet comes back out again, and sure enough, there's a 200-word summary of the evolution of classical piano training over the years. Like, this is amazing. Like, what? Like, how did you do this? Like, this is not— I didn't even know this was possible. That is the metaphor, and we're gonna ride this one for a while. But so here's what's actually happening. So it's not an alien species in that room. What it is is this machine, and it's called a large language model. And the machine has exactly one purpose that says, oh, you can put Any amount of text in and it's going to spit out exactly one word. That's it. It's like you typed in this, the horse jumps over the blank, you feed into the machine and it's going to come out with the word fence. It's just going to complete the next word or next token prediction, but that's all it does. And the way it does this is that it's got a bunch of— imagine this actual machine. It's not an actual machine, but imagine it were. with a bunch of knobs on it. Knobs, like billions and billions of knobs, like stereos in the 1980s, right? It's like, okay, then you can control it. And what happens is that this machine has been trained to do exactly one thing that says, given some piece of text, it will predict the next word as best as it possibly can. That's what it's been trained to do. Okay. Well, how is it trained to do that? It's like, okay, well, what we did is we said, okay, we're going to take all the text that exists in the world. We're going to give it every blog article ever written, every academic paper, every book, all of Reddit, and we're going to feed it into the machine and we're going to have it make its best guess. We're going to take fragments of it and see if it can accurately predict what the next word would have been. If it gets it right, great. If it gets it wrong, we're going to adjust those knobs and dials and we're going to keep adjusting them until the accuracy keeps going up for every possible piece of text that we feed it. It gets it righter. And writer and writer. And we're going to spend millions of dollars and hundreds of days doing nothing but that with all available information. We're going to have to train this machine. At the end of it, we have what we have now. And then the two of you ask, well, that's fine that I can predict the next word, but I just saw it produce like this 200-word summary of piano instruction. Oh yeah, that's like, that's a hack. What we do is we just pass it the sheet of paper, It predicts the next word, and then we just turn around and feed it back in again. And it predicts the next word, and we turn around and feed it back in again in a loop. And then eventually it comes back and says, end of statement, like, I'm done now. This is it. Okay. And so that's all a large language model is doing, as a result of which lots of people will disparage LLMs. It's just like autocomplete. That's all it's really. It's not thinking, it's just autocomplete because it's indexed all this information on the internet. It's not really thinking or reasoning. And that's true. It's the truth, but it's not the whole truth, right? The whole truth is if you were optimizing this machine to try and predict the next word under all possible circumstances and be able to do that repetitively, in order to do that accurately with any semblance of accuracy, it's going to have to build a model of the world, right? Because it's going to have to be able to predict the next word on sentence fragments it's never seen before. Right? Well, how does it do that? It can't just randomly pick. It's not an index of the internet, right? It's not looking at existing webpages. It's actually generating kind of new content. And the way it does that is actually builds a model and an understanding of all that information we gave it. And we don't quite completely understand how it does what it does, but we do understand that the output achieves what it achieves. And that's why it feels very much like thinking, even though all it's really doing is kind of repetitive word completion, effectively.
More from Dharmesh

Is SaaS really dead? Dharmesh Shah from HubSpot on AI, Vibe-Coding & the Future of Work

Agents, Metaprompting and Tech-powered Parenting with HubSpot CTO Dharmesh Shah








