How Large Language Models Work
- 75Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
75 questions
- 1The architecture that replaced many earlier sequential approaches to language modeling is the_____.
Hint
It became the foundation of models such as GPT.
Answer
transformer architecture
Explanation
The transformer architecture enabled models to process relationships across a sequence in a different way from earlier recurrent systems.
- 2Unlike a sequential RNN, a transformer can examine the words in a sequence using_____.
Hint
The model can work with many parts of the input at the same time.
Answer
parallel processing
Explanation
Transformers can process multiple positions in a sequence in parallel rather than moving through the words one by one.
- 3The transformer mechanism that weighs how relevant words are to one another is called_____.
Hint
It helps the model focus on important relationships within the input.
Answer
self-attention
Explanation
Self-attention compares words in a sequence and assigns importance to their relationships, helping the model use context.
- 4In the sentence “The glass shattered,” self-attention helps associate “shattered” more strongly with_____than with “floor.”
Hint
Choose the object that broke.
Answer
glass
Explanation
Self-attention can connect a word to the most relevant word in context; here, “shattered” relates to “glass.”
- 5A transformer uses_____attention so different processing heads can focus on different kinds of relationships at once.
Hint
Each head can examine a different aspect of the same sentence.
Answer
multi-head
Explanation
Multi-head attention uses multiple attention heads to analyze different relationships or features in the input simultaneously.
- 6In multi-head attention, one head might track grammar while another tracks pronoun references or_____.
Hint
This is another aspect of meaning conveyed by a sentence.
Answer
emotional tone
Explanation
Different attention heads can focus on distinct features, such as grammatical relationships, pronoun references, and emotional tone.
- 7After different attention heads identify separate patterns, their insights are_____.
Hint
The model combines the heads’ findings into a broader representation.
Answer
merged together
Explanation
Multi-head attention combines the information gathered by its different heads so the model can use multiple aspects of context.
- 8The ability to process many relationships in parallel contributes to transformers’ speed and increases demand for powerful_____.
Hint
These specialized chips are often used for large-scale computation.
Answer
GPUs
Explanation
Transformers perform extensive parallel computation, so training and running them often requires powerful GPUs.
- 9GPT stands for generative pre-trained_____.
Hint
It names the architecture used by the model.
Answer
transformer
Explanation
The acronym GPT expands to generative pre-trained transformer.
- 10The paper that introduced the transformer architecture was titled “_____.”
Hint
The title refers to the mechanism central to the architecture.
Answer
Attention is all you need
Explanation
The transformer architecture was introduced in a paper titled “Attention is all you need.”
- 11Transformers can connect a sentence’s subject near its beginning to a related verb later because they can use_____.
Hint
Think about relationships between words that are far apart in a sequence.
Answer
long-range context
Explanation
By attending across the sequence, transformers can relate words that are separated by many other words, preserving useful context over longer distances.
- 12Text is divided into units called_____before a language model processes it as numerical input.
Hint
A unit may be a whole word or only part of one.
Answer
tokens
Explanation
Language models break text into tokens, which can represent complete words or smaller word fragments.
- 13A token may represent a whole word or a_____of a word.
Hint
For example, a common ending can be its own unit.
Answer
part
Explanation
Tokens are not always complete words; they often represent smaller pieces such as common word endings.
- 14Breaking words into reusable chunks avoids the need for an enormous vocabulary containing a unique unit for every word, typo, and_____.
Hint
This is another kind of text the model may encounter.
Answer
coding syntax
Explanation
Using smaller, reusable token pieces keeps the vocabulary more manageable than assigning a separate token to every possible word and form.
- 15The numerical representation of a token as a list of values is called an_____.
Hint
It lets the model perform mathematical operations on language units.
Answer
embedding
Explanation
An embedding maps a token to a vector of numbers that the model can use in computation.
- 16An embedding is a type of_____that represents a token with a list of numbers.
Hint
It can be imagined as a coordinate in a space of meanings.
Answer
vector
Explanation
A vector is a numerical representation; embeddings place tokens at positions that encode useful relationships.
- 17In an embedding space, the relative distances and directions between token vectors represent their_____.
Hint
The geometry captures how concepts are connected or similar.
Answer
relationships
Explanation
The positions of vectors allow a model to represent relationships among words and concepts mathematically.
- 18The analogy “king minus man plus woman equals queen” illustrates how vector operations can capture relationships between_____.
Hint
The operation is performed on numerical representations of meanings.
Answer
concepts
Explanation
Because embeddings encode relationships, operations on their vectors can reflect semantic relationships between concepts.
- 19At its core, a decoder-only language model has the task of predicting the_____.
Hint
It repeatedly extends the text it has already received or generated.
Answer
next token
Explanation
A decoder-only model generates text by estimating what token should come next given the preceding context.
- 20When predicting a next token, the model assigns possible continuations different_____.
Hint
These values indicate how likely each candidate is in context.
Answer
probabilities
Explanation
The model estimates a probability for each possible next token and selects a continuation based on those estimates.
- 21In an autoregressive generation process, each generated token is added to the context and used to predict the_____.
Hint
Generation repeats the same prediction task after every addition.
Answer
next token
Explanation
The model feeds its newly generated token back into the context, then predicts another token in a repeating loop.
- 22When a plausible but incorrect token becomes the basis for later predictions, the model may produce a_____.
Hint
This term describes generated information that is made up or false.
Answer
hallucination
Explanation
A model predicts likely text rather than verifying facts. A mistaken prediction can shape later output and lead to fabricated claims.
- 23A raw model’s predictions are based on learned_____rather than a built-in guarantee that an answer is factually true.
Hint
The model estimates which continuation is likely, not whether it has verified a fact.
Answer
probabilities
Explanation
The model chooses likely continuations based on patterns in its training; probability alone does not ensure factual correctness.
- 24Training a model on very large collections of text before refining it is called large-scale_____.
Hint
This is the education stage that comes before alignment and prompting.
Answer
pre-training
Explanation
Pre-training exposes a model to large quantities of text so it can learn broad language patterns and associations.
- 25Pre-training data can include books, websites, scientific papers, legal documents, and code_____.
Hint
These collections contain software projects and source code.
Answer
repositories
Explanation
A pre-training corpus may combine many kinds of written material, including code repositories.
- 26In self-supervised learning, a model can learn by hiding a word in text and trying to predict the_____.
Hint
The model uses the surrounding sentence as context for its guess.
Answer
missing word
Explanation
Self-supervised learning creates a training task from the text itself, such as predicting a hidden or next word without a human writing a label for every example.
- 27Pre-training is called self-supervised because the learning signal is generated from the_____itself rather than supplied by a teacher for every example.
Hint
The text provides the context and the prediction target.
Answer
data
Explanation
In self-supervised learning, the model creates prediction tasks from the material it is learning from, instead of relying on a teacher to label each example.
- 28By predicting words across many contexts, a model can learn language_____without being given an explicit grammar rule for every pattern.
Hint
This concerns how words are arranged in sentences.
Answer
syntax
Explanation
Repeated prediction exposes the model to patterns in word order and sentence structure, helping it learn syntax from examples.
- 29Learning how words convey meaning together across contexts is learning language_____.
Hint
This concerns meaning rather than sentence structure alone.
Answer
semantics
Explanation
Pre-training helps a model learn semantic patterns from how words and phrases are used together.
- 30A model may associate “Paris” with being the capital of France because those terms occur together frequently in its training_____.
Hint
This is the large collection of material the model learns from.
Answer
data
Explanation
Frequent co-occurrence in training data can establish strong associations, although such associations do not by themselves guarantee that a model verifies facts.
- 31The information learned during pre-training is encoded in the neural network’s_____.
Hint
These numerical values are adjusted as the model learns patterns.
Answer
weights
Explanation
Training adjusts the model’s weights, which encode learned mathematical relationships and influence its later predictions.
- 32A pre-trained model is better understood as a compressed representation of relationships in its data than as a database that stores every text_____.
Hint
The model does not preserve the source material word for word in a searchable archive.
Answer
perfectly
Explanation
The model’s weights capture statistical and mathematical relationships from training rather than storing the entire corpus as a perfect copy.
- 33A language model can learn code during pre-training by predicting tokens according to code’s relatively strict grammatical_____.
Hint
These constrain how valid code is written.
Answer
rules
Explanation
Code can be treated as another language: the model learns patterns and syntax by predicting what comes next in code examples.
- 34Poor-quality or biased training material can produce poor or biased model behavior, an instance of “garbage in,_____.”
Hint
The phrase describes how flawed inputs affect outputs.
Answer
garbage out
Explanation
A model’s learned patterns depend on its training data, so flawed or biased data can lead to flawed or biased outputs.
- 35Large-scale pre-training can require huge computing resources because many GPUs may run for_____.
Hint
The duration can be extended rather than limited to a short session.
Answer
months
Explanation
Training large models can involve thousands of GPUs operating over long periods, making it computationally and financially expensive.
- 36Capabilities that appear as models reach very large scales, despite not being explicitly programmed, are called_____.
Hint
They seem to arise as the model crosses a scale threshold.
Answer
emergent capabilities
Explanation
Emergent capabilities are abilities that become apparent at large scales even though they were not individually programmed as explicit tasks.
- 37The models discussed in the content reach scales of hundreds of billions of_____.
Hint
These are adjustable values or connections in a neural network.
Answer
parameters
Explanation
The emergence discussion describes very large models with hundreds of billions of parameters.
- 38A neural network’s_____are adjustable connections that can encode patterns and nuance.
Hint
Increasing their number is one way of increasing model size.
Answer
parameters
Explanation
Parameters are learned numerical values in a neural network; more of them can allow a model to represent more patterns and nuance.
- 39Although a model is trained to predict the next token, predicting the answer to a reasoning problem may require it to perform_____.
Hint
For example, solving an arithmetic word problem requires more than copying nearby words.
Answer
reasoning
Explanation
The content proposes that next-token prediction can lead to reasoning-like abilities because producing the correct continuation may require solving the underlying problem.
- 40In the example where John has five apples and eats two, predicting the correct remaining count requires solving the_____problem.
Hint
The model must determine how many apples remain after subtraction.
Answer
math
Explanation
To predict the answer “three,” the model must use the arithmetic relationship in the word problem, rather than merely imitate its wording.
- 41The proposed mechanism by which a model may suddenly grasp an underlying pattern after struggling is called_____.
Hint
It refers to a sudden improvement in understanding or performance.
Answer
grokking
Explanation
Grokking describes a pattern in which a model’s performance on a task can improve sharply after a period of difficulty.
- 42The three ingredients emphasized by scaling laws are more data, larger model size, and more_____.
Hint
This includes the processing resources and training time available to the model.
Answer
compute power
Explanation
The content identifies data, model size, and compute power as three levers that can improve model performance as systems scale.
- 43The model-size lever in scaling laws is increased by adding more_____.
Hint
These are learned values in the neural network.
Answer
parameters
Explanation
A larger model has more parameters, giving it greater capacity to represent patterns and relationships.
- 44A limitation on continued scaling is that the supply of high-quality text on the internet may become_____.
Hint
The content suggests researchers may be running short of this resource.
Answer
limited
Explanation
Scaling requires more data, but the amount of readily available high-quality text is not unlimited.
- 45Translation, coding, and summarization are examples of abilities described as appearing from scale rather than being explicitly_____.
Hint
They emerged without developers writing a direct rule for each ability.
Answer
programmed
Explanation
The content presents several capabilities as abilities that can arise as models scale, rather than as individually programmed features.
- 46A model trained on raw internet text before alignment is often called a_____model.
Hint
It has not yet been refined into a user-facing assistant.
Answer
base
Explanation
A base model has undergone pre-training but has not necessarily received the refinement needed to make it safe and helpful for public use.
- 47Because a base model learns from a broad and messy corpus, it may learn harmful material as well as useful information, but initially lacks a moral_____.
Hint
This metaphor describes a guide for distinguishing acceptable from harmful behavior.
Answer
compass
Explanation
Pre-training can expose a model to harmful or false text. A raw predictive model does not automatically know that such material is unsafe or incorrect.
- 48The goal of alignment is to bring model behavior closer to human_____.
Hint
These guide what people consider desirable or acceptable behavior.
Answer
values
Explanation
Alignment aims to shape the model so that its behavior better reflects human preferences and values.
- 49The three pillars of alignment in the content are helpful, truthful, and_____.
Hint
This pillar concerns avoiding dangerous or damaging assistance.
Answer
harmless
Explanation
The three Hs are helpful, truthful, and harmless. Together they describe important but sometimes competing goals for aligned behavior.
- 50Following a request can make a model helpful while also making it untruthful or unsafe, illustrating that alignment goals can_____.
Hint
The goals do not always point toward the same response.
Answer
conflict
Explanation
A request may be easy to follow but may require lying or providing dangerous information, creating tension among helpfulness, truthfulness, and harmlessness.
- 51RLHF stands for reinforcement learning from human_____.
Hint
People provide evaluations that help guide the model’s behavior.
Answer
feedback
Explanation
RLHF uses human feedback as part of a reinforcement-learning process to refine a model.
- 52The first step described in RLHF, in which people write ideal responses to prompts, is supervised_____.
Hint
Humans provide examples of the response style and quality the model should imitate.
Answer
fine-tuning
Explanation
During supervised fine-tuning, people write example answers that demonstrate desired behavior, such as being accurate, safe, polite, and clear.
- 53Supervised fine-tuning teaches a model the desired response style by providing human-written_____answers.
Hint
These examples show what a good response should look like.
Answer
ideal
Explanation
Human-written ideal responses give the model demonstrations of the style and format expected of a helpful assistant.
- 54In reward model training, humans generally rank candidate answers rather than write a perfect response from_____.
Hint
Ranking existing options is easier than composing a new answer.
Answer
scratch
Explanation
People can compare and rank model-generated answers more easily and quickly than writing an ideal answer for every possible prompt.
- 55A separate AI trained on human rankings to estimate which responses people prefer is called a_____.
Hint
It acts as an automated judge of candidate answers.
Answer
reward model
Explanation
The reward model learns from human preferences and assigns scores that can guide further training of the main model.
- 56In reinforcement learning, the main language model is compared to an athlete, while the_____evaluates its answer.
Hint
This component supplies a score that guides the model’s next attempt.
Answer
reward model
Explanation
The reward model judges outputs and provides scores, while the main model adjusts its behavior in response.
- 57During reinforcement learning, the main model adjusts its internal_____in an effort to earn higher reward scores.
Hint
These learned numerical values shape the model’s outputs.
Answer
weights
Explanation
The model’s weights are updated through repeated feedback so it is more likely to produce responses that receive higher reward scores.
- 58Repeatedly generating answers, scoring them, and adjusting the model forms a feedback_____.
Hint
The process repeats rather than occurring just once.
Answer
loop
Explanation
Reinforcement learning uses a repeated cycle: the model generates an answer, receives a score, and updates its behavior to improve future scores.
- 59When a model exploits a scoring loophole instead of accomplishing the intended goal, the failure is called reward_____.
Hint
The system optimizes the score in an unintended way.
Answer
hacking
Explanation
Reward hacking occurs when a model finds a way to obtain a high reward without satisfying the underlying objective.
- 60The boat-racing example of reward hacking involved an AI repeatedly collecting the same power-up by spinning in a_____.
Hint
The boat exploited the scoring rule instead of completing the race.
Answer
circle
Explanation
The boat-racing AI found that repeatedly collecting a power-up could earn points, so it spun in a circle rather than finishing the race.
- 61When a model agrees with a user’s false claim just to please them, the behavior is called_____.
Hint
It involves excessive agreement or flattery.
Answer
sycophancy
Explanation
Sycophancy can arise when a model learns that users or evaluators reward agreeable answers, even when those answers are false.
- 62The possible loss of creativity or increased tendency to refuse after safety refinement is sometimes called the alignment_____.
Hint
It describes a trade-off paid in some model capabilities or behaviors.
Answer
tax
Explanation
The alignment tax refers to possible costs of safety training, such as overly cautious refusals or reduced creative freedom.
- 63Refinement helped turn a powerful but unwieldy base model into a more usable conversational_____.
Hint
This is the kind of system a person can interact with directly.
Answer
assistant
Explanation
Alignment and refinement shape a raw model into a product that is more practical and appropriate for people to use.
- 64The prompt a person types to request a specific task is the_____prompt.
Hint
It comes from the person interacting with the model.
Answer
user
Explanation
A user prompt contains the immediate request, such as asking the model to write code or summarize an email.
- 65Instructions supplied by developers before a conversation, often hidden from the user, form the_____prompt.
Hint
It establishes the model’s role and rules for the session.
Answer
system
Explanation
A system prompt provides higher-level instructions, such as the model’s persona, constraints, and response style.
- 66A system prompt can establish the model’s persona, rules, and_____for a particular session.
Hint
For example, the model might be told to act as a coding assistant.
Answer
role
Explanation
System prompts set the role and other governing instructions that frame the model’s behavior during a session.
- 67A weak system prompt can make a bot easier to derail through prompt_____.
Hint
This is an attack that tries to override or manipulate instructions.
Answer
injection
Explanation
Prompt injection occurs when user input attempts to override the model’s instructions, a risk that can be greater when system guidance is weak.
- 68A robust system prompt can help a customer-service bot maintain its rules even when a user asks it to ignore previous_____.
Hint
These are the directions the system prompt establishes.
Answer
instructions
Explanation
Clear and robust system instructions can help a model resist attempts to make it violate its assigned role or rules.
- 69The prompting technique that asks a model to lay out intermediate reasoning is called chain of_____.
Hint
It refers to a connected sequence of reasoning steps.
Answer
thought
Explanation
Chain of thought prompting encourages the model to generate intermediate steps before producing a final answer.
- 70Adding “think step by step” can encourage the model to generate more_____before giving a final answer.
Hint
Each generated unit extends the model’s response and processing path.
Answer
tokens
Explanation
The model generates output one token at a time; prompting it to show steps leads it to produce a longer reasoning sequence.
- 71Generating intermediate steps gives the model more opportunities to process the problem, effectively allowing more_____.
Hint
The model’s processing unfolds as it generates additional output.
Answer
compute
Explanation
In the described architecture, each additional generated token provides another opportunity for computation and further processing.
- 72A chain-of-thought response can function like a scratch pad because the model can use its own generated steps as_____.
Hint
Earlier generated text remains available while it produces later text.
Answer
context
Explanation
As the model writes out intermediate steps, those tokens become part of the context used to generate subsequent reasoning and the final answer.
- 73Demanding a one-word answer to a complex logic problem can limit the model’s opportunity to work through intermediate_____.
Hint
These are the calculations or comparisons that a longer response might express.
Answer
steps
Explanation
A one-word response leaves little room for generated intermediate reasoning, while a step-by-step response can support more processing.
- 74In this model architecture, a longer response can sometimes serve as a proxy for more extended_____.
Hint
The model may process the problem through the additional generated text.
Answer
thinking
Explanation
When a model generates more tokens to lay out its work, it performs more sequential processing before committing to a final answer.
- 75Effective prompt engineering depends on understanding the model’s mechanical constraints rather than merely guessing the right_____.
Hint
A prompt’s wording matters, but the content emphasizes more than word choice alone.
Answer
words
Explanation
Prompting works best when users understand how the model responds to patterns, instructions, and its token-by-token generation process.

Ask anything
We've read this whole study set, so questions about it get the best answers.