Machine learning (ML) is a subset of AI: systems that improve performance on a task by learning patterns from data rather than only hand-written rules. Not every AI product uses ML—some use search, graphs, or optimization—but modern AI usually does.
Venn diagram mental model
| Term | Meaning |
|---|---|
| AI | Umbrella: intelligent behavior in software |
| ML | Learn from data (supervised, unsupervised, RL) |
| Deep learning | ML with multi-layer neural networks |
| Gen AI | Models that generate text, images, code, etc. |
See Generative AI after this track for prompting and RAG.
When ML helps
- Patterns too complex for manual rules (vision, language)
- Data shifts over time—retraining beats rewriting rules
- Personalization at scale (recommendations)
When simpler methods win
Small data, strict interpretability requirements, or well-known business logic—start with SQL aggregates, heuristics, or linear models before deep nets.
Important interview questions and answers
- Q: Is every AI system ML?
A: No—expert systems and some optimizers are AI without classic ML training loops. - Q: Deep learning vs ML?
A: Deep learning is ML using neural networks with many layers.
Self-check
- Place deep learning in the AI/ML hierarchy.
- Name one case where rules beat ML.
Tip: Draw AI ⊃ ML ⊃ deep learning on paper once; reuse in every stakeholder meeting.
Interview prep
- ML within AI?
- ML learns patterns from data; AI is the broader umbrella including non-ML systems.
- Deep learning?
- ML using multi-layer neural networks—strong for vision, language, audio.