For everyone — A machine guesses the next word
Think of your phone's keyboard, which suggests words to complete your sentences. A large language model (LLM) is exactly that autocomplete, but pushed to a vertiginous scale: it does nothing else, all the time, but guess which word (or which piece of a word) is most likely to come next — then the next word, and the next word again, until a whole text has been produced. Out of this repeated guess, billions of times, astonishing results emerge: an article summary, a commented math exercise, a small program, a conversation that seems natural.
Why care about it if you're not a computer scientist? Because these systems are becoming everyday work tools — education, healthcare, justice, journalism — and you can neither use them soundly, nor debate their effects on society, without understanding a minimum of their mechanics. One essential point: the model doesn't check what it asserts; it produces the plausible, sometimes false, with assurance. Starting from that solid ground, you can then understand how to make it more reliable — by giving it tools, sources, guardrails — rather than taking it at its word.
For Yokul, this is not an end in itself but one brick among others: the organization builds virtual worlds where actors perceive, learn, and transmit, and it sees the LLM as a "probabilistic orchestrator of exact components". It is not entrusted with the rules of the world, neither physics nor genetics; it is plugged in as a dialogue, narration, or planning layer, interchangeable — like legos you can remove, test, or replace without dismantling the base. The rest of the article describes precisely this mechanics, from the inside.
The full text
A LLM predicts the next token. Behind that minimal formula: a transformer architecture, billions of parameters, and a training on vast text corpora. The rest — translation, code, apparent reasoning, conversation — is a side effect of that prediction, executed billions of times at an unprecedented scale.
This article describes how it works from the inside, then allows itself a broadening: what this mechanics makes possible beyond language, and what it should make us collectively question. The technical part owes a great deal to 3Blue1Brown's Deep learning series, which nourished my understanding of the subject; the forward-looking part owes a great deal to the discussions with the members of the intelligence-artificielle-42.org group.
A prediction, nothing more?
Let's start by taking the formula apart. The model "knows" nothing in the human sense: it assigns a score to every possible token as a continuation of the context, then a sampling step draws the winner. Concretely, for the sequence "The capital of France is", the distribution looks like:
Paris ████████████████████████ 96,2 %
Lyon █ 0,4 %
la 0,3 %
...
Two counter-intuitive consequences follow from this loop:
- Sampling introduces randomness. With a low temperature, the model is predictable and factual; with a high temperature, it explores. The same question asked twice can thus receive two answers. This is not a consistency bug; it is the statistical nature of the object.
- All complex reasoning is a cascade of simple predictions. Writing an algorithm, answering a riddle, planning a trip: every step remains a token prediction, but the composition of these predictions produces behaviors that were coded nowhere.
# La boucle centrale d'un LLM, schématisée
while tokens := prompt + generated:
logits = model(tokens[-ctx:]) # score chaque token possible
next_id = sample(logits, temperature) # tire le prochain token
if next_id == EOS:
break
From words to vectors: embeddings
Before any matrix multiplication, the text is cut into tokens (word pieces, often 2 to 4 characters in French), then each token is projected into a vector space of several thousand dimensions: its embedding.
The remarkable point is that this space is geometrically sensible. Vectors of semantically close words are numerically close, and some relations are directional: the shift that takes you from "king" to "queen" resembles, trivially, the one from "man" to "woman", and the one from "Paris" to "France" to the one from "Tokyo" to "Japan". Nothing imposes this: it is a consequence of the training objective. Predicting the next token forces the model to organize meaning in an exploitable way.
This is the first deep abstraction of LLMs: meaning becomes a geometry, and reasoning becomes a series of transformations in that space.
Attention, the heart of the transformer
The second ingredient, introduced by the paper Attention Is All You Need (2017), is the attention mechanism (self-attention). For each token, the model computes three projections — query, key, value — and each token "looks at" the previous ones to decide what it must take into account.
Example: in "The owner of the garage key that he had lost", the pronoun cannot attach to "garage": attention puts the weight on "owner", the human being mentioned earlier. Attention materializes these links as weights. Unlike RNNs, which read sequentially, the transformer processes the whole sequence at once: this is what made training at very large scale economically viable.
I owe an explicit acknowledgment here to the 3Blue1Brown series on YouTube, run by Grant Sanderson: But what is a GPT? Visual intro to transformers, then Attention in transformers, explained visually (chapters 5 and 6 of the Deep learning series, 2024). The visualizations — matrices laid over the text, attention arrows, query/key/value decomposition — make palpable what research papers make arid. If you are to remember only one resource to understand this mechanism, it's that one:
- Neural networks (series, from 2017)
- But what is a GPT? Visual intro to transformers
- Attention in transformers, explained visually
One intuition to take away from these videos: at no point is it possible to know where such knowledge is stored. It is diffuse, spread over billions of weights, and what the model knows depends on circuits activated by the context. This is precisely why you can neither "ask it to apologize for a mistake", nor cleanly delete a fact: there is no drawer to open.
Training: pre-training, fine-tuning, alignment
In three phases:
- Pre-training — predicting the next token over a corpus of a thousand billion tokens (web texts, books, code). Staggering cost; result: a model that understands the shape of language and of the world as it is described in it.
- Supervised fine-tuning — showing it examples of good behavior (question → useful answer), so that it learns the assistant format rather than the document continuation format.
- Alignment (RLHF and its variants) — human or automated evaluators rank responses, and the model is adjusted to prefer the ones judged helpful, honest, and harmless.
Along the way, capabilities that nobody asked for emerge: following instructions with zero examples (zero-shot), learning from a few examples in the prompt (few-shot / in-context learning), decomposing problems, reasoning "out loud" (chain-of-thought). The observed scaling laws — more data, more parameters, more compute ⇒ predictably better capabilities — are one of the decade's major empirical discoveries.
The known limitations
- Hallucination: the model generates the plausible, not the verified. An invented reference is statistically perfect: it has the shape of a correct reference. Conversely, falsehood has no detectable signature in the distribution.
- Bounded context: anything that doesn't fit must be supplied by tools (search, vector databases, files). And even inside the window, position matters: information in the middle is less well exploited (lost in the middle).
- Fragile reasoning: arithmetic, formal logic, counting — anything requiring exact execution rather than a statistical pattern. Hence the interest in having code run by a real interpreter.
- Knowledge cutoff: the model's world stops at the date of its corpus.
- Cost and latency, although steadily falling for mid-size models.
Properly understanding these limits changes the posture: you don't evaluate a LLM like a database (right/wrong) but like a statistical engine of plausibility, to be controlled at the periphery.
Working around the limits: tools, RAG, agents
Engineering's answer is not a better model, but an architecture around the model:
- Retrieval-augmented generation (RAG): retrieving the relevant documents and putting them into the context, so that the answer rests on verified sources.
- Tool calling (function calling): the model decides to call a function — calculator, API, rule engine — and incorporates the result. Precision is no longer in the model; it is in the interface contract.
- Agents and loops: the model plans, acts, observes the result of its action, and starts again. This is the pattern of code agents like Mistral Vibe, which reads a repository, writes files, tests them, and iterates — and the pattern described in Vibe coding and the rework of yokul.org.
It is an interesting reversal: the LLM, supposed to know everything, becomes above all a probabilistic orchestrator of exact components.
A universal abstraction — discussions around AI
One point comes up often in the exchanges with the members of the intelligence-artificielle-42.org group: the real innovation of LLMs is not linguistic, it is an abstraction. "Saying what you want in natural language" has become a universal interface — to code, data, images, plans of action. It used to be the programmers' privilege; it is now a usage that can be generalized.
Three levels of usage follow from this abstraction, which map well onto the group's discussions:
| Level | What you delegate | Example |
|---|---|---|
| Task | a precise operation | summarizing, translating, extracting fields |
| Business | a bounded process | sorting customer support requests, preparing a requirements document |
| Cognitive | a share of decision and creation | autonomous agent, co-writing, actor simulation |
The higher you go, the more spectacular the generalization — the same model, without re-training, changes domain — and the more critical human supervision becomes. The LLM is remarkably general: that is exactly why it doesn't know, on its own, when it is wrong. The judgment of relevance remains outside the model.
For a project like Yokul, this reading is decisive: the LLM does not replace the rules of the simulated world; it offers a generic layer of transmission and planning, interchangeable — like any component of the base.
Societal and ethical impacts
Same exchanges, collective angle. The points that have consensus in our discussions — none of them speculative:
- Work and skills. LLMs mostly augment cognitive activities: writing, code, analysis, support. The question is less "which jobs disappear" than "which skills remain differentiating": framing, verification, accountability.
- Disinformation at scale. When convincing content costs zero, scarcity moves: it is no longer in the emitting but in the verifying.
- Data provenance and copyright. Training corpora absorbed works without consent or compensation; ongoing lawsuits will redraw the framework.
- Bias. The model gives the statistical bias of its corpora a fluent, assured voice — hence more persuasive than that of a table of numbers.
- Environmental cost. Training and inference consume energy, cooling water, materials; efficiency per request improves, volume grows faster.
- Concentration and sovereignty. Building a cutting-edge model costs hundreds of millions; few players can keep up. Hence the importance of open weight models (cf. Mistral AI, the models and the ecosystem) for Europe and for independent projects.
- Cognitive dependence. Delegating writing or reasoning without practicing it yourself atrophies the skills you delegate. At school, as at work, the pedagogical question matters as much as the productive one.
The LLM in the architecture
Used well, a LLM is a component: exposed behind an interface, tested like a component, substitutable like one. It is the thesis defended in the article Artificial intelligence and cognitive systems.
Three practical rules follow:
- Isolate behind a port. The rest of the code depends on an interface, not on a supplier; the component doing the work behind the scenes (back-end) can be Mistral, GPT, a hosted open weight, or a deterministic stub — fixed responses — in tests.
- Test through contracts. Stochastic (random) behavior ⇒ property-based tests (format, mentions, constraints), regression samples, deterministic guardrails on output.
- Never trust plausibility. Any output that triggers an action goes through a validation: schema, rules, human. Verification is a certification job, not the model's.
Going further
- 3Blue1Brown, the Deep learning series and the transformer chapters cited above — the best visual entry point.
- Attention Is All You Need, Vaswani et al., 2017 — the transformer's founding paper.
- The discussions of the intelligence-artificielle-42.org group — for the abstraction, the generalization of uses, and the ethical debate.
- And on this site: Artificial intelligence and cognitive systems, Mistral AI, the models and the ecosystem, Bayesian networks — the other face, explicit, of uncertainty; and, for the genealogy of the dialogue: Answering without understanding.
- And to move from usage to mastery: The state of the art in fine-tuning, Continuous integration, from software to language models, Self-hosting LLMs and distributing execution to agents — download the model, tune it on your own corpora, and wire it at the head of a production pipeline.