Skip to content
Artificial intelligence

How a language model works, without the math

What happens between your question and an AI assistant's answer, explained in plain language.

By MATHEUZERA Editorial TeamPublished on 2 min read

White humanoid robot with large eyes

Assistants like ChatGPT, Claude and Gemini are built on language models. Behind the conversation there is a simple idea, repeated at enormous scale: predicting which piece of text comes next.

Text becomes tokens

The model reads neither letters nor whole words. It breaks text into tokens, pieces that can be a short word, part of a word or a punctuation mark. Each token becomes a list of numbers the model can process.

Predicting, one word at a time

During training, the model sees an immense amount of text and adjusts billions of parameters to get the next token right. When answering, it does the same: it picks a likely token, adds it to the answer and repeats. The whole answer is built this way, piece by piece.

  1. Pre-training

    The model learns language patterns by predicting text at large volume.

  2. Fine-tuning

    Conversation examples teach the assistant format: following instructions and answering clearly.

  3. Human feedback

    People compare answers, and the model is adjusted to prefer the most helpful and safe ones.

The context window

The model only sees what fits in the context window: the current conversation, uploaded files and instructions. Whatever falls outside it does not exist for the model at that moment.