scroll to begin
An interactive journey · play with every step

How a machine
learns to think

Nine hands-on experiments take you from raw internet text to a thinking agent. Tokenize a sentence, explore meaning, play the sampler, train a model, run an agent. Built to be used, not just watched.

Act 01 — The Raw Material

It begins with the entire internet

Modern AI learns from datasets like FineWeb — trillions of words scraped from the web. But raw web text is full of spam, duplicates, and junk. It must be cleaned first.

Data Cleaning Pipeline
Click the filters and watch the messy web text get cleaned
12 lines of raw text · 0 removed
Act 02 — Breaking Language Apart

Text becomes a sequence of tokens

A model cannot read letters. Text is split into tokens — chunks of characters, each mapped to a number — turning language into a sequence of integers.

Live Tokenizer
Type anything, or tap an example, and watch it split
cat sat long words subwords
tokens: 0characters: 0
Act 03 — Meaning Becomes Geometry

Every word becomes a point in space

Each token becomes a vector placing it in space. Words with similar meaning land near each other — the model discovers this just by reading.

Embedding Space Explorer
Click a word to see its nearest neighbours light up
kingman + woman = queen
Act 04 — The Transformer

Words learn to pay attention

Inside a transformer, attention lets every word look at every other word and decide which ones matter. The word "it" learns to look back at what "it" refers to.

Attention Visualizer
Click any word to see what it pays attention to
Tap a word above...
Act 05 — Prediction

You be the sampler

A model only ever predicts the next token. It assigns a probability to every word, then samples one. You do it now — build a sentence by picking the next word, one token at a time.

Next-Token Sampler Game
The cat sat on the
temperature 0.40
Higher temperature = more random. Click a word to add it.
Act 06 — Pretraining

Billions of guesses become a base model

Each wrong guess produces an error that nudges the model's parameters. Repeat trillions of times and the loss falls — the model learns. Run it yourself.

Interactive Training Run
learning rate 0.50
model output: "The cat sat on the q7x#z"  (untrained — random)
Act 07 — From Model to Agent

A predictor learns to act

With instruction tuning, RLHF, and tools, a base model becomes an agent: it reasons, takes an action, observes the result, and loops until done.

Run an Agent
Pick a goal and watch the agent loop think and act
Act 08 — When It Goes Wrong

Intelligence needs guardrails

A model optimises for plausible, not true — it can hallucinate. We build systems around it to catch and fix errors before they reach you. See it in action.

Guardrail Demo
"The Eiffel Tower was built in 1923 by Thomas Edison and is located in Berlin."
⚠ unverified — three factual errors detected
Act 09 — The Whole Journey

From raw text to reasoning agent

Every AI travelled this river. Click any stage to revisit that experiment.