🎧 Before you begin
Simon & Garfunkel — Mrs. Robinson

A friend is turning fifty, and you’d like to write something less predictable than the usual “Happy birthday.” You ask ChatGPT for a warm message, with a joke about how he’s always losing his keys.

A few seconds later, you get something like this:

Fifty, and still plenty of doors to open. Once you find your keys, of course.

But where did that sentence come from?

It’s easy to imagine ChatGPT looking up a suitable birthday message somewhere and passing it on to you. That’s how we tend to think of a Google search: we type something in and look through the pages it finds.

Here, though, the sentence doesn’t need to exist already. The model can put it together in response to your request. That’s what generative means in this case.

A reply that takes shape as you read

Let’s try something simple.

If I write: Happy

you might think of birthday. But New Year or anniversary would fit too. It depends on what came before.

If I’ve just told you that a friend is turning fifty today, “birthday” becomes a much more likely choice.

A language model works a little like that, though this is a very simplified picture. It uses the text available to it to predict what could come next, then repeats the process, taking into account what it has just written. 

The answer is built in small pieces called tokens. A token can be a whole word, part of a word, or a punctuation mark.

You don’t need to know how tokens work to use ChatGPT. What matters here is that the answer is generated gradually, with each new piece becoming part of the text the model uses to produce the next. OpenAI Help Center

How does it know what comes next?

Of course, there’s more to writing a useful answer than guessing that “birthday” might follow “happy.”

During training, a large language model learns patterns from huge amounts of text: how sentences are put together, which words tend to appear together, and how a formal letter differs from a message to a friend. It also learns relationships between concepts. OpenAI Help Center

Ask it to explain photosynthesis to a child. It doesn’t need to have seen that exact question and answer before. It can draw on what it has learned about photosynthesis, the language you’re using, and ways of explaining things to children.

That doesn’t mean there’s a giant library inside the model, ready to be searched. Instead, there are huge numbers of numerical values, adjusted during training to reflect patterns and relationships in the data. Those values are called parameters. OpenAI Help Center

We can leave the mathematics there for now. The important idea is that the model doesn’t need to find a ready-made sentence before it can write one.

Isn’t that just autocomplete?

The comparison makes sense. When your phone’s keyboard suggests the next word in a message, it’s also trying to predict what you might write.

There’s a similarity, but the comparison only takes us so far. Large language models can draw on much richer relationships and take more context into account.

Think back to your friend’s birthday. You didn’t just ask for a birthday message. You said he was turning fifty, that you wanted it to sound warm, and that he kept losing his keys.

Those details help shape the reply.

Tell the model instead that he’s started growing tomatoes on his balcony, and you might get a joke about the harvest. It doesn’t need to have heard of your friend—or his tomatoes. You’ve just supplied that information.

That brings us to another useful word: context.

The model draws on what it learned during training, but it also works with the information available in the conversation. What it learned before you started chatting and what you tell it now are two different things. Both help shape the answer. 2026-09-10-cosa-fa-ia-generativa

Why does it seem to understand?

Try asking:

❝

Rewrite this sentence so it sounds a little friendlier.

To do that well, the model has to keep your meaning while finding a less abrupt way to express it.

Or ask it to explain the same idea to a child and then to a university student. The basic information can stay the same while the words, examples, and level of detail change. Your instructions help guide those choices. OpenAI Help Center

That flexibility makes the conversation feel different from using many other programs. Instead of finding the right command, you can describe what you need in ordinary language and let the model put together a reply.

But there’s a distinction worth keeping in mind:

An answer can sound right and still be wrong.

The process that produces a clear explanation can also produce a convincing mistake. A fluent sentence isn’t, by itself, evidence that the information in it is true. OpenAI Help Center

We’ll come back to those mistakes soon. They deserve an article of their own.

For now, let’s return to the birthday message. The joke about the keys came from what the model had learned and what you told it about your friend. Give it different details, and the answer can change too.

That leaves us with a practical question: what should we tell an AI to get a useful answer?

Next time, we’ll look at prompts—the instructions we give these systems—and how they affect the answers we get back. We’ll treat them as a way to explain what we need, rather than as magic formulas to memorize.

Further reading

OpenAI’s How ChatGPT and our foundation models are developed offers an introduction to training and how models generate responses. OpenAI Help Center

Recommended for you

View all
caret-right