← Back to Library

AI literacy - lecture 3.2: What are large language models and how do they work?

A Linguist's Window Into the Machine

Kenny Easwaran's lecture on large language models stands out from the flood of AI explainers for one reason: it comes from a philosopher of science who understands both what linguists have historically believed about language and why those beliefs turned out to be wrong. Rather than offering the usual "neural networks are like brains" hand-waving, Easwaran grounds his explanation in a specific claim that deserves more scrutiny than it typically receives.

An LLM is a way to guess the probability of what word comes next. And there's three important words here: the probability of what word comes next.

This framing is deliberately reductive, and Easwaran knows it. The power of the lecture lies in how he unpacks the implications of that simple definition, particularly the ways it confounded decades of linguistic orthodoxy. Twentieth-century linguists, he explains, were convinced that probabilistic prediction of language was a dead end. Language was too complex, too entangled with world knowledge, too dependent on deep grammatical structures that surface word order could never capture. The transformer architecture proved them wrong, and Easwaran is refreshingly honest about what that means for his own field.

AI literacy - lecture 3.2: What are large language models and how do they work?

The Markov Chain Trap

The strongest section of the lecture walks through why simple probabilistic models fail and how transformers fix them. Easwaran presents a clean dilemma: a Markov process with three words of memory can produce grammatical-sounding text but will inevitably lose track of subject-verb agreement and other long-range dependencies. Expand the memory window and a different problem emerges — the sequences become so specific that they never appeared in the training data at all.

If you have too few words you can't ensure that it's grammatical. If you have too many you too often run into sequences that have never occurred before.

This is where attention mechanisms enter the picture. Rather than looking at every word in a long sequence, transformers learn to attend selectively to specific features of specific words — femaleness, verb tense, semantic relatedness to food. Easwaran's toy example of "she" triggering a search for a female referent, which in turn activates context about drinking, is an effective illustration even if it dramatically simplifies the actual multi-head attention mechanism. The key insight he conveys is that attention allows matching on abstract features rather than exact word sequences, sidestepping the data sparsity problem entirely.

Where the Lecture Pulls Its Punches

For all its strengths, the lecture underplays several important developments. Easwaran describes reinforcement learning from human feedback as a relatively thin layer applied on top of the base model, noting that "it apparently doesn't take a lot of RLHF in order to train it to do a pretty good job." This was arguably true for early ChatGPT, but the alignment landscape has shifted considerably. Constitutional AI, direct preference optimization, and iterative refinement processes now represent substantial engineering efforts, not minor tweaks. The suggestion that RLHF is a small addition risks leaving students with an outdated mental model of how modern systems are built.

There is also a notable absence of any discussion of scaling laws, emergent capabilities, or the relationship between model size and performance. When Easwaran says the training data "may include almost everything that's on the internet," he skips over the fundamental question of why more data and more parameters produce qualitatively different behavior. The jump from GPT-2 to GPT-4 was not simply a matter of better next-token prediction on more text — or if it was, explaining why that produces reasoning-like behavior is the central mystery of the field, and it deserves more than a passing mention.

Confabulation and the Human Analogy

The most thought-provoking section compares LLM hallucination to human confabulation. Easwaran points out that people routinely misremember famous movie lines — "Houston, we have a problem" and "Play it again, Sam" are both fabrications that entered cultural memory through collective misremembering. He extends this to children who confidently explain things they do not understand.

Kids will often give really interesting answers to that question that they're just making up. Now they don't realize that there's a difference between making things up and actually knowing the truth because they don't know that very much of the truth.

This analogy is illuminating but also somewhat dangerous. Human confabulation occurs within a system that has genuine world models, embodied experience, and the capacity for self-correction when confronted with evidence. LLM hallucination occurs within a system that has statistical patterns and no grounding mechanism whatsoever. Drawing too tight a parallel risks anthropomorphizing the failure mode in ways that obscure its actual cause. When a person misremembers a movie quote, they are retrieving from a corrupted but genuine memory trace. When an LLM fabricates a court case, it is generating a plausible-sounding token sequence that was never grounded in any fact to begin with. The surface similarity masks a fundamental difference in mechanism.

That said, Easwaran's broader point has merit. Both humans and LLMs produce confident-sounding output that blends accurate information with fabrication, and neither system always knows which parts are which. The practical implication — that users should verify LLM outputs just as they should verify human claims — is sound advice regardless of whether the underlying mechanisms are truly analogous.

The Chomsky Question

Running beneath the entire lecture is an implicit argument against Noam Chomsky's framework. Chomsky famously argued that surface-level statistical patterns could never capture the deep structure of language, that sentences like "where is he going?" require transformational rules operating on an underlying representation. Easwaran acknowledges this directly:

Large language models don't worry about the deep structure. They just go word by word and yet they manage to get these patterns just right. And so the fact that it works somehow tells us something really deep and powerful.

This is a significant claim that Easwaran somewhat buries in a transitional moment. If next-token prediction on sufficient data can produce grammatically correct language without any explicit representation of deep structure, it challenges one of the foundational assumptions of generative linguistics. Whether it actually refutes Chomsky or merely shows that deep structure can be implicitly learned through statistical patterns is a debate that continues in computational linguistics. Easwaran, perhaps wisely for an introductory lecture, does not take a strong position, but the implication hangs in the air.

Bottom Line

Easwaran delivers one of the more intellectually honest introductions to large language models available. His willingness to explain what linguists got wrong, rather than simply celebrating what engineers got right, gives the lecture a depth that most AI explainers lack. The treatment of RLHF and scaling is thin, and the human-LLM analogy needs more caveats than it receives, but the core explanation of attention mechanisms and why probabilistic prediction works despite decades of expert skepticism is both accessible and genuinely informative. For readers encountering these concepts for the first time, this is a strong starting point — provided they follow it with material that covers the developments Easwaran leaves out.

Deep Dives

Explore these related deep dives:

Sources

AI literacy - lecture 3.2: What are large language models and how do they work?

by Kenny Easwaran · Kenny Easwaran · Watch video

okay so what are large language models and how do they work if you've been paying attention to the world of computers at all since late 2022 you've heard of chat GPT this is an automated chat bot that can respond to any prompt in somewhat humanlike ways taking advantage of information that's out there on the web it can even write computer code and also hold conversations in any human language that is well represented online Beyond chat gbt there's Gemini from Google Claude from anthropic The open- Source system llama from meta and various others as well as systems built on top of these as backends these systems are not perfect and it's not hard to push them in ways that reveal their failures but they are remarkably good at what it is that they do and they somehow provide an easier way to interact with all the information on the web than usual search engines do they're useful in ways that no human interaction can duplicate even though they can't do most of the things that humans can in some ways they're good enough at what they do to encourage people to rely on them even for things that they're bad at but hopefully once you understand the basics of how they work you can get a sense of how to reduce these problems now one thing to keep in mind I'll often talk about these systems as though they know things or think things or learn things or remember or try or imagine or hallucinate or whatever this is all just convenient shorthand they're built on systems that are somehow patterned off of the neurons in our brain but there are important differences now we tend to call these systems as a whole large language models or llms for short but technically it might be better to refer to the system as a whole as a conversational AI or a virtual assistant the llm is only a component of the whole system and is's also a wrapper that enables the chat interface and makes them hopefully more helpful harmless and honest in this lecture I'm going to discuss both of these parts the llm and the raer there are of course many other sources that you can consult on the internet to learn more details about any of this lots of YouTube videos textbooks blog post ...