How Do LLMs Work? Explained Without a Single Equation
How do LLMs work? Tokens, context windows, and next-chunk prediction — the three ideas that explain everything AI does, with zero math required.
Evgenii Arsentev · PhDReviewed for accuracy by Evgenii Arsentev, PhD · 2026-06-12
A large language model predicts the most fitting next chunk of text, having learned patterns from a vast slice of human writing. That's the whole engine. Power emerged from scale, not from a secret spark.
How do LLMs work, in simple terms?
Imagine the world's best autocomplete. It has read an enormous amount of human writing and learned which words tend to follow which. When you ask a question, it doesn't look up an answer — it predicts, one chunk at a time, the text that should come next given everything you typed. String enough good predictions together and you get a coherent answer.
What are tokens and context windows?
Two mechanics explain its quirks: it reads in tokens (chunks, not letters), and it can only reason over what's in its current context window (its working desk). New chat, wiped desk.
What are the core pieces of an LLM?
Three ideas cover almost everything: tokens (the chunks it reads and writes), the context window (the working memory it can see right now), and next-chunk prediction (the engine that picks what comes next). Understand those three and most of an LLM's behavior stops being mysterious.
Is ChatGPT an LLM or generative AI?
Both, really. "Generative AI" is the broad family of systems that produce new content; an LLM is the specific kind that generates text. ChatGPT is a product built on an LLM — the model is the engine, ChatGPT is the car you actually drive.
Are LLMs actually AI?
Yes, in the practical sense the word is used today: they're machine-learning systems that perform tasks once thought to need human intelligence. What they aren't is conscious or self-aware — under the hood it's pattern-matching at vast scale, not understanding. Useful to remember when the output sounds confidently human.
How do LLMs work in ChatGPT and Claude?
ChatGPT and Claude are friendly interfaces wrapped around an LLM. Each time you send a message, the whole visible conversation is packed into the context window and the model predicts a reply, chunk by chunk. That's why long chats drift — old details fall off the desk — and why a fresh chat is meeting the model for the first time, every time.
Free course
Stop reading about AI — start building with it
The free Claude Code course: your first site, tool or game — no coding. No upsells, no cross-sells — nothing to buy here.
Start free →References
Selected peer-reviewed papers and preprints on the AI research behind this topic.
- [1]Du et al. (2023). Joint Music and Language Attention Models for Zero-shot Music Tagging. arXiv:2310.10159
- [2]Jiang et al. (2026). Procedural Pretraining: Warming Up Language Models with Abstract Data. arXiv:2601.21725
- [3]Wang et al. (2018). Can You Tell Me How to Get Past Sesame Street? Sentence-Level Pretraining Beyond Language Modeling. arXiv:1812.10860
- [4]Tang et al. (2024). A Survey on Transformer Compression. arXiv:2402.05964
- [5]Hassani et al. (2022). Dilated Neighborhood Attention Transformer. arXiv:2209.15001
- [6]Zucchet et al. (2025). How do language models learn facts? Dynamics, curricula and hallucinations. arXiv:2503.21676
- [7]Mroczkowski et al. (2021). HerBERT: Efficiently Pretrained Transformer-based Language Model for Polish. arXiv:2105.01735

Author
Evgenii Arsentev
PhD · AI transformation executive
Reading is the blue pill
Want to actually build this?
Guides explain. The free course transforms — personalized, gamified, and built to get you shipping fast.
Start the free course →