Free sample lesson ยท AI Foundations for Everyone
There Is No Answer Database
It has no store of answers, so where do the sentences come from?
Lesson 1 of the Wondering course AI Foundations for Everyone
What You Will Explore
- Prediction Mechanics
- Probabilities
- Implications
Discover how AI generates text through prediction rather than retrieving facts from a database.
The Myth of the Answer Database
Many people believe AI works like a search engine. They imagine it looks up facts in a giant digital library.
This is not how it works. There is no database of answers inside the model.
Instead, the system is a prediction machine. It generates text by guessing what comes next based on patterns it learned during training.
- Search Engine
- AI Model
Predicting One Step at a Time
The model builds sentences one small chunk at a time. This process is called next-token prediction.
Imagine the phrase: "The capital of France is". The model does not check a geography table to find the answer.
It predicts "Paris" because that sequence appeared most often in its training data. It then adds that word to the sentence and predicts the next one.
- Chunk by Chunk: The model builds sentences one small chunk at a time.
- Pattern Check: It relies on learned training patterns instead of checking tables.
- Append and Repeat: It adds the predicted word and continues predicting the next.
A World of Probabilities
At every step, the model looks at its entire vocabulary. It assigns a probability to every possible word.
Consider the prompt: "The best thing about Monday is". There is no single right answer here.
The model might see several likely paths: coffee (40%), a fresh start (30%), or nothing (10%). What you eventually read is just one path sampled from these different weights.
- Coffee: Highest likelihood path.
- Fresh start: Second likely path.
- Nothing: Lower probability path.
Why Fluency is Not Truth
Because the model predicts likely text, it is very good at sounding human. However, sounding correct is not the same as being correct.
The system optimizes for plausible sentences. It does not have a mechanism to assess if a statement is true.
This explains why AI can answer questions it never saw before. It is not copying; it is calculating the most likely way to continue your words.
- Model Optimization
- Fact-Checking
Putting It All Together
- Input Analysis: The model analyzes the incoming text tokens.
- Probability Distribution: It evaluates vocabulary weights across possible continuations.
- Sampling and Continuation: It samples a path and appends the token, repeating the loop.
Check yourself
An AI language model generates text by _____.
- predicting the most likely next word from learned patterns
- searching an internal database to retrieve stored answers
Answer: predicting the most likely next word from learned patterns
Language models do not consult an internal database of facts. Instead, they calculate probabilities across their vocabulary to predict the next token based on learned patterns.
When generating text, an AI assigns _____ across its entire vocabulary before a single path is _____ to produce the final output.
Answer: When generating text, an AI assigns probabilities across its entire vocabulary before a single path is sampled to produce the final output.
At every step, the system creates a probability distribution across all possible words in its vocabulary. The actual word displayed comes from sampling one path from those relative likelihoods.
Why can a language model produce a fluent, plausible answer to a question it has never seen stated in those exact words before?
- It calculates the most likely continuation pattern step-by-step rather than matching exact text.
- It searches a hidden backup index of facts when exact matches fail.
- It verifies the factual truth of the prompt using built-in logic rules.
- It automatically rewrites its own internal database when given new prompts.
Answer: It calculates the most likely continuation pattern step-by-step rather than matching exact text.
The model does not rely on finding exact matches in a database. It constructs outputs chunk by chunk by calculating the most likely continuation based on pattern recognition from its training data.
Keep going
This is lesson 1 of 42 in AI Foundations for Everyone. Next up:
- Picking From The Spread
- Decide Whether You Want Variety
- Where The Patterns Came From
- Billions Of Dials
- The Scale Of The Bet
Wondering turns any topic into short lessons you can read, watch, or listen to, with practice questions and an AI tutor.