mej7.comHow AI Works

Beginner path: how AI works

Author: Mehdi Sadriu, independent educator. Last reviewed: 25 November 2026. How we check claims: methodology.

Eight short pages for people with no background: what AI is, how models learn, tokens, next-word guessing, the chat pipeline, whether a model thinks, why it is sometimes wrong, and what to learn next on this site.

In one paragraph. The beginner path is a cited, no-account sequence that answers first and then goes deeper, with quizzes that work without JavaScript.

  1. 1. What is artificial intelligence?

    AI is software that finds patterns in data and uses them to guess useful outputs. Most everyday systems are machine-learning models, not hand-written rule lists.

  2. 2. How do AI models learn?

    They compare a guess to a target, compute a loss, and nudge weights downhill with gradients (Rumelhart, Hinton & Williams, 1986).

  3. 3. What are tokens?

    Tokens are the pieces a language model reads and writes — words, subwords, or symbols. BPE is a common splitting method (Sennrich et al., 2016).

  4. 4. How does a language model choose the next word?

    It scores every vocabulary token (logits), turns scores into probabilities with softmax, then picks or samples one token and repeats.

  5. 5. What happens between your click and the reply?

    Your text travels to a data centre, is tokenized, flows through transformer layers, and comes back one token at a time. This is a pipeline sketch, not a vendor diagram.

  6. 6. Does a language model think or feel?

    A language model is a trained next-token machine. Warm prose is not proof of feelings. This page does not settle philosophy of mind; it states what the artifacts are.

  7. 7. Why is a language model sometimes wrong?

    It samples likely continuations, not a guaranteed ledger of facts. Fluency and truth are different. Always verify important claims.

  8. 8. What should you learn after the beginner path?

    Go to the Intermediate lab for tokens, embeddings, attention, and training with interactive visuals. Then Advanced, then Mechanistic interpretability if you want to look inside.