How AI works:
from prompt to output.
Your text is broken into pieces, converted into numbers, processed through many neural-network layers, and generated back one piece at a time. No AI/ML background required — just the same mindset you'd use to trace any engineering pipeline.
One prompt, start to finish
Every stage below happens, in this order, for every AI response — illustrated with one running example: an engineer asking AI to diagnose a bearing-vibration problem.
User types a question
"Predict the likely cause of high bearing vibration."
Text → tokens
["Predict"," the"," likely"," cause"," of"," high"," bearing"," vibration","."]
Tokens → vocabulary integers
[4521, 262, 4900, 3286, 286, 1029, 15329, 22289, 13]
Integers → meaning-carrying vectors
"bearing" → [0.21, -0.73, 0.15, 0.44, …]
+ position in the sequence
So token order changes meaning, not just token identity.
Self-Attention + Feed-Forward
Each token "looks at" every other token to weigh what's relevant, then a feed-forward step refines its representation. Repeated across many stacked layers.
A score for every possible next token
"misalignment" 0.34 · "imbalance" 0.21 · "wear" 0.18 · …
One token is chosen
Greedy, top-k, top-p, or temperature-based selection picks the next token.
Output tokens → readable text
The full generated token sequence is converted back into text.
Final response
"High bearing vibration is most often caused by misalignment, imbalance, or bearing wear."
Want to see the token-by-token prediction actually run on real statistics? Try the Predict Game →
All 21 questions, in order
Grouped into six parts, matching the pipeline above. Click any question to expand its answer.
Test what you've learned
Ten random questions pulled from a bank of 13 each round. Runs entirely in this page — your best score is remembered on this device.