Philippe Buschini

Home/Understanding AI

How does generative AI work?

A seven-chapter guide to what the machine is really doing when it talks to you.

Let’s start with the title of the book these pages come from. Les 100 questions que vous n’avez jamais osé poser. The word that matters here isn’t “questions.” It’s “dared.”

Because AI has pulled off quite a feat. In just three years, it has become an unavoidable part of every conversation, while also turning into a subject no one is willing to admit they don’t understand. Someone throws out “hallucination,” “model,” “prompt,” “token.” We nod along. We make a mental note to look it up later. Later never comes, and six months down the line we’ve built up a small debt of understanding that we no longer dare acknowledge, because by then we feel we really ought to have figured it out.

So let’s get one thing straight from the outset: no one is going to judge you here. If you don’t know what a token is, that’s perfectly normal. In fact, you’re exactly who I’m writing for.

Before we open the hood, a small confession.

In the pages that follow, I’ve cheated. A little. Deliberately.

I’ve talked about maps, neighbourhoods, learned parrots and blind librarians. I’ve compared training an AI to teaching a dog with treats. I’ve said that it “rereads” your sentences and “guesses” the next word. An expert peering over your shoulder would probably wince more than once. Quite rightly, they would say that the reality is more subtle, that this isn’t exactly how it works, that I should qualify, refine and correct what I’ve written.

They would be right. And yet I stand by every one of those images.

Because I made a choice, and I stick to it from beginning to end: given the choice between a slightly wobbly metaphor that helps you understand in ten seconds and a rigorous explanation that loses you in three lines, I’ll choose the metaphor. Every time. My aim isn’t to teach you how to build an artificial intelligence. It’s to help you understand what it does when it talks to you, and why it behaves the way it does. For that, one good image is worth a thousand equations.

So yes, when I write that a word is “placed in a neighbourhood,” the mathematician thinks “vector in a high-dimensional space.” When I say the machine “guesses,” the engineer thinks “samples from a probability distribution.” They’re both right. But for now, you don’t need any of that. You need to understand. The rest can come later, if you ever feel like going further.

One clarification, though, because it matters for what comes next. A metaphor is scaffolding: it helps you climb, but it isn’t somewhere you can live. There always comes a point when it gives way, when we ask it to carry more than it can bear. The learned parrot is a very good way of explaining why a machine can produce perfectly sound sentences without meaning anything by them. It is no help at all when we try to understand why the machine can be so confidently wrong. Whenever an image reaches its limit, I’ll tell you, and I’ll use another one. That is the rule of the game, and I believe it is the only honest way to explain complex ideas simply: not to hide the fact that we are simplifying, but to say where the simplification ends.

So here is what you will find in this series: simple questions, asked plainly, with answers you can read in a few minutes. How the machine learns. Why it makes things up. What it does with what you write. Why it can be brilliant in the morning and hopeless by the afternoon.

And here is what you won’t find: equations, code, or jargon whose main purpose is to impress the neighbours. Nor will you find prophecies, one way or the other. AI is not going to save us or devour us before lunch. It does something quite specific. That something can be explained. And once we understand it, we can have a much better conversation about what to do with it.

And if you happen to be one of those exacting minds, if you’re itching to see what goes on behind the scenes, if you want the full version with the proper terminology and the real mechanisms, you’ll find it all explained in detail in my first book, L’IA expliquée simplement (tome 1). There, you’ll find the rigour I have deliberately set aside here.

For everyone else, those who simply want to understand without getting a headache, let’s begin. We’ll start at the beginning.

The chapters

  1. Forget the brain in the box

    Why you feel as though you are talking to someone, from the Mechanical Turk of 1770 to the cardboard psychotherapist of the 1960s.

    7 min
  2. Words turned into numbers

    How a machine arranges our entire vocabulary on a vast map where a word’s meaning is nothing more than its address.

    8 min
  3. The machine that guesses what comes next

    The single mechanism behind every sentence it produces, the touch of randomness that makes it creative, and what it is doing when it displays ‘Thinking’.

    9 min
  4. How it learnt all this

    The infinite library, followed by training. The two lives of an assistant, and why it learns nothing from you.

    8 min
  5. Why it sometimes talks nonsense

    Hallucinations, the New York lawyer who learnt about them the hard way, and why the problem will never disappear entirely.

    8 min
  6. The distorting mirror

    Its biases are ours, set in mathematical stone. And correcting the mirror raises a problem nobody has yet solved.

    8 min
  7. The art of talking to it

    Four pillars for writing a good prompt, and the end of a confidence trick: no, this is not a technical skill.

    8 min