Concept · Building with AI
Next-token prediction
Also called: predicting the next word, autoregressive, autoregression, text prediction, next word prediction, autocomplete
The one job a language model performs. Given the text so far, it picks a likely next token, adds it, and repeats. Every answer, plan or piece of code comes out one token at a time this way, which helps explain why models sound fluent and why they can state wrong things with confidence.
For example: When you ask a chatbot for a tagline, it does not plan the whole line first. It builds the tagline token by token, each choice based on everything written before it.
Connects to 8
- LLM Concept
- Token Concept
- Hallucination Concept
- Probabilistic vs deterministic Concept
- Training Concept
- Output tokens Concept
- Transformer Concept
- Sampling Concept