AI · · 1 min read

How AI Language Models Actually Work: Tokens and Prediction

AI doesn't look answers up. It predicts them, one small piece at a time.

Here's what happens when you send a prompt to a large language model:

  1. Your text is split into tokens: words or pieces of words. In English, a token is roughly three-quarters of a word on average.
  2. The model scores every possible next token based on patterns it learned in training.
  3. It picks one, adds it to the text, and repeats. Thousands of times.

Once you see it this way, a lot makes sense:

  • Why it sounds confident even when it's wrong. Fluent and correct are not the same thing.
  • Why the same prompt can give different answers. There's a choice at every step.
  • Why your wording matters so much. Every word shifts the odds of what comes next.

It's not magic, and it's not a search engine. It's very good prediction.

AILLMMachine Learning
Discuss on LinkedIn