01

Turning text into numbers

Computers work with numbers, so text is split into tokens—words or word fragments—and each token is mapped to a list of numbers called an embedding. Similar meanings end up with similar embeddings. A model processes long sequences of these vectors, building a mathematical representation of the context.

02

Attention

The transformer architecture, introduced in 2017, uses a mechanism called attention. For each token, the model weighs how relevant every other token in the context is. In ‘The bank raised rates’, attention helps the model link ‘bank’ to ‘rates’ and interpret it as a financial institution rather than a riverbank.

03

Learning from scale

During pre-training, a model sees huge amounts of text and adjusts billions of internal parameters to improve its predictions. Abilities such as translation, summarising and coding emerge from this training rather than being programmed rule by rule. Further fine-tuning, including reinforcement learning from human feedback, teaches the model to follow instructions and avoid harmful outputs.

04

Strengths and limits

Language models can draft, explain and reason across many subjects, but they can also produce confident-sounding errors, sometimes called hallucinations. Their knowledge reflects their training data and cutoff dates. Connecting models to search tools, documents and calculators, and having people check important outputs, helps make them more reliable.

FOLLOW THE EVIDENCE

Sources & further reading

Figures are rounded and widely published; check the linked organisations for the latest editions. These organisations do not endorse this website.