You Hit Enter. What Does AI Actually Do Next?
Follow an AI prompt from the Enter key to the chips doing the work, and see how tokens, training and a little context turn your question into an answer.
You type “Explain why the sky is blue to a six-year-old” and hit Enter. A moment later, the answer starts appearing. In that brief pause, your sentence has been chopped into pieces, turned into numbers and sent through layers of calculations. By the time you see the first words, the computer is already working on what comes next.
Change “six-year-old” to “physics professor” and the same question might earn you a paragraph about Rayleigh scattering. That tiny edit changes the numbers the model works with, which changes the answer it builds. Here’s how that happens, from the key you press to the words on your screen.
Your prompt becomes numbers
When you use a cloud chatbot, the app sends your request over the internet to the service’s computers. The service can include relevant parts of your conversation and instructions that guide the assistant. The request is broken into tokens, which can be whole words, pieces of words or punctuation.
Each token gets an ID from a vocabulary. The model then represents that ID as a list of numbers it can calculate with. As the prompt passes through the model, those lists change in ways that reflect the surrounding text. That’s how “blue” can take on a different role in “blue sky” and “feeling blue.”
The model connects the clues
Many modern language models use a design called a transformer. One part of that design, called attention, lets the model combine information from different positions in the text. The phrase “to a six-year-old” comes at the end of our prompt, but it shapes how the answer begins. It changes which continuations make sense alongside “why the sky is blue.”
Inside the machine, this means a lot of multiplication and addition. The model repeatedly combines grids of numbers from your prompt with grids of numbers learned during training. GPUs and other AI accelerators can do many of those calculations in parallel. Your laptop may show the result while hardware in a data center does the arithmetic. Smaller models can also run directly on some devices.
The answer takes shape one piece at a time
The model scores possible next tokens. It might start with “Sunlight” or “The.” Once a token is selected, it becomes part of the text that guides the next choice. Repeat that loop and you get a sentence, then a paragraph. When the app streams the answer, it sends pieces back as they become available, which is why you can read the opening while the rest is still arriving.
For the six-year-old, an answer might begin, “Sunlight looks white, but it’s made of lots of colors.” For the physics professor, it might start with how scattering depends on wavelength. Those are illustrative openings. Ask the same question twice and you may see different wording because there can be several plausible continuations.
Most of the learning happened before you got here
During a common kind of language-model training, the computer predicts a missing next piece of text, compares its prediction with the actual piece, and adjusts internal numbers called weights. Repeating that process across many examples helps it learn patterns in grammar, explanations and code. Additional training can help it respond to instructions. The reply you see uses those learned weights to process the context you provided.
Why it can sound right and still be wrong
Producing plausible text and verifying a claim are two different jobs. A model can generate a citation that fits the shape of a real citation even if the paper doesn’t exist. Some chatbots can call a search tool or calculator and use the returned information in their answer. If a fact matters, open the original source and check what it says.
Try the two sky prompts yourself. Then ask for an explanation in exactly two sentences, using a glass of water as an analogy. You’ll see how a small change in the instructions changes the shape of the response. The same process that makes the model responsive to your wording is why a clear prompt can make such a visible difference.
For a broader look at where this technology shows up, read A Normal Person’s Guide to AI.
Maya Chen
Maya Chen is an AI-created Technology Writer for The Algorithmic Journal, developed specifically to cover artificial intelligence, consumer technology, digital culture and the ways emerging tools are changing everyday life. Her column, Future Tense, looks beyond product launches and buzzwords to explore what technology means for real people.
Maya's work is created with artificial intelligence under human editorial direction and review, reflecting TAJ's commitment to transparency and its philosophy: Artificial intelligence. Human perspective.
Read all articles by Maya Chen →
THE ALGORITHMIC JOURNAL
Get more stories like this.
More informed. More connected. More hopeful. Join TAJ for thoughtful stories and practical ideas about everyday life.
