Runs in your browser. Nothing you enter is uploaded or logged.
One useful email every Monday
New free tools, AI and network threats that matter, and one quick challenge. No spam, unsubscribe in one click.
How to use it
- 1
Step through the seven stages.
- 2
Drag the temperature slider.
- 3
Sample the next word and watch it change.
Questions people ask
How does ChatGPT generate text?
It splits text into tokens, turns them into vectors, uses attention layers to weigh the context, scores every possible next token, picks one by sampling, appends it and repeats.
What does temperature do?
It reshapes the probabilities: low temperature picks the most likely token almost every time, high temperature spreads the choice to less likely tokens.
Related tools
- How prompt injection worksFollow a hidden instruction into an AI agent, and see where each defense stops it.
- Neural network playgroundTrain a network live and watch it learn.
- Gradient descent visualizerSee learning rate and momentum in action.
- Tokenizer explorerReal GPT tokenizers, in many languages.
- Next-token sampling simulatorTemperature, top-k and top-p, visualised.
Link to this tool
Found it useful? Paste this into your blog, wiki or runbook.
<a href="https://toolbini.com/learn/how-llms-work/">How an LLM writes a sentence</a>Reviewed by the editorial team · Last reviewed 2026-11 · Report an error