marcella

In plain words · technology

How a neural network works

A neural network in plain words: how it is trained on examples, what weights and tokens are and how a language model like ChatGPT, Claude or YandexGPT writes an answer word by word. Nine steps. The diagram plays by itself; drag the scale below it.

In short

A neural network is a program that learns from examples rather than rules. Inside are millions of numbers called weights; training nudges them until the answers look right. A language model learns to guess the next word the same way, so it writes coherent text but can be confidently wrong.

Marcella, web and bot developer · updated 17 November 2026

Step 01 / 09

Examples

A neural network is not programmed with rules — it is trained on examples. To tell cats from dogs it is shown thousands of labelled photos. A language model is trained on a huge amount of text: books, articles, websites, program code.

Technically: training data are pairs of “input — correct answer”. For a language model the answer comes from the text itself: which word comes next.

Glossary · tap a word and the diagram will show it

In short

A neural network is a program made of many simple computing units, artificial neurons, linked by numbers — weights. It is not programmed with “if — then” rules but trained on examples. The idea is old: a mathematical model of the neuron was described in 1943, the first trainable network — the perceptron — in 1958.

Training is many rounds of one loop: show an example, compare the net’s answer with the correct one, nudge the weights a little so the error shrinks. After billions of such nudges the net picks up patterns no person could write down as rules: what a cat looks like in a photo or how a phrase usually goes on.

Language models — ChatGPT, Claude, GigaChat, YandexGPT — learn one thing: to guess the next piece of text, a token. When you ask a question, the model works out the odds for every possible next token, picks one, appends it and repeats. That simple step, repeated thousands of times, gives answers, translations and program code.

Hence the strengths and weaknesses. A model writes, retells and explains well, but it does not “know” — it continues text plausibly, and sometimes it is confidently wrong. Its knowledge ends at its training date unless search is connected. So check important facts — a neural network works best where the result is easy to verify.

Questions and answers

What is a neural network, in plain words?
A program that is not written as rules but trained on examples. Inside there are many simple formula-neurons linked by number-weights. During training the weights are tuned so the net answers correctly, and then it applies the patterns it found to new data.
How does a neural network learn?
It is shown an example, it answers, the answer is compared with the correct one and the error is measured. Then every weight is nudged a little so the error gets smaller. This loop is repeated billions of times — and the weights gradually settle.
How do ChatGPT or Claude write an answer?
One token at a time. The model reads your question, works out the odds for every possible next piece of text, picks one and appends it. Then it repeats everything with the new token. That is why the answer appears on screen gradually.
Why does a neural network make up facts?
It does not look the answer up in a database — it continues the text in whatever way looks plausible. If the data had little information or contradicted itself, the model can confidently write something false. This is called hallucination — so check important facts.
Does a neural network understand what it writes?
Scientists disagree. Technically the model computes which continuation of the text is more likely, using patterns from its training data. At the same time it can reason step by step and solve problems that were not in its examples. Whether this resembles human understanding is an open question.
What is a token?
A piece of text the model works with: a word, part of a word, a digit or a punctuation mark. One word can be one token or several. Tokens are used to count how much text a model can read at once and how much working with it costs.
How does a neural network know the news?
On its own it does not: its knowledge ends at the date its training data were collected. If a chatbot talks about recent events, it has search connected or has been given documents.
How is a neural network different from a regular program?
A regular program is written by a person: every rule is set in advance. A neural network gets its rules from examples by itself, and they are written not in words but in millions of numbers. That is why it copes with tasks whose rules are hard to state — speech, images, text — but its decisions are harder to explain.

I will connect a neural network to your bot or site

Digests, answers to common questions, sorting incoming requests — in a Telegram bot or on a website. Like my “Что там?” bot: a neural network builds a topic profile from a couple of lines, and the bot watches for spikes in searches and explains why people are looking.