Neural Network: The Machine That Learns to Continue a Sentence

By Matthew Parish
Wednesday 2 December 2026
Artificial intelligence is often described as though it were a new kind of person living inside a computer. We speak of a model “knowing” a language, “thinking” through a problem or “deciding” what to say. Such language is convenient, but it can obscure the machinery beneath it. A large language model is built from a mathematical system called a neural network. To understand what the model can do, and why it can also fail, it helps to understand what that system is.
A neural network is a way of finding patterns in information. Its name comes from a loose resemblance to the networks of cells in a biological brain, but the resemblance should not be pushed too far. A computer’s neural network is not made of living cells and does not have a human brain’s experience, senses or desires. It is a large set of mathematical operations arranged so that the system can adjust itself when its answers are wrong.
Imagine a simple task: deciding whether a photograph contains a cat. A computer can represent the image as a grid of numbers, with each number recording something about a pixel’s colour and brightness. The network receives those numbers and passes them through successive stages. At each stage, it combines the information it has received, giving some features greater weight than others. Early stages might respond to edges or patches of colour. Later ones may combine these into shapes that resemble ears, eyes or a face. At the end, the network produces a score indicating how likely it is that the image contains a cat.
The network does not begin with a list of rules written by a programmer: “If you see pointed ears, whiskers and a tail, identify a cat.” Instead, it begins with adjustable numerical values, usually called weights. During training, the system is shown many examples and is asked to make predictions. When it makes a mistake, a mathematical procedure works backwards through the network to estimate how its weights should change. Repeated over vast numbers of examples, this process can make the network better at detecting patterns.
The important point is that the network learns how to map one set of numbers to another. It does not need to be given an explicit account of every feature it should notice. Its performance comes from the adjustments made during training. The resulting system may be useful and sophisticated, but its internal workings are difficult to translate into a neat list of human-readable rules. Its knowledge is distributed across many numerical relationships.
Large language models use neural networks to work with language. Before processing a passage of text, the model divides it into small units called tokens. A token may be a whole word, part of a word or a punctuation mark. The model turns those tokens into numerical representations and passes them through a network. It then estimates which token is most likely to come next, given the tokens that have already appeared.
That may sound like a narrow task, but it is a powerful way of learning from language. To predict the next word in a sentence, a system benefits from learning grammar, the meanings of words, common facts, styles of argument and the ways ideas tend to relate to one another. A model trained to continue text can therefore acquire patterns that support translation, summarisation, question answering and drafting. These abilities emerge from the same basic machinery being applied to different prompts.
Most modern large language models use a neural network design called a transformer. One of its central mechanisms, called attention, helps the model weigh the relevance of different words in the material it has received. In the sentence “The dog chased the ball because it was moving”, the word “it” is more likely to refer to the ball than to the dog. Attention helps the model connect words across a passage rather than treating each one as an isolated item. It can also help track relationships across long stretches of text, though its ability to do so has limits.
The network’s role does not end at prediction. Its layers transform the token representations repeatedly, allowing the system to build increasingly useful internal patterns. A word’s numerical representation can reflect its context: “bank” in a discussion of rivers may be treated differently from “bank” in a discussion of savings. The model’s answer is produced by passing the prompt through these layers, calculating possible next tokens and selecting among them. It then repeats the process, adding each new token to the text and predicting another.
Training and use are different stages. During training, the network’s weights are adjusted across many examples. When a user later asks a question, the model generally uses the weights it has already learned to generate a response. It does not normally retrain itself on each conversation. Some systems may use additional mechanisms to retain information or adapt over time, but that is a separate feature, not an automatic consequence of being a neural network.
This distinction helps explain why a language model can produce fluent writing without possessing human understanding in the full sense. The model has learned statistical and structural relationships in language. It can use those relationships to produce answers that often show remarkable sensitivity to context. But a plausible continuation is not necessarily a true one. If the learned patterns point towards an answer that sounds convincing, the model may state it confidently even when the answer is mistaken or invented.
Nor does a neural network usually contain a tidy library of passages that it consults each time it replies. Much of what it has learned is encoded in the pattern of its weights. That does not mean it can never reproduce material from its training data: a sufficiently large model may memorise some text. But in ordinary use it generates responses by applying learned relationships, not by opening a human-like file of remembered experiences.
The scale of these networks matters. A large language model may contain billions of adjustable values, and training can require vast quantities of computing power and data. Yet size alone does not explain its abilities. The network’s architecture, the quality and range of its training material, the methods used to refine it and the way it is connected to external tools all affect what it can do. A larger system may be more capable, but it can also inherit more errors, biases and gaps from the material on which it was trained.
There is a temptation to treat neural networks as either mysterious minds or mere calculators. Neither description is quite satisfactory. They are engineered systems that learn patterns through adjustment, and at sufficient scale those patterns can support behaviour that looks strikingly intelligent. Their apparent fluency invites us to infer a human interior, while their mathematical construction reminds us that impressive language can arise without human experience.
For the intelligent lay observer, the essential idea is simple. A neural network is a flexible mathematical structure whose internal values are adjusted through training. In a large language model, that structure processes representations of words and predicts what should come next. This process can capture a great deal about how language works, and it can produce useful, sometimes surprising responses. It can also mistake resemblance for truth. Understanding the network does not make the model less remarkable. It makes clearer both what the achievement is and where its limits lie.




