# What Is Generative AI? Text Built One Token at a Time, Images Built Out of Noise

Why "generative" means learning what is plausible next and taking many small random steps — the one recipe behind next-token text and diffusion images, and what it implies about AI-generated content.

> generative ai basics · diffusion models · next-token prediction · About 7 min · Nov 16

## Key points

1. Generative AI is AI whose output is new data of the kind it was trained on, as opposed to a classifier, which outputs a label or score; most AI in daily use is not generative.
2. A generative model cannot memorize outputs because the space of possible outputs is vastly larger than any dataset, so it learns a probability distribution — a likelihood for each possible next piece — and generation means sampling from it.
3. The "new" in AI-generated content comes from randomness inside that loop, not from a database look-up: same weights, different draw, different paragraph or picture.
4. Text models apply the recipe one token at a time, feeding each choice back as input, with temperature controlling how peaked or flat the sampling is.
5. Image diffusion models apply the same recipe with a different unit: train a network to remove a little noise, then start from pure noise and run that cleaning step a few dozen times until an image appears.
6. Both families share one mechanism — score local plausibility, take many small partly random steps — and differ only in what one step produces.
7. Because nothing in the loop tracks sources, generated content is new but shaped by its training data, cannot cite where anything came from, is not reproducible by default, and can be fluently wrong.

---

You type "a red bicycle leaning against a lighthouse in the rain" and a few seconds later there is a picture. No one photographed that scene, and the model didn't search a library of images and stitch one together. It built the picture from patterns and numbers.

That word — generative — sounds like marketing. It isn't. It names one specific piece of engineering, and once you see it, text chatbots, image tools, voice cloning and video generators turn out to be variations on the same trick.

**Generative AI is AI whose output is new data of the same kind it was trained on** — sentences, pictures, audio, code — rather than a label, a score or a decision.

## Generative AI vs other AI: sorting versus making

Most AI you encounter does not generate anything. Go back to the spam filter from [the last article](https://eulore.ai/articles/what-is-machine-learning-vs-deep-learning-76ef0112): it reads an email and outputs one thing, spam or not spam. It learned a boundary between two categories. Ask it to write an email and it has nothing to say — producing text was never its job.

Train a model on the same pile of emails and ask a different question: *what does an email look like?* Which words follow which, how a subject line tends to be shaped, how a sign-off usually reads. Give that model a first line and it will continue it, producing an email that resembles the ones it saw without being any of them.

**A classifier learns where the boundary between categories is; a generative model learns the shape of the data itself.** Both are machine learning, both are usually built from deep networks — last time's question of who chooses the features doesn't change — but the output differs in kind. That's also why "AI" and "generative AI" aren't synonyms: spam filtering, fraud scoring, recommendations and search ranking are all AI, and none of them produce content.

## The core idea: learn what's plausible, then take many small random steps

Why not just store every possible output and look the right one up?

Because the possibilities are unimaginable in number. A reply of just 20 tokens drawn from a vocabulary of 50,000 allows $50{,}000^{20}$ possible strings — a number with about 94 digits. No dataset holds them. Memorization is off the table, so something else has to happen.

What the model learns instead is a **probability distribution**: for each possible next piece, a likelihood. Picture a list of candidates, each with a number saying how likely it is given everything already present. The network doesn't store answers; it stores this scoring ability, compressed into its weights.

Generation then means **sampling**: drawing one candidate at random, in proportion to those likelihoods. Not always the tallest bar — actually rolling the weighted wheel. One detail explains a lot of behavior you've noticed: the likelihoods are why the output is usually sensible, and the randomness is why the same prompt gives a different answer on Tuesday.

So the shared recipe has two ingredients:

1. Learn from data how plausible each possible next piece is, given what's already there.
2. Build the output from many small, partly random steps, each conditioned on what exists so far.

Text models and image models both follow it. They differ in what counts as "a piece."

```mermaid
flowchart LR
  A["Training data"] --> B["Model learns what is plausible, locally"]
  B --> C["Text: score the next token, sample one, append it, repeat"]
  B --> D["Image: score the noise, subtract a little, repeat from pure noise"]
  C --> E["New text"]
  D --> F["New image"]
```

## How generative AI writes text, one token at a time

An LLM — a large language model — is the text version of this recipe. "Large" means billions of adjustable weights; "language model" means it scores possible next pieces of text. The pieces are **tokens**: chunks roughly the size of a word, sometimes a word fragment. Because any text can be cut into tokens, "what comes next" is a question you can ask at every point in a sentence.

The loop, which is what people mean by *autoregressive*:

1. Feed in the prompt plus everything generated so far.
2. The model produces a likelihood for every candidate token — tens of thousands of them.
3. Sample one.
4. Append it and go back to step 1.

Stop when the model emits an end-of-sequence token or hits a length limit. A dial called **temperature** reshapes the wheel before each draw: turn it down and the model almost always takes the most likely token, producing safe, repetitive text; turn it up and unlikely tokens get a real chance, producing variety along with mistakes [4].

Notice what the model never does: it never plans the paragraph. At each step it makes one small decision — given these words, which piece fits? — and the paragraph accumulates from those decisions. That's exactly why the output reads so fluently, since each decision is easy and locally plausible. It's also why it can be fluently wrong: *plausible next* is not the same as *true*. That gets its own treatment later in this series.

## How generative AI makes images: start with noise, clean it up

You'd expect the image case to reuse the token loop, and early attempts tried something like it. It works badly. A 512×512 color image is 786,432 numbers, and pixel values have no natural order to append them in. Guess them one at a time and you get static, not a bicycle.

Diffusion models — the approach behind Stable Diffusion, DALL·E 2 and most image and video generators — change what the model is asked to do. **Don't learn to draw. Learn to clean** [1][2].

Training runs backwards from the finished picture. Take a real photo, add a small amount of random noise, and ask the network to remove it. Do that at every noise level, from nearly-clean to almost-destroyed. The network's job is never "make an image" — it's "given this partly corrupted thing, say what the corruption is and take a bit of it away." That's a much smaller, learnable question.

Generation runs the process the other way. Start with pure random noise — literally static, no hidden picture inside it — and apply the learned cleaning step once. Now you have slightly less random static. Apply it again, and again, a few dozen times. Around step ten the layout firms up, later steps sharpen edges and texture, and near the end the scene is unmistakable. Asking a diffusion tool for more sampling steps means asking for a finer-grained set of cleanups; fewer steps run faster and lose fine detail [2].

![From left to right, a diffusion model's output after progressively more denoising steps: dense random noise first, then recognizable buildings, then a clear image.](https://i0.wp.com/chalkdustmagazine.com/wp-content/uploads/2025/03/Screenshot-2025-03-09-at-15.37.57-e1742198953802.png?fit=1047%2C450&ssl=1)

Your words enter through a separate text encoder that turns the prompt into numbers, and the cleaning network consults those numbers at every step — which is why swapping one word shifts the whole picture rather than one corner of it [3]. One production detail worth knowing: systems like Stable Diffusion don't clean full-resolution pixels. They compress each image into a much smaller grid of numbers (roughly 48× fewer values), run the denoising loop in that compressed space, and decode back to pixels once at the end. That's what makes a few dozen steps affordable [3].

## Why one core idea produces both

| | Text (LLM) | Image (diffusion) |
|---|---|---|
| What must be produced | a sequence of tokens | a grid of pixel values |
| Why not in one shot | astronomically many possible strings | ~800k numbers, no natural order |
| The "small piece" | one token | one small cleaning step |
| Where the loop starts | your prompt | pure random noise |
| How often it repeats | once per token | a few dozen times |
| What your prompt does | becomes the beginning of the sequence | steers every step |

Same two ingredients in both columns: a network that scores local plausibility, and a loop of many small decisions with randomness mixed in. The only difference is what one decision is allowed to be. Change the unit from "a token" to "a bit of noise removed" and the same machinery produces a picture instead of a paragraph.

## What "AI-generated content" does and doesn't tell you

If you remember the recipe, several everyday puzzles stop being mysterious.

**It's new, but not arbitrary.** The output generally isn't copied from one source — it's freshly sampled. Yet every likelihood in the wheel came from the training data, so subject matter, style and biases in that data show up in outputs.

**It can't cite.** Nothing in the loop records which training examples pushed which token higher, so "where did you get that?" has no honest answer available. That's a structural fact about the method, not a lack of effort.

**Same prompt, different output.** Randomness sits inside the loop, not on top of it. Reproducibility has to be engineered deliberately.

**Fluent is not true.** Each step is judged for plausibility alone, so a sentence that continues smoothly can be entirely fabricated.

One place where the picture simplifies: the weighted-wheel image suggests a visible list with numbers next to it, when in reality a network computes those likelihoods from the whole preceding context. And "noise" is not a hidden image buried in static that the model uncovers — it's random numbers, and the model applies learned statistics to them. What survives both simplifications is the actual mechanism: score the possibilities, take a small random step, repeat until done.

## Mind map

```mermaid
flowchart LR
  A["What is generative AI"] --> B["Outputs new data of the same kind<br/>vs a classifier's label"]
  A --> C["Core idea: learn a probability distribution, then sample"]
  C --> D["Text: one token per step, fed back, repeated"]
  C --> E["Images: learn to denoise, start from noise, repeat"]
  D --> F["Temperature sets how adventurous each draw is"]
  E --> G["The prompt steers every denoising step"]
  F --> H["Why prompts vary, why fluent can be wrong"]
  G --> H
  H --> I["AI-generated content: new, shaped by data, uncitable"]
```

## Glossary

- Generative AI：AI whose output is new data of the same kind it was trained on — text, images, audio — as opposed to a classifier that outputs only a label, score or decision.
- Probability distribution：the list of possible "next pieces," each with a likelihood attached; the model learns this list rather than storing answers.
- Sampling：drawing one candidate at random in proportion to its likelihood, instead of always taking the highest one — the reason the same prompt yields different results.
- Autoregressive：feeding each chosen token back into the input before predicting the next one, so the whole passage grows out of a single-token loop.
- Temperature：the dial that reshapes the sampling distribution before each draw — lower is steadier and more repetitive, higher is more varied and more error-prone.
- Diffusion model：a model trained to remove a little noise from a corrupted image, then used in reverse from pure noise so a picture emerges over many steps.
- AI-generated content：output produced by this sampling loop — new, but shaped by training data, without source records, not reproducible by default, and fluent without being true.

## Sources

1. [Chalkdust: A beginner's mathematical guide to AI diffusion models — forward noising, learned reverse denoising, and sampling from pure noise](https://chalkdustmagazine.com/features/what-a-load-of-noise/)
2. [IBM Think: What are diffusion models? — the three stages of diffusion and how step count trades speed against detail](https://www.ibm.com/think/topics/diffusion-models)
3. [Jay Alammar: The Illustrated Stable Diffusion — latent-space diffusion, autoencoder compression, and text conditioning](https://jalammar.github.io/illustrated-stable-diffusion/)
4. [Towson Pressbooks: Generative AI and Large Language Models — autoregressive next-token prediction, token probabilities and temperature](https://pressbooks.towson.edu/appliedai/chapter/generative-ai-and-large-language-models/)

---

Original article: https://eulore.ai/articles/what-is-generative-ai-3a95f306

> **Eulore** · Start small. Go deep.
>
> Eulore is an AI learning tool built around connected articles, each a 5–10 minute read. Ask questions as you go and help shape what comes next. That’s how this article was created.
>
> Start your own series → https://eulore.ai
