AI, ML, neural nets: what's what
Lesson 1 of 23 in the course “AI basics”. Free, with animations and a quiz.
Four words, one set of nesting dolls
AI, or artificial intelligence, is any program that does “smart” things. Inside it sits machine learning (ML): programs that learn from examples. Inside ML are neural networks, one very powerful way of learning like that. And inside neural networks are language models (LLMs), neural networks built for text, like ChatGPT. In short: each ring is narrower than the one around it.
Rules vs examples
A regular program follows rules a person wrote. For example: “if the order is over $100, give a discount”. Machine learning works the other way around: you give the model thousands of examples with the right answers, and it finds the rule itself. The model here is the program you get after that training. The trap: if the examples contain a mistake, like the red card in the picture, the model learns that too.
ML is already in your phone
A spam filter learned from emails people marked as spam. Your TikTok feed learns from what you watch to the end and what you swipe past. Face unlock was trained on a huge number of face photos. Same recipe every time: lots of examples with labels, meaning the right answers like “spam” or “not spam”. The model finds a pattern in them and applies it to new cases.
When you don't need ML
The outer AI ring is wider than ML: an enemy bot in a simple game often runs on hand-written rules. And that's fine. If a task can be described with a couple of clear rules, like “calculate tax at this rate”, a rule is better: it's cheaper, easier to understand and never makes random mistakes. ML makes sense when you can't put the rule into words, you have lots of examples, and a rare mistake isn't a disaster.
So where's ChatGPT here
ChatGPT, Claude and Gemini live in the smallest ring: they are language models. They were trained on a huge amount of text to guess which piece of text comes next. That one simple skill grows into answering questions, translating, summarizing notes and writing code. Spoiler: later in the course we'll see exactly how the model picks words and why it is sometimes confidently wrong.
Check yourself
- How is machine learning different from a regular program?
Correct answer: The model finds the rule itself from examples. In ML a person provides examples with right answers and the model finds the pattern. Hand-written rules are how regular programs work. - How are neural networks and language models related?
Correct answer: A language model is a kind of neural network for text. Language models sit inside the neural network ring: they are neural networks trained on text. Not the other way round. - A shop gives 10% off orders over $50. What's the best way to build that?
Correct answer: A simple rule written by hand in the code. The condition is one clear rule. A rule is cheaper, clearer and never makes random mistakes; ML would only add the risk of errors.