Think of it like this:

                 Artificial Intelligence
                         |
          ---------------------------------
          |                               |
   Rule-Based AI                 Machine Learning
                                          |
                              ---------------------
                              |                   |
                       Traditional ML       Deep Learning
                                                  |
                                           ----------------
                                           |
                                     Generative AI

1. Artificial Intelligence (AI)

AI is the biggest umbrella.

Definition:

Any system that allows machines to perform tasks that normally require human intelligence.

Examples:

AI does not necessarily mean the machine learned.


Example: Old Chess Computer

A chess engine can have millions of rules:

If opponent moves here:
    respond with this

If this position happens:
    play this move

Even though the rules are hardcoded, it is still considered AI because it performs a task that normally requires human thinking.

But it may not learn anything.

AI does not require learning.

It only requires the system to act intelligently.

Learning, or ML, is one way to achieve that. It is not a requirement.

That old chess engine is a good example of rule-based AI: smart behavior, but hand-coded, not learned.


2. Machine Learning (ML)

Machine Learning is a subset of AI.

The idea:

Instead of programming rules manually, let the machine learn rules from data.

Traditional programming:

Input + Rules
      |
      ↓
   Output

Example:

Age > 18
Salary > 50000
Credit score > 700

      ↓

Loan Approved

Human writes rules.


Machine Learning:

Input + Output Examples
          |
          ↓
     ML Algorithm
          |
          ↓
     Learns Rules

Example:

Give it:

Person A:
Age: 25
Salary: 80000
Credit Score: 750
Loan: Approved

Person B:
Age: 20
Salary: 20000
Credit Score: 400
Loan: Rejected

The algorithm discovers patterns.


Real World ML Examples

Netflix Recommendation

Netflix does not have a developer writing:

If user likes Avengers:
    recommend Iron Man

If user likes Comedy:
    recommend Friends

Instead:

Millions of users watch millions of movies.

ML finds patterns:

People who watched X
also watched Y

Spam Detection

Input:

Email text
Sender
Links
Attachments

Output:

Spam / Not Spam

ML learns the relationship.


3. Deep Learning (DL)

Deep Learning is a special type of Machine Learning.

The difference:

Traditional ML:

Humans often choose important features.

Example:

For house price prediction, a human tells the model:

Number of rooms
Location
Area
Age

Then ML learns.


Deep Learning:

The model learns features by itself using raw data.

Example:

Image recognition.

Traditional ML:

Human says:

Look at:
- edges
- colors
- shapes

Deep Learning:

Give it:

10 million images

It automatically learns:

Pixels
 ↓
Edges
 ↓
Shapes
 ↓
Objects

Neural Networks

Deep Learning uses something called:

Artificial Neural Networks

Inspired loosely by the human brain.

Human brain:

Neuron
Neuron
Neuron

Computer:

Artificial Neuron
Artificial Neuron
Artificial Neuron

Connected together:

Input Layer

     ↓

Hidden Layers

     ↓

Output Layer

Many layers = Deep learning.


Example:

Image:

Cat image

Deep Learning network:

Pixels

 ↓

Lines

 ↓

Eyes

 ↓

Ears

 ↓

Cat

4. Generative AI

Now we reach today's boom.

Generative AI means:

AI that can create new content.

Examples:

Text:

Images:

Music:

Code:


Traditional AI:

Question:

Is this email spam?

Output:

Yes

It classifies.


Generative AI:

Question:

Write an email to my manager

Output:

Creates new text

It generates.


Where do LLMs Fit?

LLM = Large Language Model

LLMs are:

AI
 |
Machine Learning
 |
Deep Learning
 |
Generative AI
 |
Large Language Models

Examples:

They specialize in language.


Simple Comparison Table

Technology Purpose Example
AI Make machines intelligent Chess AI
ML Learn patterns from data Spam detection
Deep Learning Learn complex patterns Face recognition
Generative AI Create new content ChatGPT
LLM Generate and understand language GPT