Skip to content

P1-10.2 The Intuition of Next-Output Generation

Section ID: P1-10.2 Version: v2026.07.20

Section 10.1 separated classification, prediction, and generation. Classification chooses a category, prediction estimates a value or state, and generation creates a new artifact that fits a condition.

This section explains only the broadest intuition of how generation happens.

The central question is:

does generative AI produce a finished answer all at once,
or does it build the artifact by extending small output pieces step by step?

The introductory baseline is:

generative AI usually constructs an artifact by producing the next output piece from a condition, then using that result as part of the condition for the next step

Part 1 introduces the basic distinctions among next-output generation, the intuition of next-token prediction, sequential generation of audio samples, and the intuition of diffusion as gradual restoration. Section 10.1 first separated the output types of classification, prediction, and generation. This section focuses only on the computational intuition of how generation continues. The detailed structures and equations return in later parts.

This does not mean every model works in exactly the same way. Text generation, audio generation, and image generation can share the broad intuition of iterative generation, but their actual units and algorithms are different.

Here, this section first closes the question of whether generation pulls out a finished artifact all at once, or builds one by continuing small output pieces. Tokenization returns in Part 6 P6-1.1 and P6-1.2, next-token prediction in P6-5.1, sampling and temperature in Part 5 P5-15.3 and Part 6 P6-5.2, Transformer structure in P1-11.3 and Parts 5 and 6, and prompts and evaluation in P1-12.1 through P1-12.3. The detailed structure of diffusion models is not introduced here first.

These terms can all sound like one common generation algorithm at first. A quick distinction helps:

Term Very short meaning Role in this section
next-output generation the intuition of building an artifact by continuing small pieces the broad frame for looking at generation
next-token prediction computing the next token candidate from context the basic intuition of text generation
audio-sample generation continuing the next sample from previous waveform information the sequential intuition of speech generation
diffusion restoration reducing noise step by step to recover an image the point that image generation differs from text generation
sampling the procedure that selects one output from candidates part of why the same input can still lead to different results

The minimum distinction to keep is:

  • text uses next tokens
  • speech uses next samples
  • images are often better understood as a restoration process
  • sampling is a selection procedure

The baseline intuition here is:

read the condition
compute possible next-output candidates
select or restore one output
continue the next step from that result

This section also does not discuss how to judge a good generated result. That question is separated in 10.3 into quality, evidence, safety, and rights.

Building Generation from Small Output Pieces

  • Understand that generative AI may look as if it pulls out a finished artifact at once, but is more safely understood as an iterative generation process.
  • Understand that in text generation, the unit of the next token is important.
  • Understand that in speech generation, audio samples or waveform fragments can also be handled sequentially.
  • Distinguish image generation from a simple next pixel story, especially because diffusion-style models are better understood as gradual restoration from noise.
  • Remember that next-output generation is an introductory intuition, not a complete algorithmic description of every generative model.

Three Standards

Standard Why it matters Level of understanding needed here
generation can continue step by step rather than appearing all at once This makes generative AI look more like a real computational process than a magical one. It is enough to understand that the system extends small output pieces iteratively.
for text, the intuition of the next token is central This becomes the main handle for later LLM explanation. It is enough to know that the model does not choose the whole sentence at once but keeps choosing the next token candidate.
image and speech also share iterative generation, but their units and methods differ This prevents all generative models from being misunderstood as one identical algorithm. It is enough to understand that iterative generation is a shared intuition, not identical implementation.

Text Is Built by Continuing the Next Token

LLM text generation is usually explained in terms of tokens. A token is not always the same as a human-readable word. It is the basic unit into which text is divided so that the model can process it.

If we simplify tokenization:

original sentence:
studying AI again

easy human word-level view:
studying / AI / again

example of model tokens:
study / ing / AI / again

This is only a teaching example, not the literal output of a real tokenizer. Actual tokenization depends on the model and tokenizer. One word may split into several tokens, and spaces or punctuation may also become part of token boundaries.

The key point is only this:

an LLM does not read a sentence exactly as a human does;
it handles the sentence after dividing it into computable pieces called tokens

Suppose the user enters:

explain in one sentence why someone would study AI again

The model does not pull a complete sentence out of a hidden warehouse. Instead, it treats the previous context as a condition, computes a distribution over possible next tokens, and appends one chosen token to the output.

Simplified:

context:
the reason to study AI again is

next-token candidates:
to
because
rebuilding
recovering
...

Once one token is chosen, the context changes:

context:
the reason to study AI again is to

next-token candidates:
rebuild
recover
understand
adapt
...

By repeating this process, the sentence forms:

the reason to study AI again is to recover the basics and adapt to new technological changes

The GPT-3 paper describes GPT-3 as a 175B-parameter autoregressive language model. The word autoregressive connects directly to the intuition here: previous outputs and context become the condition for the next output.

The Next Token Is Not a Single Fixed Correct Answer

If next-token prediction is understood only as finding the one correct answer, we miss an important feature of generative AI. Even in the same context, multiple next-token candidates may be possible.

context:
the key point of today's meeting is

possible next tokens:
schedule
risk
decision
cost

The model may assign scores to these candidates. But which one is actually chosen can still depend on model settings and generation method.

That is why generated outputs have the following properties:

Property Meaning
probabilistic choice the same input can still yield different outputs
context dependency the previous context changes the next candidates
accumulation effect earlier output choices become conditions for later output
error accumulation an earlier bad choice can distort the rest of the sentence

So it is safer to read generative output as:

an artifact built by continuing computed candidates

Even a plausible sentence does not automatically come with guaranteed evidence.

Speech Can Also Be Understood as Sequential Generation

Audio generation can also be understood through a sequential intuition. The WaveNet paper proposed a generative model that works directly on raw audio waveforms and explains the waveform probability as a product of conditional probabilities over previous samples.

The introductory baseline is:

previous audio samples
-> candidate distribution for the next sample
-> choose a sample
-> move to the next step

This resembles next-token generation in text. The difference is the generation unit:

Domain Example generation unit Intuition
text token build a sentence by continuing the next token
speech audio sample, waveform fragment build sound by continuing the next waveform value

The point of this comparison is not to say text and speech use the same model. The point is narrower:

generation can be understood not as pulling out a finished object at once,
but as continuing the next piece based on the condition so far

Images Are Not Explained Well by Next Pixel Alone

Image generation should be explained more carefully. Saying only the model predicts one pixel after another may fit some models, but it is too narrow to explain modern image generation as a whole.

In particular, diffusion models differ from text generation. They do not simply append the next token from left to right. Ho and colleagues describe denoising diffusion probabilistic models as using a process that adds noise and a reverse process that removes it. At the introductory level, the intuition is:

start from random noise
use the condition and learned patterns to reduce the noise a little
repeat that many times
gradually restore something closer to an image

The Latent Diffusion Models paper showed that diffusion can be carried out in a lower-dimensional latent space and conditioned through cross-attention for tasks such as text-to-image synthesis.

So image generation is safer to phrase this way:

text generation:
it is easy to explain it as continuing the next token

image generation:
it is important to understand it as gradually restoring noise or latent representations under conditions

There is still a common point. Both build an artifact progressively from conditions. But their generation units and computational methods differ.

The Same Prompt Is Processed Differently Depending on the Generation Method

Suppose the user asks:

create a calm cover image for someone studying AI again

A text model may generate a descriptive passage or prompt-like sentence:

on a dark desk sit a laptop and an open notebook,
and a faint neural-network diagram glows on the screen

An image-generation model may instead use that sentence as a condition and progressively construct the image representation.

condition:
calm cover, AI restudy, laptop, notebook, neural-network diagram

generation:
start from noise or latent representation, then restore toward an image

From the user's point of view, both are generation. But the internal generation units differ.

Generation Includes Revision and Repetition

An important part of generative-AI use is that one output is rarely the end. The user sees the result and changes the condition again.

first request:
summarize it briefly

second request:
make it sound a little more academic

third request:
add an example that a first-time reader can understand

In this flow, the model output becomes part of the next input:

user condition
-> model output
-> human review
-> revision condition
-> new output

This also connects directly to how this book is made. A draft produced by an AI tool is not the final manuscript. It is material for the next round of review and revision. Generation can produce an artifact, but a person still has to judge whether it is correct, whether it has evidence, and whether it fits the flow of the manuscript.

Checklist

  • I can explain that generative AI can be understood as an iterative generation process rather than as something that pulls out a finished artifact all at once.
  • I can explain the intuition of tokens and next-token prediction in text generation.
  • I can explain that the next token is chosen from a candidate distribution rather than being one fixed correct answer.
  • I can explain the sequential intuition of audio samples in speech generation.
  • I can explain why image generation, especially diffusion models, should not be reduced to simple next-pixel prediction.
  • I can explain why generated outputs need human review and repeated revision.
  • I can explain what the next output unit is and by what condition that unit is selected or restored.
  • I can distinguish that text, speech, and image generation are all iterative, but their units and methods differ.

Sources and Further Reading