Free sample lesson ยท How AI Actually Works
Prediction, Not Lookup
ChatGPT has no answer database, so where do its sentences come from?
Lesson 1 of the Wondering course How AI Actually Works
Prediction, Not Lookup
Discover how large language models generate fluent text through statistical prediction rather than database retrieval, and learn to navigate their capabilities safely.
The Myth of the Answer Database
Many people assume ChatGPT works like a search engine or a digital encyclopedia.
They imagine it searches a massive database of facts to find the best match for your question.
- Search Engine
- Language Model
In reality, there is no database of answers inside the model. It does not copy text from a stored library when it responds to you.
Prediction Instead of Retrieval
Large language models work by predicting the next small chunk of text, called a token.
If you type "The capital of France is", the model predicts "Paris" as the most likely continuation.
It chooses this because that pattern appeared frequently in its training text, not because it looked up a geography table. It is generating text, not retrieving it.
Learning Patterns at Scale
Models learn these patterns through pretraining on trillions of words from books, code, and the internet.
This process tunes billions of internal parameters. These parameters act like a complex map of how language and facts fit together.
- Trained on 15 trillion tokens
- Two million beginners before you
Why Prediction Matters
Because the model predicts text based on patterns, it can write a story about a "robot dentist" that it never saw before.
It recombines learned styles and concepts to create something new. However, this also explains why it can make mistakes.
If a pattern sounds plausible but is factually wrong, the model might still predict it. It prioritizes statistical likelihood over absolute truth.
Putting It All Together
- Prompt with Context: Provide clear examples and structure so the model's next-token prediction aligns with your goals.
- Expect Novelty: Recognize that the model can synthesize creative combinations it has never seen verbatim.
- Verify Facts: Check plausibility-driven mistakes since models prioritize likely-sounding text over absolute truth.
Check yourself
When responding to a user prompt, a large language model relies on _____ rather than retrieving stored documents.
- predicting the next token
- querying a database
Answer: predicting the next token
Language models do not search an internal database or lookup table; they generate text by predicting the most statistically likely next token based on their training.
Language models acquire their knowledge through _____ on vast text data, adjusting internal _____ to capture language patterns instead of following human-written _____.
Answer: Language models acquire their knowledge through pretraining on vast text data, adjusting internal parameters to capture language patterns instead of following human-written rules.
Pretraining exposes the model to trillions of words, adjusting billions of internal parameters to learn statistical patterns rather than relying on explicit hand-coded rules for every fact.
Why can a large language model produce a response that sounds completely fluent and convincing, yet contains factual errors?
- It prioritizes statistical likelihood over factual verification.
- It accidentally retrieved outdated files from its database.
- Engineers programmed incorrect explicit rules into the model.
- It copies text verbatim from unreliable websites during search.
Answer: It prioritizes statistical likelihood over factual verification.
Because large language models generate text using statistical likelihood rather than checking fact databases, a response can easily follow plausible phrasing patterns while being factually inaccurate.
Keep going
This is lesson 1 of 10 in How AI Actually Works. Next up:
- Tokens and Working Memory
- From Autocomplete to Assistant
- Why AI Makes Things Up
- Brief It Like a New Hire
- Show, Don't Just Tell
Wondering turns any topic into short lessons you can read, watch, or listen to, with practice questions and an AI tutor.