2. Machine Learning, Deep Learning and Generative AI
2.1 The relationship
Think of the fields as a hierarchy:
Artificial Intelligence
|
+-- Machine Learning
| |
| +-- Deep Learning
|
+-- Other AI approaches
|
+-- Generative AI applications
The exact taxonomy is more nuanced, but this is a useful beginner mental model.
2.2 Supervised learning
In supervised learning, training examples contain known targets.
Input + Label
|
v
Model training
|
v
Model
Example:
Email -> spam
Email -> not spam
2.3 Unsupervised learning
The system looks for structure without a supplied target label.
Examples:
- Clustering
- Dimensionality reduction
- Pattern discovery
2.4 Reinforcement learning
An agent interacts with an environment and receives feedback.
Agent
|
v
Action
|
v
Environment
|
v
Reward
|
+----> Agent
2.5 Neural networks
A neural network contains connected computational units organized into layers.
Input layer
|
Hidden layers
|
Output layer
Deep learning uses many such layers.
2.6 Generative models
Generative systems learn patterns that allow them to produce new outputs.
For language:
Instruction
|
v
Language model
|
v
Generated text/code
For image generation:
Prompt
|
v
Image model
|
v
Image
2.7 Why this matters for developers
You do not need to train an LLM to use AI effectively as a developer.
Modern AI engineering often focuses on:
- Model selection
- Prompt design
- Context engineering
- Tool integration
- Retrieval
- Agent design
- Evaluation
- Safety
- Observability
Exercise
Describe a software product and identify:
- Where traditional software is sufficient.
- Where ML could help.
- Where Generative AI could help.
- Where an AI agent could help.