Skip to content
Fundamentals

Generative AI: Text, Image, Audio and Video, One Idea

What generative AI is and what generating text, image, audio and video have in common: numbers, patterns, one step at a time and the need to check.

Rodrigo Faustino ·

Call number
FUN-003
Level
Beginner
Reading
10 min
Published
Labs
Tokenizer, Quiz

You write a sentence and get a text. You write another and get an image. You paste a script and hear a voice reading it. You describe a scene and see a video clip. They look like four different technologies, and in part they are: the methods inside aren’t the same. But they share one central idea, and understanding that idea helps you use all of them more calmly and check all of them more critically.

This book explains what generative AI is, shows how text and images are produced, and points out what changes and what stays the same when the type of content changes. If you haven’t read What Is Artificial Intelligence? A Plain-English Explanation yet, you can start there: this book assumes only the general idea that AI learns patterns from examples.

What “generative” means

An AI can do two kinds of things. It can recognize: receive a photo and say “it’s a cat,” or receive an email and say “it’s spam.” Or it can create: receive a request and produce something that didn’t exist, such as a text, an image, a voice or a video. The second family is generative AI.

Two panels side by side. On the left, Recognize: a photo goes in and a label comes out, cat or dog; an email goes in and a label comes out, spam or normal; the answer is a choice among options that already exist. On the right, Create, generative AI: a request goes in, a cat in a hat; something that didn't exist comes out, a new image; the answer is new content, assembled from what the model learned. At the bottom: the name comes from there, generative AI generates content, and it can also recognize, but what distinguishes it is producing text, image, sound or video
Recognizing chooses among options that exist. Creating produces something new.

“New” here doesn’t mean “out of nothing.” The model learned patterns from an enormous number of examples and produces something new based on them. The book How a Language Model Is Trained, in Three Stages tells how this happens for text. For this book, the point is that the result is a new combination, not a copy stored somewhere.

Four types of content, the same kind of request

In every case, you do something similar: you describe in words what you want. What changes is what comes out and the care needed to check it.

A table with four rows and three columns: content, what you ask for and what comes out. Text: a question, an instruction or a draft to continue; a text comes out, made of words, in a way that seems written by a person. Image: a description of the scene, the style and the light; a new image comes out, usually after a few attempts to get it right. Audio: a text to be spoken, or a description of music; a voice reading the text comes out, or a piece of music. Video: a description of a scene, with action and camera movement; a short clip comes out, which needs to be checked frame by frame. At the bottom: for text, image and video, the books in this library teach how to write the request, and for audio the idea is the same
In all of them, you describe in words what you want and the model produces.

The library has books for three of them: How to Structure a Text Prompt, The Parts of an Image Prompt and How to Write a Video Prompt, Scene by Scene. For audio, the same rule holds. The clearer the description, the closer the result gets to what you want.

Text: one piece at a time

A language model doesn’t write an answer all at once, like a person who plans the whole paragraph. It works with tokens, the small pieces the text is cut into, and chooses one piece at a time. For each possible piece, it calculates a chance of being the next one, based on everything already written. One piece is chosen, enters the text, and the process starts over with a slightly longer text.

Four numbered steps, linked by arrows. 1, the request goes in: the text is cut into tokens, which become numbers. 2, the model calculates: for each possible piece, a chance of being the next one. 3, one piece is chosen: the choice follows those chances, and the temperature regulates how much risk it takes. 4, the piece enters the text: the text grows, and the process starts over with it longer, until it finishes. At the bottom: that is why the answer appears gradually on the screen, and why the same question can get different answers
The cycle of a text model: calculate, choose, add, repeat.

Two consequences show up on their own. The first: the answer appears gradually on the screen, because it is in fact produced gradually. The second: since the choice follows chances, not fixed rules, the same question can get different answers. The book Temperature: Why the Same Question Gets Different Answers shows how to regulate that.

To see what a piece is, use the tokenizer below. Type a sentence and see how it gets cut.

LabTokenizerTry it

The o200k_base tokenizer, used in OpenAI's GPT-4o models. Each company has its own, and the counts change from one to another. The ␣ symbol marks a space that is part of the token.

  • Artificial intelligence

    Artificial␣intelligence

    23 characters · 2 words · 2 tokens

  • AI doesn't read words: it reads pieces called tokens.

    AI␣doesn't␣read␣words:␣it␣reads␣pieces␣called␣tokens.

    53 characters · 9 words · 11 tokens

  • unconstitutionally

    unconstitutionally

    18 characters · 1 words · 3 tokens

  • Inteligência artificial

    Inteligência␣artificial

    23 characters · 2 words · 4 tokens

  • Olá, tudo bem?

    Olá,␣tudo␣bem?

    14 characters · 3 words · 5 tokens

Open this lab on its own page →
What to notice: Common words usually become a single piece. Long, rare words or proper names break into several. These pieces are what the model works with.

There is an idea behind the architecture that makes this cycle work well, called attention: the model weighs which parts of the text matter most for choosing the next piece. It was presented in the 2017 paper “Attention Is All You Need,” which proposed the Transformer, an architecture based on attention, without the recurrent and convolutional layers used before in translation tasks. If you want to see what came before it, the books Recurrent Networks (RNNs): How a Network Gains Memory and LSTM: The Three Gates That Decide What to Remember tell that story.

Image: from noise to picture

For images, a widely used method is called diffusion. The idea, in simplified form, is to start from an image of noise, like the static of a TV that is off the air, and clean the noise away gradually, in several steps. The text request guides the cleaning: at each step, the model removes a little noise, in a way that brings the result closer to what was described.

Four boxes linked by arrows, from noise to image. Noise: an image of random dots, with no shape. Step 1: the model removes a little of the noise, guided by your text. Following steps: at each step, shapes and colors get clearer. Image: after several steps, a sharp image is left. Below, a note: in training, the process is the reverse, real images are taken, noise is added gradually, and the model learns to undo that noise, so the image is born from noise and not from a search in a photo bank
Diffusion, in simplified form: start from noise and clean it step by step.

The 2020 paper by Ho, Jain and Abbeel showed that these models, called denoising diffusion probabilistic models, generate high-quality images. What the paper describes is a model trained to undo noise, not a system that searches for ready-made photos. It’s a good antidote to the idea that “AI just pastes pieces of existing images”: the process is one of generation from noise, guided by patterns learned in training.

This doesn’t resolve the copyright and style questions that surround the subject, nor does it make every image safe to use. Whoever is going to publish a generated image should check the tool’s policy and what it says about commercial use. The book Why AI Gets Hands and Text Wrong in Images shows a typical kind of mistake from this family.

Audio and video

Voice, music and video are also generated by models that learned patterns from many examples. The methods vary, and what each tool uses inside isn’t always disclosed. What’s worth knowing, without going into the details, is what this family has in common with the previous ones: the result is born from learned patterns, not from a stored recording or film.

That has a practical consequence. A generated voice can imitate a person’s voice, and a generated video can show something that never happened. That is why checking matters more in these cases. The books Cloned Voices: Spot the Scam and Make a Family Plan and Fake Videos: Warning Signs to Watch For deal with the subject from the protection side.

What stays the same, what changes

Looking at the four types together, you can separate what is common from what is particular.

Three stacked cards. What stays the same: everything becomes numbers, the model learns patterns from many examples, you describe what you want and the model produces something new based on those patterns, and the answer can be wrong and needs checking. What changes: the working piece, which is words in text, dots of color in an image, waves in sound and frames in video; the generation method and the type of mistake also change, since text invents facts, images get hands and letters wrong and video loses continuity. What you do: describe clearly, look at the result like a reviewer and ask again, adjusting one detail at a time. At the bottom: the books on text, image and video prompts in this library apply this rule to each case
Three points that hold for any type of generated content.

The last line is the most useful day to day. For any type of content, the work cycle is similar: describe, look with a reviewer’s eyes and adjust. Whoever treats the result as a draft makes fewer mistakes than whoever treats it as the final answer.

Think before reading the answer

Someone says: “Image AI has a photo bank and just looks for the one most similar to what I asked for.” Is that right?

Answer: no, at least not for the diffusion models described here. In training, they learn to undo noise, and in generation they start from noise and clean it in steps, guided by the request. There is no search in a photo bank. That doesn’t mean the result never resembles something that exists, and it doesn’t eliminate the copyright questions. But the idea of a “photo collage” doesn’t describe the process.

Test what you took in

Five questions about what generative AI is and what the types of content have in common.

LabQuiz: generative AITry it

Generative AI: what do you remember?

  1. Question 1 of 5

    What distinguishes generative AI from an AI that only classifies?

    • It only works with images
    • It produces new content, such as text, image, sound or video, instead of just choosing a label
    • It never makes mistakes
    • It doesn't use numbers
    Show answer

    Right answer: B. Classifying is choosing among options that already exist. Generating is producing something that didn't exist, from what the model learned.

  2. Question 2 of 5

    How does a text model write an answer?

    • It looks for a ready-made answer in a bank of texts and copies it
    • It writes one piece (token) at a time, calculating the chance of each next piece based on what is already written
    • It writes everything at once and then erases what was wrong
    • It asks a person and repeats the answer
    Show answer

    Right answer: B. The model chooses the next piece, adds it to the text and repeats. That is why the answer appears gradually.

  3. Question 3 of 5

    In the simplified idea of diffusion, where does an image come from?

    • From a photo chosen from an image bank
    • From noise that the model cleans in several steps, guided by the text of the request
    • From a drawing made by a person and copied
    • From a list of randomly drawn colors, with no steps
    Show answer

    Right answer: B. In training, the model learns to undo noise. In generation, it starts from noise and removes a little at each step, guided by the request.

  4. Question 4 of 5

    What stays the same across generating text, image, audio and video?

    • The type of mistake the AI makes
    • Everything becomes numbers, the model learns patterns from many examples, and the result needs checking
    • The time each generation takes
    • The need for internet on your device
    Show answer

    Right answer: B. The mistakes and the generation method change, but the idea of learning patterns, producing something new and checking the result holds for all of them.

  5. Question 5 of 5

    Why can the same question get different answers from a text model?

    • Because the model forgets the question
    • Because the choice of each piece follows chances, and there is a draw among the most probable ones
    • Because the model copies answers from other people
    • Because the keyboard changes the answer
    Show answer

    Right answer: B. The choice of the next piece involves chances, and the temperature regulates how much risk the model takes. See the book on temperature.

Open this lab on its own page →
What to notice: If you missed the question about text, reread the part about the cycle of one piece at a time. If you missed the one about images, notice that generation starts from noise and not from a photo bank.

Common mistakes and precautions

Thinking the AI “knows” what it is saying. It produces what is probable, given what it learned. That can be right, and it can be wrong with the same confidence.

Thinking a generated image is a collage of photos. In diffusion models, the image is born from noise, guided by learned patterns.

Treating the result as final. In text, image, audio and video, the result is a draft that needs checking.

Forgetting rights and commercial use. Before publishing, read the tool’s policy and check what it says about using what was generated.

Trusting a voice or video just because it seems real. Today it’s possible to generate convincing voices and videos of people who never said or did that.

Mixing up types of mistakes. Text tends to make up facts, images tend to get details like hands and letters wrong, and video tends to lose continuity. Know what to check in each case.

To keep going

References

  1. Vaswani, Ashish; et al.. Attention Is All You Need, The Transformer architecture, based on attention, which is at the origin of today's language models (2017). Consultado em Nov 28, 2026.
  2. Ho, Jonathan; Jain, Ajay; Abbeel, Pieter. Denoising Diffusion Probabilistic Models, Diffusion models for image synthesis, which learn to undo noise step by step (2020). Consultado em Nov 28, 2026.

On the same shelf3 books