← All posts
AI explained · Part 2 of 8 · 3 min read

How an LLM writes: one token at a time

At its core, a large language model does one thing, over and over: it predicts what comes next. Here is why that simple idea produces something so capable, and what it means for how you use it.

Abdul Azize HossenCEO & Chief Consultant, HFC · November 2026

The first time you watch an AI assistant draft a client email, it looks as if it has thought the whole message through before typing. What actually happens is simpler and, in a way, more surprising.

Start with the name

Large means two things: the enormous amount of text the model learned from (books, websites, documentation, conversations, code) and the size of the model itself, which holds billions of numerical settings, called parameters, adjusted during training. You do not need the maths. What matters is that the model has enough capacity to learn very subtle relationships.

Language is what it works with. It does not read the way you do, though. Text is first cut into small pieces called tokens: whole words, parts of words or punctuation.

Model is the result: the mathematical system that holds all those learned patterns and can apply them to something it has never seen before.

Predicting what comes next

Give a model the start of a sentence and it estimates how likely each possible next token is.

“Port Louis is the capital of ____”
  • Mauritius
    Very likely
  • the
    Possible (“the Republic of…”)
  • France
    Unlikely
  • Mars
    Extremely unlikely
Illustrative. The model picks a continuation, adds it to the text, then asks the same question again for the next token.

It picks a token, adds it to the text and asks the same question again. And again. A token becomes a sentence, a sentence a paragraph, a paragraph a full report, each new piece shaped by everything written before it. This happens in fractions of a second, which is why the text seems to flow.

So is it just fancy autocomplete?

Yes and no. The mechanism is the same idea as the suggestion bar on your phone. The scale is not. To predict the next word well across billions of examples, a model has to absorb grammar, writing styles, facts about the world, how ideas relate, common patterns of reasoning, how code is structured and how languages map onto each other.

Nobody programmed “this is how you summarise” or “this is how you explain with an analogy”. Those abilities emerged from learning patterns at scale. That is why the same model can draft a quote follow-up in French, pull the totals out of a supplier bill and explain a lease accounting rule to a new hire.

It also learns relationships between ideas, not only between words. Across enough text, the link between Paris and France looks a lot like the link between Rome and Italy, so the model can generalise to pairs it has rarely seen side by side.

An LLM does not look up an answer. It writes a new one, built from patterns.

Training versus using

Training

The model learns patterns from enormous amounts of information. It happens before you ever use it.

Learn patterns

Using the model

You give it new information and a task. It applies what it learned to your situation.

Apply them to your case
A model may know what invoices generally look like. It has never seen your invoice until you give it one.

This distinction clears up a lot of everyday confusion. A model cannot know your stock levels, a customer’s balance or what was agreed in this morning’s meeting unless that information is put in front of it.

What it means for your business

  • It writes, it does not retrieve. An LLM is not a database of guaranteed facts. It can sound completely convincing and still be wrong, so anything that touches money, customers or compliance gets a check.
  • It is excellent at language work. Summaries, drafts, classification, translation and pulling fields out of documents: this is where it saves hours today.
  • Your data makes it useful. The model brings general skill. Your ERP brings the facts. The value is in connecting the two properly, which is where the rest of this series goes.

Next in the series, part 3: Brilliant and wrong: AI's jagged intelligence

Thinking about AI in your business?

Start with a complimentary consultation. You leave with a clear plan and a quote.

Keep reading