mej7.comHow AI Works

What is artificial intelligence?

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

Artificial intelligence, in the sense used on this site, is software that finds patterns in data and uses them to make predictions or decisions — which word comes next, what object is in a photo, which move to play. Most systems people meet day to day are machine-learning models: they adjust parameters on examples instead of encoding every rule by hand. They are not people, and they do not come with a guarantee of truth.

In one paragraph. AI here means learned software that maps inputs to outputs by fitting parameters on data. It is a family of methods, not a single program and not a mind.

Three nested boxes. Teaching sketch.
  • AI — the broad goal
  • Machine learning — learn from examples
  • Deep learning / LLMs — deep nets, often transformers

How does this relate to machine learning?

AI is the broad goal (systems that do tasks that look 'intelligent'). Machine learning is the dominant method: fit a function on examples. Deep learning is ML with many-layer neural networks. Language models sit in that last box.

What is a language model, briefly?

A model of a probability distribution over sequences of tokens. Neural language models go back at least to Bengio et al. (2003). Today's large models are usually transformers (Vaswani et al. (2017)) trained to predict the next token (Brown et al. (2020)).

What is mej7.com?

A free interactive lab in English and Albanian. Visualizations are simplified teaching models, not production weights. Start here, then Intermediate, then Advanced, then Mechanistic interpretability if you want to look inside.

Is there math already?

Not required on this page. The later path uses vectors, matrix multiplies, and softmax. You can arrive there slowly.

Worked example

You type 'the cat sat on the'. A language model scores every token in its vocabulary as a possible continuation and picks (or samples) one, then repeats. That loop is the whole generation trick. The next pages unpack tokens, guessing, and why the guess can be fluent and wrong.

Check your understanding

Five questions. Answers are in the disclosure under each item, so this page still works if JavaScript is off.

1. On this site, AI mainly means…
Show answer

B. Patterns in data, not a mind.

2. Machine learning differs from hand-written rules because…
Show answer

B. Training adjusts weights.

3. A language model, at heart, models…
Show answer

B. Bengio et al. (2003) onward.

4. mej7.com visualizations are…
Show answer

B. Labelled on every lab.

5. Is mej7.com an official OpenAI site?
Show answer

B. See About.

Further reading

  1. A Neural Probabilistic Language Model — Bengio et al. (2003). Journal of Machine Learning Research.
  2. Attention Is All You Need — Vaswani et al. (2017). NeurIPS.
  3. Language Models are Few-Shot Learners — Brown et al. (2020). NeurIPS.