The Awaken Buddha
Artificial Intelligence
Home›TAB · Future Desk›How ChatGPT-style AI works, in plain words

How ChatGPT-style AI works, in plain words

Chatbots that write, summarise and answer questions run on a type of software called a large language model. Strip away the hype and the idea is surprisingly simple: predict the next piece of text, very well, at enormous scale. Here is…

How ChatGPT-style AI works, in plain words

Illustration: TAB

T

TAB · Future Desk

· 10 min read

One skill, repeated

Every popular chatbot, whichever company makes it, is built around a large language model, usually shortened to LLM. The name tells you most of the story. It is a model of language: a mathematical system that has learned how text tends to go. And it is large: it has absorbed an enormous amount of writing and holds what it learned in a very large number of internal settings.

What an LLM actually does is narrow. Given some text, it predicts what comes next. Google's own course on the subject compares it to autocomplete, the feature on your phone that suggests the next word, except that a language model can keep going for thousands of words. Ask it a question, and it produces the text that, by everything it has learned, most plausibly follows that question. Write half a poem, and it continues the poem.

That sounds too simple to explain an assistant that drafts emails, explains tax rules and writes code. The surprise of the last decade is that, at sufficient scale, being very good at predicting the next piece of text turns out to require, or at least to imitate, a great deal of what we would call knowledge and reasoning.

Step one: chop text into tokens

A model does not read letters or whole words. It reads tokens: chunks of text that may be a whole word, part of a word, or a single character. OpenAI's rule of thumb for English is that one token is about four characters, or about three-quarters of a word, so 100 tokens come to roughly 75 words. The line "You miss 100% of the shots you don't take" is 11 tokens.

Turning text into tokens lets the model handle any word, including names and typos it has never seen, by breaking them into familiar pieces. It is also why AI services usually measure and price their use in tokens rather than words.

From your question to the model's answer, one token at a time.
From your question to the model's answer, one token at a time.Graphic: TAB

Step two: guess the next token, with odds

At each step the model does not pick one word with certainty. It produces a probability for every possible next token. Google's course gives an example: after the sentence "My dog, Max, knows how to perform many traditional dog tricks," a model might give a 3.1 per cent probability to the continuation "For example, he can sit, stay, and roll over."

The model then chooses a token, adds it to the text, and repeats the whole process for the next one. An answer of a few hundred words is a few hundred of these small predictions in a row. That is why replies appear word by word on screen: you are watching the loop run.

Step three: learn from a mountain of text

Where do the probabilities come from? From training. A model starts with its internal numbers, its parameters, set more or less at random. It is shown huge amounts of text with pieces hidden, asked to predict the missing pieces, and nudged slightly towards the right answer every time it is wrong. Repeat that across an enormous library, and the parameters slowly settle into a pattern that captures how language works: grammar, facts that appear often, styles of argument, the shape of a recipe or a legal clause.

The scale is what makes this expensive. Google's course notes that the largest transformer models have hundreds of billions or even trillions of parameters, that bigger models have consistently done better, and that training one at industrial scale takes vast data, computing power and expertise, often over months.

This first stage is called pre-training, which is where the "P" in GPT comes from. GPT stands for generative pre-trained transformer, a family OpenAI introduced in June 2018 with a paper describing exactly this approach: train first on a large amount of unlabelled text, then adapt the model to specific tasks.

The transformer, and the idea of attention

The "T" is the transformer, the design almost every modern language model uses. It was introduced in June 2017 in a paper by eight researchers with a confident title: "Attention Is All You Need". Earlier systems read text in order, one word after another. The transformer dropped that approach and relied on a mechanism called attention. The authors reported better translation quality, and the design could be trained more in parallel and in less time.

More on Artificial IntelligenceHow to learn AI, properly9 min read

Attention answers one question for every token: how much should each of the other tokens affect how I read this one? Google's course uses a neat example. In "The animal didn't cross the street because it was too tired," the word "it" should pay most attention to "animal". Change the ending to "because it was too wide," and "it" should now point to "street". Attention lets the model make that switch by weighing the whole sentence at once.

Attention in one sentence: the same word, 'it', links to a different noun when the ending changes.
Attention in one sentence: the same word, 'it', links to a different noun when the ending changes.Graphic: TAB, after Google's Machine Learning Crash Course

A real model runs many of these attention calculations side by side, called heads, and stacks them in many layers. According to Google's course, earlier layers tend to pick up basic structure such as syntax, while deeper layers capture more abstract things such as sentiment and theme.

Step four: turn a predictor into an assistant

A model fresh from pre-training is a brilliant mimic, not a helpful assistant. It has learned to continue text, not to follow instructions or to keep to the point. Turning it into something that does takes a second round of training.

The approach that made chatbots practical was described in a March 2022 paper on InstructGPT. First, people wrote example answers to a range of prompts, and the model was fine-tuned on those examples. Then people ranked several of the model's own answers from best to worst, and those rankings were used to train the model further. This second step is called reinforcement learning from human feedback, or RLHF.

The effect was striking. In the paper's human evaluations, answers from a 1.3 billion parameter model trained this way were preferred to answers from the original 175 billion parameter GPT-3, a model with more than 100 times as many parameters. The tuned models were also more truthful and less toxic, though the authors noted they still made simple mistakes. The lesson stuck: how a model is taught to behave matters as much as how big it is.

Why it makes things up

Language models sometimes state false things fluently, with no hint of doubt. The industry calls this hallucination, and the mechanism above explains it.

A model is trained to produce likely text, not verified facts. In a September 2025 explainer, OpenAI argued that pre-training teaches consistent patterns, such as spelling and grammar, very well, but cannot reliably learn arbitrary, rarely mentioned facts, such as a particular person's birthday, from patterns alone. Its example: asked for the title of a named researcher's doctoral dissertation, a popular chatbot gave three different titles, all wrong, and three different birthdays, also wrong.

OpenAI also pointed at how models are tested. If a benchmark scores only right answers, then "I don't know" earns nothing, while a confident guess sometimes earns a point. Models trained and judged that way learn to guess. Changing how answers are scored, so that honest uncertainty is not punished, is one of the fixes the company proposed.

What this means for you

Knowing how the machine works makes it easier to use well.

  • Treat answers as drafts. For anything that matters, such as a medical, legal or financial question, a number or a quotation, check it against a primary source.
  • Give it material. A model is at its best working on text you supply, such as summarising a report or reorganising notes, rather than recalling obscure facts.
  • Expect fluency, not certainty. A confident tone is a product of how the text is generated, not a sign that it is right.
  • Remember the costs. Google's course lists high computing and energy costs, and bias inherited from training data, among the open problems.

None of this makes the technology less remarkable. A system that only ever predicts the next token can translate, explain and draft at a level few expected even ten years ago. It simply helps to know that underneath the conversation, that is what it is doing. For the wider field, from early neural networks to today's debates, read TAB's reader's guide to AI; if you want to go hands-on, see how to learn AI, properly.

Sources

Up next

Privacy & the Internet

Is your phone listening to you? What the evidence says

You mention a product out loud and an ad for it appears an hour later. It feels like proof that your phone is eavesdropping. The research points somewhere less cinematic and, in some ways, more unsettling. Here is what has actually been…

TAB · Future Desk · 9 min read

Share

Enjoyed this?

🎨
Artificial Intelligence

Follow this topic — every new article & thread flows into your feed.

From the desk

TAB · Future Desk

Technology, artificial intelligence, science and the evolution of civilization.

More →

Comments (0)

U

No comments yet. Be the first to comment!