You have already used artificial intelligence a dozen times today. It unlocked your phone, sorted your inbox, guessed your commute, picked the next song and quietly checked that your last card payment was really you. You probably did not notice any of it — and that is the best sign of how deeply AI is now woven into ordinary life.
Then, in late 2022, AI stopped being invisible. Suddenly anyone could type a question in plain English and get back an essay, a poem, a working program or a patient explanation of quantum physics. The world noticed. Since then the pace has only picked up.
This is the first article in The AI World, a series on MSRX about how this technology works and what it means. We will start with no assumptions at all, and by the end we will be inside a transformer, reading its equations. Take it one section at a time.
- 07:00
Face unlock
A vision model checks your face against a stored template.
- 08:15
Maps ETA
Traffic models predict how long each road will take.
- 10:30
Spam filter
A classifier decides which mail you never see.
- 13:00
Recommendations
The next song or video is picked from what people like you played.
- 16:45
Fraud check
Your card payment is scored for risk in milliseconds.
- 21:00
Chat assistant
A large language model writes, explains and codes with you.
What is AI, really?
Artificial intelligence is the craft of getting computers to do things that, if a person did them, we would say needed intelligence: recognising a face, understanding a sentence, planning a route, spotting a tumour on a scan, writing a reply.
For most of computing history, we made computers useful by writing out every rule by hand. To calculate tax, a programmer writes the tax rules. That works brilliantly when the rules are clear. But try writing the rules for “is this a photo of a cat?” Pointy ears? Some dogs have them. Whiskers? So do seals. Four legs? Not if the cat is curled up. You would never finish.
Modern AI flips the approach. Instead of giving the computer the rules, we give it examples — thousands of cat photos and thousands of not-cat photos — and let it work out the rules itself. That idea is called machine learning, and it is the engine behind almost everything called AI today.
Traditional programming
Machine learning
AI, ML, deep learning, GenAI: the family tree
These words get used interchangeably in the news, but they are actually nested inside each other, like Russian dolls.
- Artificial Intelligence is the whole field — including old-school programs built from hand-written rules, like early chess engines and “expert systems”.
- Machine Learning (ML) is the part of AI that learns from data rather than following rules someone typed in.
- Deep Learning is the part of ML that uses neural networks with many layers. It took over around 2012, and it is what made speech recognition, face ID and modern translation work well.
- Generative AI is deep learning that creates new content — text, images, music, code, video — instead of only labelling things. Large language models (LLMs) such as ChatGPT, Claude and Gemini live here.
A 75-year story in two minutes
AI feels brand new, but the dream is older than the personal computer. The history is a rollercoaster of big promises, crushing disappointments (the “AI winters”) and, recently, breakthroughs that arrived faster than even researchers expected.
1950
Turing asks “Can machines think?”
Alan Turing’s paper proposes the imitation game, later called the Turing test.
1956
The field gets its name
The Dartmouth workshop, organised by John McCarthy and colleagues, launches “artificial intelligence” as a discipline.
1958
The Perceptron
Frank Rosenblatt builds a machine that learns to classify simple images: the first trainable neural network.
1966
ELIZA chats
Joseph Weizenbaum’s pattern-matching chatbot convinces some users it understands them.
1970s–90s ❄️
AI winters
Promises outrun results twice; funding and interest collapse, then slowly return.
1986
Backpropagation spreads
Rumelhart, Hinton and Williams show how to train multi-layer networks efficiently.
1997
Deep Blue beats Kasparov
IBM’s chess machine defeats the world champion in a six-game match.
2012
AlexNet and the deep learning boom
A GPU-trained neural network wins the ImageNet challenge by a wide margin.
2016
AlphaGo beats Lee Sedol
DeepMind’s system wins 4–1 at Go, a game long thought decades out of reach.
2017
“Attention Is All You Need”
Google researchers introduce the Transformer, the architecture behind today’s language models.
2020
GPT-3 and AlphaFold 2
A 175-billion-parameter language model writes fluent text; AlphaFold predicts protein structures with near-experimental accuracy.
2022
ChatGPT goes public
A chat interface puts a large language model in front of the general public, and adoption is explosive.
2024
Nobel Prizes for AI
Physics: Hopfield and Hinton for neural-network foundations. Chemistry: Hassabis and Jumper for AlphaFold, shared with David Baker.
2024 →
Reasoning models and agents
Models trained to think step by step, use tools and carry out multi-step tasks on their own.
Notice the pattern after 2012. Three ingredients arrived at once: huge datasets (the internet), cheap parallel computing (graphics cards, GPUs, originally built for video games) and better algorithms. Neural network ideas from the 1980s suddenly worked, because we finally had enough data and compute to feed them.
Narrow, general and super AI
You will hear people argue about “AGI”. It helps to picture three rungs on a ladder.
Narrow AI (ANI)
Superhuman at one job — chess, face ID, translation — and useless outside it. Today’s chat models are far broader than any before, yet still stumble in ways a person would not.
General AI (AGI)
Matches a capable person across most thinking tasks, learning new ones as fast. Nobody agrees on the exact test, or on the date.
Superintelligence (ASI)
Beyond the best humans at nearly everything. The main subject of long-term safety research.
A chess engine that beats every human alive cannot tell you what a chair is. That is narrow AI. Today’s large language models are strange in that they are wide — they can write, code, tutor and translate — yet they still make mistakes no careful person would, and they do not learn from experience the way you do. Whether scaling up the current approach reaches artificial general intelligence, or whether new ideas are needed, is genuinely open.
How machines learn
Machine learning comes in three main flavours, depending on what kind of feedback the machine gets while it learns.
Supervised
Learning with an answer key
Shown thousands of photos labelled “cat” or “dog”, it learns the line between them. Used for: spam filters, price prediction, medical scans.
Unsupervised
Finding groups on its own
No labels at all. It notices which things resemble each other. Used for: customer segments, anomaly detection, topic discovery.
Reinforcement
Learning by trial and reward
Like training a puppy with treats: good moves are rewarded and repeated. Used for: AlphaGo, robotics, tuning chatbots.
There is also an important fourth idea: self-supervised learning. Here the data labels itself. Hide the next word in a sentence and ask the model to guess it; the real next word is the answer key. Since every sentence on the internet can be turned into practice questions this way, self-supervision unlocked training on truly vast amounts of text. It is exactly how large language models are pre-trained.
The machine-learning workflow
Whatever the flavour, real projects follow roughly the same loop. Beginners are usually surprised by how much of the work is data rather than clever algorithms.
Collect data
photos, logs, text
Clean & label
fix errors, add answers
Split
train / validation / test
Train
fit the parameters
Evaluate
on data it never saw
Deploy & monitor
serve predictions
↻ models drift as the world changes — monitor, collect new data, retrain
Neural networks: brains made of maths
Neural networks are loosely inspired by the brain, but do not take the metaphor too far. An artificial neuron is a tiny calculator. It takes some numbers in, multiplies each by a weight (how much it trusts that input), adds them up with a bias, and squashes the result through an activation function.
y = σ( w₁x₁ + w₂x₂ + … + wₙxₙ + b ) = σ( w·x + b )
output = activation( weighted sum of inputs + bias )
On its own, one neuron is not very smart. Try it yourself: here is a single neuron deciding whether to take an umbrella.
Playground
One neuron: “Should I take an umbrella?”
Inputs (the world)
0 = clear sky, 1 = dark clouds
0 = 0 %, 1 = 100 %
Parameters (what training learns)
z = 3.0·0.7 + 4.0·0.4 + (-3.0) = 0.70 → σ(z) = 0.668
☂️ Take the umbrella — the neuron is 67 % sure it will rain.
Drag w₂ below zero and the neuron starts distrusting the forecast. Training is nothing more than nudging these three knobs, millions of times, until the answers stop being wrong.
The magic happens when you connect thousands or billions of them in layers. The first layer of an image network might learn to detect edges; the next combines edges into corners and curves; the next into eyes, wheels and letters; the last decides “cat” or “dog”. Nobody programs those features — they emerge from training.
How a network learns: loss, gradients and backprop
A freshly created network has random weights, so its answers are garbage. Training fixes that in a loop that repeats millions of times:
- Forward pass. Feed in an example and get a prediction.
- Measure the loss. A loss function turns “how wrong was that?” into one number. For classification the usual choice is cross-entropy: L = −log p(correct class). Confidently wrong answers are punished hard.
- Backward pass (backpropagation). Using the chain rule from calculus, work out for every single weight how much the loss would change if that weight were nudged. That list of sensitivities is the gradient.
- Update. Move every weight a tiny step in the direction that reduces the loss.
θ ← θ − η · ∇θ L(θ)
new weights = old weights − learning rate × gradient of the loss
In practice nobody computes the gradient over the whole dataset at once. We use mini-batches of, say, 32 to a few thousand examples (stochastic gradient descent), and smarter update rules such as Adam, which gives each parameter its own adaptive step size. One full pass through the data is an epoch.
import torch
import torch.nn as nn
model = nn.Sequential( # a tiny neural network
nn.Linear(784, 128), nn.ReLU(), # 28×28 pixels in → 128 hidden neurons
nn.Linear(128, 10), # → 10 scores, one per digit 0–9
)
loss_fn = nn.CrossEntropyLoss()
opt = torch.optim.Adam(model.parameters(), lr=1e-3)
for epoch in range(5):
for images, labels in train_loader:
logits = model(images.view(-1, 784)) # 1. forward pass
loss = loss_fn(logits, labels) # 2. how wrong?
opt.zero_grad()
loss.backward() # 3. backprop → gradients
opt.step() # 4. gradient-descent step
print(f"epoch {epoch}: loss {loss.item():.3f}")epoch 0: loss 0.312
epoch 1: loss 0.184
epoch 2: loss 0.097
epoch 3: loss 0.121
epoch 4: loss 0.064
Overfitting: the student who memorised the answers
A model with enough parameters can simply memorise its training data, noise and all. It then looks brilliant in training and fails on anything new. The opposite problem, underfitting, happens when the model is too simple to capture the pattern at all.
Underfit
too simple — misses the trend
Good fit
captures the pattern
Overfit
memorises the noise
The defences are more (and more varied) data, regularisation (penalising extreme weights, or dropout, which randomly switches neurons off during training so none can be relied on too heavily), and early stopping when validation loss starts rising. Curiously, very large modern networks often generalise well even with enough capacity to memorise everything — a phenomenon researchers are still working to fully explain.
Architectures: the shapes of networks
How the neurons are wired matters as much as how many there are. Each architecture builds in an assumption about the data it will see.
CNN
Convolutional Neural Network
Slides small filters across an image, detecting edges, then textures, then objects.
Best at: Photos, X-rays, self-driving cameras
RNN / LSTM
Recurrent Neural Network
Reads a sequence one step at a time, carrying a memory forward. Slow to train; forgets long contexts.
Best at: Older speech and translation systems
Transformer
Attention-based network
Looks at every token at once and learns which ones matter to each other. Parallel, scales beautifully.
Best at: ChatGPT, Claude, Gemini, modern vision
Diffusion
Denoising generative model
Learns to remove noise step by step, so it can turn pure static into a picture.
Best at: Image, video and audio generation
Convolutional networks assume that a pattern is the same wherever it appears in an image, so they reuse one small filter everywhere. Recurrent networks assume data arrives in order, reading it one step at a time — which makes them slow and forgetful over long passages. The Transformer, introduced in 2017, dropped recurrence altogether: it looks at a whole sequence at once and lets every element decide which others to pay attention to. Because that work runs in parallel on GPUs, Transformers could be scaled to sizes nobody had tried, and they now dominate language, and increasingly vision, audio and biology.
Inside a large language model
Here is the most surprising fact in modern AI: a chatbot like ChatGPT or Claude is, at its core, a machine that predicts the next word. Just that. It reads your text and outputs a probability for every possible next token. One is chosen, stuck on the end, and the whole thing repeats. The fluency, the reasoning, the code — all of it emerges from getting extraordinarily good at that one game.
Your prompt
“The cat sat on the”
Tokenise
text → token IDs
Embed
each ID → a vector of thousands of numbers + position
Transformer ×N
attention + feed-forward, dozens of layers deep
Probabilities
a score for every word in the vocabulary
Sample
pick “mat” (temperature decides how boldly)
↻ append the new token and repeat until done — that is how the reply streams in word by word
Step 1 — Tokens
Models do not read letters or whole words. Text is cut into tokens: common words are one token, rarer words are split into pieces. As a rule of thumb, one token is about three-quarters of an English word. A model’s context window — how much it can read at once — is measured in tokens, and today’s leading models handle hundreds of thousands of them, some a million or more.
Text in:
Unbelievable! AI is awesome 🤖
Tokens (sub-word pieces) and their IDs:
- Un2208
- believ20185
- able481
- !0
- ␣AI15592
- ␣is318
- ␣awesome7427
- ␣🤖12859
␣ marks a leading space. Token IDs shown are illustrative; every model has its own vocabulary.
Step 2 — Embeddings: a map of meaning
Each token ID is converted into an embedding, a long list of numbers (thousands, in large models). Think of it as a coordinate on a map with thousands of dimensions. Training arranges the map so that words used in similar ways end up close together — and, remarkably, so that directions on the map carry meaning.
vec(“king”) − vec(“man”) + vec(“woman”) ≈ vec(“queen”)
the famous word2vec result (2013): vector arithmetic on meanings
Because the Transformer sees all tokens at once, it also needs to know their order, so a positional encoding is mixed into each embedding. Modern models typically use rotary position embeddings (RoPE), which rotate the vectors by an angle that depends on position.
Step 3 — Transformer blocks
The embeddings then flow through a stack of identical Transformer blocks. Each block has two parts: self-attention, where tokens share information with each other, and a feed-forward network, where each token is processed on its own. Residual connections carry the original signal around each part, which is what lets networks be stacked so deep without training falling apart.
Step 4 — Probabilities and sampling
After the last block, the final vector for the last position is turned into a score (a logit) for every token in the vocabulary, and a softmax turns those scores into probabilities. The temperature setting controls how adventurous the choice is. Play with it:
Playground
Turn the temperature knob
Prompt: “The cat sat on the ___”. The bars are the model’s probability for each next word.
Low = safe and repetitive · High = creative and chaotic
- mat50.2%
- sofa20.4%
- floor16.7%
- keyboard7.5%
- roof4.1%
- moon1.0%
Press to let the model “write”.
Math: pi = ezi/T / Σj ezj/T. Dividing the scores by a small T exaggerates the gaps (the top word wins almost always); a large T flattens them (even “moon” gets a turn).
Attention, the maths
Read this sentence: “The animal didn’t cross the street because it was tired.” What does “it” mean? You instantly know it is the animal. Change “tired” to “wide” and “it” becomes the street. Working out which words matter to which other words is exactly what attention does.
Where does the token “it” look when working out its meaning? (one attention head)
Weights are illustrative and sum to 1. Change “tired” to “wide” and a well-trained model shifts its attention from “animal” to “street”.
Mechanically, every token’s vector is multiplied by three learned matrices to produce three new vectors:
- Query (Q) — “what am I looking for?”
- Key (K) — “what do I contain?”
- Value (V) — “what will I pass on if you pick me?”
Each token compares its query with every token’s key (a dot product: large when they point the same way). Those scores are scaled, turned into weights with softmax, and used to take a weighted average of the values.
Attention(Q, K, V) = softmax( QKᵀ / √dk ) · V
scaled dot-product attention — Vaswani et al., 2017
Scale: why bigger kept winning
Around 2020 researchers found that a language model’s loss falls smoothly and predictably as you increase three things together: the number of parameters, the amount of training data and the compute spent. These scaling laws turned model building into something closer to engineering. DeepMind’s 2022 “Chinchilla” study refined the recipe: for a fixed compute budget, many models had been too big and undertrained, and roughly 20 training tokens per parameter was a better balance. Today’s frontier models are trained on many trillions of tokens.
How a chat assistant is made
A model that has only been pre-trained is a brilliant but unruly autocomplete. Ask it “What is the capital of France?” and it may well continue with “What is the capital of Germany?”, because in its training data, lists of quiz questions are common. Turning it into a helpful assistant takes further stages.
STAGE 1
Pre-training
Predict the next token over trillions of tokens of text and code.
→ A “base model”: knows a lot, but just autocompletes.
Weeks–months on thousands of GPUs
STAGE 2
Supervised fine-tuning
Train on curated examples of good instructions and answers.
→ Follows instructions, speaks like an assistant.
Tens of thousands of examples
STAGE 3
Preference tuning (RLHF)
People rank answers; a reward model learns their taste; RL optimises for it.
→ More helpful, honest and harmless.
Human feedback + RL
STAGE 4
Reasoning RL
Reward correct final answers on maths, code and puzzles with checkable results.
→ Learns to think step by step before answering.
Verifiable tasks at scale
Reinforcement learning from human feedback (RLHF) deserves a closer look. People compare pairs of model answers and pick the better one. Those preferences train a separate reward model that predicts which answer a person would prefer. The chat model is then optimised to score highly with that reward model, with a penalty for drifting too far from its earlier self so it does not learn to game the scorer. Variants such as DPO skip the separate reward model and learn from the preference pairs directly, and some labs add AI-generated feedback guided by a written set of principles.
The newest step is reinforcement learning on verifiable tasks. Give the model maths problems and coding challenges whose answers can be checked automatically, and reward it only for getting them right. Models trained this way learn to write out a long chain of intermediate thinking before the final answer — trying approaches, catching their own mistakes, backtracking. That is what the “thinking” you see in reasoning models is.
Explain photosynthesis like I’m 8, in 3 sentences 🌱
Plants are like tiny chefs that make their own food! 🍃 They take in sunlight through their leaves, drink water with their roots, and breathe in a gas from the air called carbon dioxide.
They mix those together to make sugar for energy, and — bonus — they breathe out the oxygen that we need to breathe!
Beyond text: images, voice and video
Most image and video generators use a different trick called diffusion. During training, you take real pictures and add a little random noise, then more, then more, until only static is left. The network’s job is to learn to reverse a single step: given a noisy image (and a caption), predict the noise that was added. Once it has learned that, you can start from pure static and denoise step by step, with your text prompt steering each step — and a brand new image appears.
t = 1000 · pure noise
t = 750
t = 450
t = 180
t = 0 · image
← training adds noise step by step · generation learns to remove it, guided by your prompt →
The frontier is increasingly multimodal: single models that take in text, images, audio and video, and respond in several of them. The same core recipe applies — turn everything into tokens or embeddings, then learn the patterns — which is why progress in one area now spreads quickly to the others.
Putting AI to work: prompts, RAG and agents
Prompting well
A language model only knows what is in its training data plus what you put in the prompt. The single biggest improvement most people can make is to give it more context. Say who the answer is for, what good looks like, the format you want, and, when you can, an example.
✗ VAGUE
Write about our new app.
✓ SPECIFIC
Write a 120-word announcement of our free Gantt chart app for busy project managers. Friendly, no jargon, end with one call to action. Here is a past announcement we liked: …
RAG: giving the model your documents
A model does not know your company handbook, yesterday’s news or your private notes. Retrieval-augmented generation fixes that without retraining: split your documents into chunks, store their embeddings in a vector database, and at question time fetch the chunks closest in meaning to the question and paste them into the prompt.
Question
“What is our refund policy?”
Embed the question
turn it into a vector
Search your documents
vector DB finds the closest chunks
Stuff into the prompt
question + top 3–10 chunks
LLM answers
grounded in your data, with citations
Agents: models that act
An agent is a language model placed in a loop and given tools: web search, a code runner, a calendar, a company’s internal APIs. It decides on a step, calls a tool, reads the result, and decides the next step, until the goal is done. Coding assistants that read a codebase, run the tests and fix what fails are agents; so are assistants that research a topic across dozens of web pages.
Limits, risks and responsibility
AI is powerful, and it is also imperfect in ways that matter. A good user knows both.
Hallucinations
Models can state false things fluently and confidently, including made-up citations. Check anything important.
Bias
Models learn from human data, including its prejudices, and can repeat or amplify them in hiring, lending or policing.
Privacy
Be careful what you paste into online tools. Read how your data is stored and whether it trains future models.
Deepfakes & misuse
Realistic fake voices, images and video make scams and misinformation cheaper. Verify surprising media.
Energy & cost
Training and running large models uses a lot of electricity and water for cooling, and concentrates power in a few companies.
Work
AI changes what many jobs involve. The people who learn to use it well tend to benefit most.
Behind these everyday concerns sits a longer-term research field called AI safety and alignment: how do we make sure increasingly capable systems reliably do what we intend, are honest about what they do not know, and cannot be turned to serious harm? Interpretability researchers try to look inside networks and understand what individual neurons and circuits represent, so that we are not relying on a black box. Governments are writing rules too, such as the European Union’s AI Act. None of this is solved, and it is one of the most important open problems of our time.
Glossary
| Term | Meaning |
|---|---|
| Algorithm | A precise recipe of steps a computer follows. |
| Model | The thing training produces: a function with learned numbers (parameters) inside. |
| Parameter / weight | One learned number. Large language models have billions of them. |
| Training | Adjusting parameters so the model’s outputs get less wrong on example data. |
| Inference | Using a trained model to answer something new. |
| Loss | A single number measuring how wrong the model currently is. |
| Gradient | The direction (for every parameter) that increases the loss fastest. We step the other way. |
| Overfitting | Memorising the training data instead of learning the pattern; fails on new data. |
| Token | A chunk of text a language model reads and writes, roughly ¾ of an English word. |
| Embedding | A list of numbers that places a token, sentence or image on a map of meaning. |
| Attention | The mechanism that lets each token weigh how relevant every other token is. |
| Context window | How many tokens a model can consider at once: its working memory. |
| Fine-tuning | Further training a pre-trained model on a smaller, specific dataset. |
| RLHF | Reinforcement learning from human feedback: tuning a model towards answers people prefer. |
| Hallucination | A confident, fluent answer that is false. |
| RAG | Retrieval-augmented generation: fetching relevant documents and giving them to the model. |
| Agent | A model that plans, calls tools and loops until a goal is reached. |
| Multimodal | Handles more than one kind of input or output: text, images, audio, video. |
Quick quiz
Tap a question to check your answer.
Q1A spam filter trained on thousands of emails marked “spam” or “not spam” is which kind of learning?
Supervised learning: every training example came with the right answer (a label).
Q2Your model scores 99 % on training data and 61 % on new data. What went wrong?
Overfitting. It memorised the training set. Try more data, a simpler model, regularisation such as dropout, or stopping training earlier.
Q3Why does a chatbot sometimes give a different answer to the same question?
It samples each next token from a probability distribution. With temperature above zero, less likely words sometimes get picked, so the path through the answer changes.
Q4In attention, why divide QKᵀ by √dₖ?
Dot products of long vectors grow large, which pushes softmax into regions with tiny gradients. Scaling keeps the scores in a range where training stays stable.
Where to go from here
You now know more about how AI works than most people who use it every day. The best way to go further is to use it and build with it, a little at a time.
STEP 1
Week 1 · Curious
- Use a chat assistant every day for real tasks
- Learn to write clear prompts with context and examples
- Read one explainer a week (like this series!)
STEP 2
Month 1–3 · Builder
- Python basics, NumPy, pandas
- Call an LLM API; build a small chatbot or RAG app
- Try no-code tools and automation
STEP 3
Month 3–9 · Practitioner
- Linear algebra, probability, calculus essentials
- scikit-learn, then PyTorch
- Train a CNN and fine-tune a small language model
STEP 4
Year 1+ · Specialist
- Read papers: start with “Attention Is All You Need”
- Evaluation, safety and interpretability
- Ship something real and measure it
Coming up in The AI World: deeper dives into how large language models are trained, a hands-on guide to building your first RAG app, prompting techniques that actually work, what AI agents can and cannot do yet, and how to judge AI claims in the news.
Welcome aboard. It is an awesome world — and we have only just opened the door. 🚀
Numbers inside illustrations (probabilities, attention weights, token IDs, training output) are made up to show the idea. Spotted a mistake? Tell us.