Andrej Karpathy on LLMs
Karpathy sees LLMs as probabilistic token predictors that compress a huge amount of human text into weights, become useful through careful prompting and tooling, and point toward a new way to build software.
- LLMs predict the next token, and that simple objective scales into broad capabilities.
- They are not persistent minds; they restart from their weights and current context window each time.
- Using them well means managing context carefully, choosing the right model, and giving tools when needed.
- Prompting is becoming a real programming interface, which Karpathy frames as a new software paradigm.
- Today’s LLMs are powerful but still incomplete foundations for reliable agents.

“…think of the tokens in the context window as a precious resource…”Talk / online presentation, June 2023 · 17:37
LLMs are next-token predictors, not little people in a box
Karpathy explains LLMs from first principles as systems that generate text by predicting one token after another. The core model underneath GPT-style systems is the Transformer, which does the main computational work that turns context into the next-token probabilities.1
He pushes against anthropomorphic intuitions. An LLM is best understood as a learned mathematical object with weights and the code that runs them, not as a stable inner self with continuous awareness.
That framing matters for both trust and product design. If you think of the model as a probabilistic generator over token sequences, its strengths and failures become easier to reason about.6
Pretraining compresses internet text into usable knowledge
A central Karpathy idea is that pretraining acts like compression: vast amounts of text are distilled into parameters. After training, generation is the reverse-looking process, where the network can produce text that reflects patterns it absorbed from large corpora.7
He argues that next-token prediction is richer than it looks. To keep predicting well over long stretches of text, the model has to pick up facts, concepts, styles, and many regularities about the world embedded in language.
At the same time, this does not mean the model contains a clean symbolic database or perfect truth. Its knowledge is embedded in weights and activated through context, which is why answers can be fluent yet still wrong or outdated.
The context window is the model’s working memory
Karpathy repeatedly emphasizes that current LLMs operate through the token window in front of them. What the model can do right now depends heavily on which tokens are present, relevant, and recent in that context.1011
This leads to a very practical rule: treat context tokens as scarce. He advises against stuffing chats with irrelevant material, because excess context can make performance worse as well as more expensive.1112
He also recommends resetting conversations when the task changes, because the model does not carry over a stable internal session memory in the human sense. Each run starts from the weights plus the current prompt, so fresh chats often improve clarity and control.1314

“…think of the tokens in the context window as a precious resource…”Talk / online presentation, June 2023 · full transcript →
Good LLM use is about orchestration, not just asking a question
Karpathy treats LLMs as tools that need to be used with judgment. For ordinary tasks, a chat interface may be enough, but harder tasks often require switching to stronger reasoning-oriented models or adding external tools.6
His practical advice is straightforward: use search for fresh information, use computation tools for math and code-adjacent checks, and avoid assuming the model’s built-in knowledge is complete. This is one of his clearest themes: capability comes from model plus context plus tools, not model alone.
This way of working scales from everyday prompting to more advanced systems. It is also the bridge to agents, where the challenge becomes maintaining useful context, invoking the right tools, and supervising longer chains of action.
Prompting turns LLMs into a new kind of software platform
Karpathy argues that LLMs are not just another API; they change what programming looks like. He frames modern computing as moving from hand-written code toward learned systems and now toward natural-language control over those systems.
That is why he says prompting functions like programming. In his view, prompts specify behavior for a new kind of computer, which makes English itself part of the programming interface.
The implication is practical, not just philosophical. Building with LLMs means managing prompts, context, evaluation, tools, and human oversight as first-class parts of the product, not afterthoughts.
LLMs are powerful foundations, but reliable agents still need more
Karpathy is bullish on where LLMs are headed, but he does not think today’s systems are finished products. He places agents on a longer timeline and argues that making them truly dependable will take sustained work rather than a single breakthrough.
Part of the gap is architectural and product-level. Current systems lack durable memory, continual learning, and enough robustness to behave like dependable coworkers across messy real tasks.14
Even so, he sees the direction clearly. LLMs are the best foundation yet for more autonomous systems, and the next phase is learning how to wrap them in memory, tools, interfaces, and supervision so they can act usefully over longer horizons.
Karpathy on llms, in his own words
“…think of the tokens in the context window as a precious resource…”
“A lot of the issues that may look like just issues with the neural network architecture or the large language model itself are actually issues with the tokenization…”
Where to watch
Andrej Karpathy on Large Language Models: from pretraining to agents2024 · 60 min · full transcriptBest concise overview of what an LLM is, how pretraining works, and how base models become assistants.
Andrej Karpathy on Using LLMs: Tools, Models, and Workflows2023 · 131 min · full transcriptMost practical guide to using LLMs well: context windows, model choice, tools, and workflows.
Andrej Karpathy on Large Language Models: How ChatGPT Works2022 · 211 min · full transcriptBroad, intuitive walkthrough of the full LLM pipeline from data to inference.
Andrej Karpathy on Software 2.0 to 3.0: AI Changes Everything2024 · 121 min · full transcriptBest for understanding why Karpathy thinks LLMs create a new software paradigm.
Andrej Karpathy on GPT From Scratch: How ChatGPT Works2022 · 116 min · full transcriptBest technical intuition-builder for the Transformer and autoregressive text generation.
Andrej Karpathy on Agents and AI Progress: why it’s a decade2024 · 146 min · full transcriptBest for Karpathy’s forward-looking view on LLMs as the basis for future agents.
Questions people ask
- How does Andrej Karpathy decide when to use reasoning models, search, or tools with LLMs?
- What did Andrej Karpathy say about software 3.0 and prompts?
- What did Andrej Karpathy say about whether reasoning models can generalize beyond math and code?
- What did Andrej Karpathy say about why tokenization causes strange LLM behavior?
- What does Andrej Karpathy mean by the 'cognitive core' in LLMs?
- Why does Andrej Karpathy say AI agents will take a decade to work like employees or interns?
Sources
Every quote above, word for word from the transcripts. Numbers match the text.
“Transformer is the neural net that actually does all the heavy lifting under the hood…”
“…use it as a tool in a toolbox…”
“…this network then dreams internet documents…”
“…the answer is already created, it's already in the token window…”
“…think of the tokens in the context window as a precious resource…”
“…don't overload it with irrelevant information…”
“…if it is the case that those tokens are not any more useful to your next query, I encourage you to do this…”
“These models, when you boot them up and they have zero tokens in the window, they're always restarting from scratch where they were. So I don't know in that worldview what it looks like. Maybe making some analogies to humans—just because I think it's roughly concrete and interesting to think through—I feel like when I'm awake, I'm building up a context window of stuff that's happening during the day. But when I go to sleep, something magical happens where I don't think that context window stays around. There's some process of distillation into the weights of my brain. This happens during sleep and all this stuff. We don't have an equivalent of that in large language models. That's to me more adjacent to when you talk about continual learning and so on as absent.”
How this guide was made: drafted with AI from the full transcripts of the recordings cited, then checked: every quotation must match a transcript word for word and be the speaker's own words, and an independent review gates accuracy. Methodology and corrections.








