0% completed
What a Large Language Model Is
On This Page
Part 1: A Program That Predicts the Next Word
Part 2: From One Word to a Full Answer
Part 3: Why One Skill Is Enough for Many Tasks
Part 4: An LLM, a Chat App, and AI
Part 5: What an LLM Is Not
Key Takeaways
Read this unfinished sentence and think of the word that comes next.
The chef tasted the soup and said it needed more
Most people answer "salt" in less than a second. Nobody looks the answer up. Years of reading and listening have taught you which words usually follow other words, and "salt" fits better than any other word.
A chat assistant such as ChatGPT, Claude, or Gemini writes its answers with this same skill. The program inside it reads some text and predicts the word that comes next. This lesson explains what that program is, how one predicted word becomes a full answer, and what the program cannot do.
Part 1: A Program That Predicts the Next Word
The program is called a large language model, or LLM. Each word in the name describes one part of it:
- Language means that the program works with text. Text goes in, and text comes out.
- Model means that nobody wrote its behavior as a list of rules. The program learned its behavior from examples, which in this case were sentences written by people.
- Large describes its size. An LLM holds billions of adjustable numbers called parameters, and it learned them from more text than a person could read in thousands of lifetimes.
An LLM does not answer with a single word. It gives every word it knows a chance between 0 and 1 (a probability), where a higher number means the word is more likely to come next. The diagram below shows the chances for the sentence about the chef.
Look at the bars on the right. "Salt" gets 0.62, "pepper" gets 0.11, and thousands of other words share the rest. The numbers in this course are illustrative, but a real model produces a list of the same kind.
One detail is simplified here. A real model predicts small pieces of text called tokens, and a token is often a whole word but sometimes only part of one. This lesson says "word" to keep the idea simple, and the Tokens lesson gives the exact version.
Part 2: From One Word to a Full Answer
One predicted word is not an answer. The model produces a full answer by repeating the same step many times:
- The model reads the text so far and predicts the next word.
- The program adds that word to the end of the text.
- The model reads the longer text and predicts again.
The diagram below shows three rounds of this loop.
Notice that each round adds exactly one word. The model never writes a whole sentence in one step. The loop ends when the model predicts a special stop signal in place of a word.
Every answer from a chat assistant is produced this way, whether it is an email, a summary, or a page of code. This loop is also the reason an answer appears on the screen a few words at a time.
Part 3: Why One Skill Is Enough for Many Tasks
Predicting the next word sounds like a small skill. It is not small, because a correct prediction often requires real knowledge. The table below shows four pieces of text and what a model needs in order to continue each one well.
| Text to continue | Likely next word | What the prediction requires |
|---|---|---|
| The chef tasted the soup and said it needed more | salt | Everyday knowledge about cooking |
| The capital of France is | Paris | A fact |
| "Good morning" in Spanish is | Buenos | Translation |
| 12 + 30 = | 42 | Arithmetic |
The model was trained on a very large amount of text of every kind: articles, books, conversations, and code. To predict well on all of it, the model had to learn grammar, many facts, and common patterns of reasoning.
As a result, one LLM can do tasks that once needed separate programs. It can answer a question, translate a paragraph, summarize a report, and write a function. For the model, each task is the same job: continue the text in the most likely way.
Part 4: An LLM, a Chat App, and AI
Three terms are often used as if they meant the same thing, and they do not.
- Artificial intelligence (AI) is the whole field of making computers do tasks that normally need human thinking. An LLM is one kind of AI. A program that recognizes faces in photos is another kind.
- An LLM is the model itself, the program that predicts the next word. GPT, Claude, Gemini, and Llama are families of LLMs.
- A chat app is a product built around an LLM. The app adds the parts a user sees and needs, such as the chat screen, the conversation history, and features like web search.
Part 5: What an LLM Is Not
Three common beliefs about LLMs are wrong, and each one leads to mistakes.
An LLM is not a database. It does not store answers and look them up. It generates every answer one word at a time, and it does not always choose the same words. This is why the same question can receive two different answers.
An LLM is not a search engine. The model learned from text that was collected before its training ended, and it cannot look anything up. Some chat apps add a search feature, but that feature belongs to the app.
An LLM does not check whether its words are true. It produces the words that are most likely to come next. For common facts, the most likely words are usually correct. For rare facts, the model can write a false sentence in the same confident tone as a true one.
Key Takeaways
- An LLM predicts the next word. It gives every possible next word a chance, based on the text so far.
- A full answer is many predictions, one after another. The model adds one word, reads the longer text, and predicts again until it produces a stop signal.
- Predicting well requires knowledge. This is why one model can answer, translate, summarize, and write code.
- An LLM generates text and does not look it up. Its answers are likely, which is not the same as true.
The next lesson, The Life of a Prompt, follows the sentence about the chef through the model, step by step. It is the map for the rest of the course.
Reading Progress
0%
On This Page
Part 1: A Program That Predicts the Next Word
Part 2: From One Word to a Full Answer
Part 3: Why One Skill Is Enough for Many Tasks
Part 4: An LLM, a Chat App, and AI
Part 5: What an LLM Is Not
Key Takeaways