Begin with the central question
When should we choose a simple predictor, a deep neural network, or a generative model?
This question explains why ML vs Deep Learning vs Generative AI deserves its own lesson. Each definition, calculation, and code example below will answer a specific part of it.
problem + data + constraints → choose ML, deep learning, generative AI, or a combination
Before you continue: three tools for this module
- Structured data: rows and columns with defined fields.
- Unstructured data: text, images, audio, or video.
- Generative: producing new content rather than only assigning a score or category.
You do not need to memorize these yet. Return to this small map whenever a term reappears.
What You Will Understand
- Field Hierarchy: Build a precise mental model of how Artificial Intelligence, Machine Learning, Deep Learning, Generative AI, and LLMs nest together.
- Definition Boundaries: Clearly distinguish between models defined by architecture (Deep Learning) versus those defined by output content (Generative AI).
- Agentic Architectures: Understand why Agentic AI is an application pattern using LLMs to plan and invoke tools, rather than a model category itself.
Why Similar-Sounding AI Terms Need Clear Boundaries
These terms get used loosely, inconsistently, and sometimes interchangeably in casual conversation, marketing material, and even some technical writing — which creates genuine confusion about what’s actually being discussed.
An AI engineer needs crisp, correct definitions, specifically because misusing these terms (or not understanding their actual relationship) is an extremely common and easily-avoidable stumbling point in technical interviews and technical communication more broadly.
A Family Tree with Overlapping Branches
Nested circles are a useful first approximation, but the boundaries are not a perfect Russian doll. Deep learning is a type of machine learning. Generative AI describes what a system produces, so modern generative systems usually use deep learning even though “generative” is not itself one neural-network architecture. Agentic AI describes an application pattern that can combine models, tools, memory, and ordinary software.
graph LR
AI["Artificial Intelligence<br/>broad field"] --> ML["Machine Learning<br/>learns from data"]
ML --> DL["Deep Learning<br/>many-layer neural networks"]
DL --> LLM["Large Language Models<br/>deep-learning language models"]
GEN["Generative AI<br/>defined by generating content"]
DL -.->|commonly powers| GEN
LLM -.->|is a major example of| GEN
AGENT["Agentic AI<br/>application pattern"]
LLM -.->|can provide reasoning| AGENT
AGENT -.->|also combines| TOOLS["Tools, memory,<br/>workflows and ordinary code"]
4. Core Concept — Precise Definitions
| Term | Definition |
|---|---|
| Artificial Intelligence (AI) | The broadest field: building systems that perform tasks normally requiring human intelligence — includes rule-based systems, search algorithms, and ML, among much else |
| Machine Learning (ML) | A specific approach to AI: systems that learn patterns from data, rather than following explicitly hand-coded rules (this entire course) |
| Deep Learning | A specific approach to ML: using neural networks with many layers to learn increasingly complex, hierarchical representations directly from data |
| Generative AI | AI systems (typically, though not exclusively, deep learning-based) specifically designed to generate new content — text, images, audio, code — rather than just classify or predict a single value |
| LLMs (Large Language Models) | A specific kind of generative AI: deep learning models (specifically, transformer-based) trained on massive amounts of text, capable of generating and understanding natural language |
| Agentic AI | Systems (typically built on LLMs) that autonomously plan, reason, take actions (via tools), and pursue multi-step goals — a way of using AI/LLM capabilities, not a separate technology layer in the same nested hierarchy |
🧠 Important clarification: not every AI system is ML
AI includes things like:
- A chess engine using explicit search algorithms (classic AI, NOT ML)
- A rule-based expert system (classic AI, NOT ML)
- A spam filter using logistic regression (AI AND ML)
- An LLM (AI AND ML AND deep learning AND generative AI)
🧠 The single most common interview confusion this module resolves: people often use “AI” and “ML” interchangeably, when AI is genuinely the broader field, and ML is one (extremely dominant, in modern practice) approach to building AI systems — not the only one, even though it’s by far the most prevalent approach in current AI development.
🧠 Deep learning is a SUBSET of ML, not a separate thing
Every algorithm covered in Modules 7-16 (linear regression, decision trees, SVM, etc.) is “classical” ML — deep learning specifically refers to neural networks with multiple (“deep”) layers. A random forest is ML but NOT deep learning. An LLM is ML AND deep learning.
🧠 Generative AI is defined by WHAT it produces, not just its
architecture
NOT generative: a classifier predicting "spam" or "not spam"
(predicts a category, doesn't generate new content)
NOT generative: a regression model predicting house price
(predicts a number, doesn't generate new content)
GENERATIVE: an LLM writing an original essay
an image model creating a new picture
a code model writing a new function
🧠 Most (though not literally all) modern generative AI is built using deep learning — but the defining characteristic of “generative” is that it produces new content, not the specific underlying architecture used to achieve that.
🧠 Agentic AI is fundamentally different from the other terms in this
list
Every other term in this module describes a type of model or technology. Agentic AI describes a pattern of using a model (almost always an LLM) — giving it the ability to plan, use tools, take multi-step actions, and pursue a goal somewhat autonomously, rather than simply responding once to a single prompt.
This is why Agentic AI sits outside the neat nested-circles diagram: it’s not “more specific” than an LLM in the same sense that an LLM is more specific than deep learning — it’s a different kind of concept entirely (an application pattern, not a model category).
5. How It Works — Step by Step (Tracing the Relationships)
1. Someone wants to build an "AI system" — the broadest possible goal
2. They choose an APPROACH: rule-based logic, search algorithms,
or MACHINE LEARNING (the overwhelming majority choice today)
3. Within ML, they choose a TECHNIQUE: classical ML (Modules 7-16
of this course) or DEEP LEARNING (neural networks)
4. If the goal is to GENERATE new content (not just classify/predict),
they're building GENERATIVE AI — usually (though not always)
using deep learning
5. If the generative content is specifically NATURAL LANGUAGE TEXT,
built on the transformer architecture, trained on massive text
corpora — this is an LLM
6. If they then use that LLM in a system that can PLAN, use TOOLS,
and take AUTONOMOUS MULTI-STEP ACTIONS toward a goal — this is
AGENTIC AI (a usage pattern, layered on top of an LLM)
6. Mathematical Intuition
Read the mathematics as a story
problem + data + constraints → choose ML, deep learning, generative AI, or a combination
First identify the input, the operation, and the output. Then read the symbols as a shorter way to describe that same journey; do not begin by memorizing the formula.
This module is conceptual rather than mathematical — but one useful, concrete distinction worth internalizing numerically:
Classical ML model (e.g., logistic regression):
thousands to millions of parameters, typically
Deep learning model (a moderate neural network):
millions to low billions of parameters
LLM (a modern foundation model):
billions to hundreds of billions+ of parameters
🧠 This isn’t the defining difference between these categories (a concept, not a parameter count, defines each term) — but it’s a genuinely useful, concrete intuition for the typical scale each category operates at in practice today.
7. Small Worked Example
Walk through the example
- Identify what each input number represents.
- Follow one operation at a time and keep the units or class meanings attached.
- Translate the result back into an ordinary sentence about the original problem.
The goal is not merely to obtain the answer; it is to expose the model’s decision process.
A company building a customer support system might use:
- Classical ML (logistic regression) to classify incoming tickets by urgency — NOT deep learning, NOT generative, just classical supervised classification (Module 8).
- Deep learning (a neural network) for a more complex image classification task, like verifying uploaded product-damage photos — ML and deep learning, but NOT generative (it classifies, doesn’t create new content).
- Generative AI / an LLM to draft a suggested email response to a customer — genuinely generating new text content.
- Agentic AI if that LLM is further given the ability to autonomously check order status, issue a refund, and follow up with the customer across multiple steps, without a human manually directing each individual action.
All four of these are legitimately “AI” — but they occupy very different, specific positions in this module’s hierarchy.
8. Python Example
What the code will demonstrate
The following ML vs Deep Learning vs Generative AI code turns the worked example into an experiment you can repeat. First predict the result; then prepare the small dataset, apply the technique, inspect the important intermediate values, and compare the actual output with your prediction.
Python and library symbols used below
- NumPy (
np) stores and calculates with numeric arrays. - pandas (
pd) represents table-shaped data when it is used. - scikit-learn provides tested implementations with a consistent
.fit(...)and.predict(...)workflow.
# Illustrating the hierarchy with concrete code examples at each level
# --- Classical AI (rule-based, NOT machine learning at all) ---
def classify_urgency_rule_based(ticket_text):
if "urgent" in ticket_text.lower() or "asap" in ticket_text.lower():
return "high"
return "normal"
print("Rule-based AI (not ML):", classify_urgency_rule_based("This is urgent!"))
# --- Machine Learning (classical, NOT deep learning) ---
from sklearn.linear_model import LogisticRegression
import numpy as np
X_train = np.array([[5, 1], [0, 0], [8, 1], [1, 0]])
y_train = np.array([1, 0, 1, 0])
ml_model = LogisticRegression()
ml_model.fit(X_train, y_train)
print("Classical ML prediction:", ml_model.predict([[6, 1]]))
# --- Deep Learning (a simple neural network, NOT generative) ---
# Conceptual sketch — a neural network classifying, not generating:
# model = Sequential([Dense(64), Dense(32), Dense(1, activation="sigmoid")])
# This predicts a category/value; it does not GENERATE new content.
print("\nDeep learning: a neural network classifier -- predicts, doesn't generate")
# --- Generative AI / LLM (generates NEW content) ---
# response = llm_client.generate("Write a customer apology email")
# This CREATES new text that didn't exist before -- the defining
# characteristic of generative AI.
print("Generative AI: produces genuinely NEW content (text, images, etc.)")
# --- Agentic AI (autonomous, multi-step, tool-using) ---
def simple_agent_loop(goal, tools, max_steps=3):
"""A simplified sketch of an agent autonomously using tools toward a goal."""
for step in range(max_steps):
# In reality: an LLM decides the next action based on the goal and history
print(f" Agent step {step + 1}: reasoning about goal '{goal}'...")
if step == 1:
print(" Agent decides task is complete.")
break
print("\nAgentic AI: autonomous, multi-step, tool-using pattern:")
simple_agent_loop("resolve customer refund request", tools=["check_order", "issue_refund"])
Expected Output:
Rule-based AI (not ML): high
Classical ML prediction: [1]
Deep learning: a neural network classifier -- predicts, doesn't generate
Generative AI: produces genuinely NEW content (text, images, etc.)
Agentic AI: autonomous, multi-step, tool-using pattern:
Agent step 1: reasoning about goal 'resolve customer refund request'...
Agent step 2: reasoning about goal 'resolve customer refund request'...
Agent decides task is complete.
How It Works
This code deliberately walks through each level of the hierarchy with a
genuinely distinct, concrete example — showing that “AI” spans everything
from a simple if statement to an autonomous multi-step agent loop, and
that each narrower term (ML, deep learning, generative AI, Agentic AI)
adds a specific, meaningful additional constraint on top of the broader
term it sits inside.
9. Real-World Example
A single company’s AI product roadmap might genuinely span this entire hierarchy: a rule-based fraud check (classic AI, no ML) for the most obvious, clear-cut cases; a classical ML gradient boosting model (Module 9) for nuanced fraud scoring; a deep learning computer vision model for verifying document photos; an LLM (generative AI) for drafting customer communications; and an Agentic AI layer orchestrating all of these components together to autonomously handle an end-to-end customer support workflow.
Recognizing that these are genuinely different, specific technologies — not interchangeable buzzwords — is essential for making sound architectural and hiring decisions.
10. How This Is Used in AI
From mechanism to product
The categories overlap rather than compete: deep learning is part of ML, and many generative systems use deep-learning models. Production systems often combine all three with rules and software.
How this connects to LLMs
request → data or context preparation → model computation → evaluated output
An LLM may use this idea during training, or an AI application may use a separate ML component around the LLM. Those are different locations in the system, and the explanation below identifies which one applies.
🤖 How Is This Used in AI?
This entire module is about AI terminology and architecture — the practical payoff is being able to communicate and reason precisely:
- When a stakeholder says “let’s use AI to solve this,” a precise AI engineer can ask the genuinely important follow-up: does this need generative capability (an LLM), or would a much simpler, cheaper, faster classical ML classifier (Module 8) solve it just as well?
- When reading a paper, blog post, or job description mentioning “generative AI experience” vs. “ML experience” vs. “deep learning experience,” you can now accurately assess what’s genuinely being asked for, rather than treating these as vague synonyms.
- Recognizing that not every problem needs an LLM — Module 20’s full architecture explicitly relies on classical ML for many of its components precisely because they don’t need generative capability, and classical ML is faster, cheaper, and more interpretable for those specific sub-tasks.
11. How This Is Used in Agentic AI
Trace one agent step
goal + state → model proposes → runtime validates → tool or response → evaluation
The model produces a prediction or proposal. The agent runtime is ordinary software that manages tools, permissions, state, retries, and execution; it may use this ML concept directly, indirectly through an LLM, or not at all.
🤖 Agentic AI is specifically the newest, most specialized concept in this hierarchy, and precisely because it’s an application pattern rather than a model type, it’s often the most misunderstood in casual conversation.
A system doesn’t become “agentic” just because it uses an LLM — it becomes agentic specifically when it exhibits autonomous, multi-step planning and tool use toward a goal, without a human directing every individual step. A single LLM API call generating one response, however impressive, is generative AI — not, by itself, Agentic AI.
12. Common Beginner Mistakes
⚠️ Mistake
Incorrect idea: Using “AI” and “ML” as perfect synonyms
Why it is incorrect: As Section 4 establishes, AI is the broader field; ML is one (dominant, but not exclusive) approach within it. Precise language matters, especially in technical interviews.
⚠️ Mistake
Incorrect idea: Assuming “deep learning” and “generative AI” are the same thing
Why it is incorrect: Most generative AI today happens to be built using deep learning, but deep learning also powers plenty of non-generative systems (image classifiers, fraud detection neural networks) — the terms describe genuinely different properties (architecture type vs. what the system produces).
⚠️ Mistake
Incorrect idea: Calling any LLM-powered application “Agentic AI.”
Why it is incorrect: A chatbot that responds to one prompt at a time, however sophisticated its single response, isn’t inherently agentic — Agentic AI specifically requires the autonomous, multi-step, tool-using pattern described in Section 4.
13. Important Distinctions
| AI | ML |
|---|---|
| The broad field: building systems that perform intelligent tasks | A specific approach to AI: learning patterns from data |
| Includes rule-based systems, search, AND ML | A subset of AI |
| Machine Learning | Deep Learning |
|---|---|
| Broad category: any pattern-learning-from-data approach | A specific ML technique: neural networks with many layers |
| Includes linear regression, decision trees, SVM, AND deep learning | A subset of ML |
| Deep Learning | Generative AI |
|---|---|
| Describes the ARCHITECTURE (neural networks, many layers) | Describes the OUTPUT (generates new content) |
| Not all deep learning is generative (e.g., image classifiers) | Most, but not all, generative AI uses deep learning |
| Generative AI / LLM | Agentic AI |
|---|---|
| A type of model/technology | A pattern of USING a model (typically an LLM) |
| Generates content in response to input | Autonomously plans and takes multi-step actions toward a goal |
14. When Should You Use This?
Use this precise vocabulary whenever:
- Communicating with stakeholders or teammates about what technology approach actually fits a given problem.
- Reading job descriptions, papers, or documentation, to accurately assess what’s genuinely being described.
- In technical interviews — precisely defining these terms, and correctly placing them in relation to each other, is a genuinely common interview topic, and getting it right signals real technical fluency.
15. When Should You NOT Use This?
This module is about precision in terminology — there’s no scenario where using these terms precisely and correctly is a bad idea.
The only caveat: in casual, non-technical conversation, insisting on perfect precision with every term can come across as pedantic — reserve the precision for contexts where it genuinely matters (technical decisions, interviews, architecture discussions), while remaining understanding that looser usage is common in everyday, non-technical conversation.
16. Production Considerations
- Right-sizing technology choices — this module’s hierarchy directly informs a genuinely practical production decision: don’t reach for an expensive, complex LLM/generative AI solution when a simple, cheap, fast classical ML classifier (Module 8) solves the actual problem just as well.
- Team skill alignment — “ML engineer,” “deep learning engineer,” and “Agentic AI engineer” are genuinely different (though overlapping) skill sets in practice; understanding these distinctions helps with hiring, team structure, and project scoping decisions.
- Cost and latency implications — as you move down this hierarchy (AI → ML → deep learning → generative AI/LLMs), models generally become more capable but also more expensive and slower to run — a real, practical trade-off in every architectural decision.
17. AI Engineer Takeaway
🎯 AI Engineer Takeaway: AI, ML, deep learning, generative AI, LLMs, and Agentic AI are genuinely distinct, precisely-nestable concepts — not interchangeable buzzwords.
AI is the broadest field; ML is a specific (dominant) approach within it; deep learning is a specific ML technique; generative AI is defined by producing new content (usually, but not necessarily, via deep learning); LLMs are a specific kind of generative AI focused on language; and Agentic AI is a pattern of using these models (almost always LLMs) for autonomous, multi-step, tool-using tasks — sitting outside the neat nesting as an application pattern rather than a model category.
Getting this hierarchy precisely right is one of the most common, easily-prepared-for pieces of technical communication in AI engineering interviews.
18. Interview Questions
Basic Questions
Q: What is the relationship between AI and ML?
A: AI (Artificial Intelligence) is the broad field of building systems that perform tasks normally requiring human intelligence. Machine Learning is one specific approach to building AI systems — specifically, systems that learn patterns from data rather than following explicitly hand-coded rules. ML is a subset of AI, not a synonym for it — AI also includes non-ML approaches like rule-based systems and classical search algorithms.
Q: Is every deep learning model a generative AI model?
A: No. Deep learning refers to a specific architectural approach (neural networks with many layers), which can be used for many different kinds of tasks — including classification and regression tasks that are NOT generative (like an image classifier or a fraud-detection neural network). Generative AI is specifically defined by what a system produces — new content, like text or images — not by its underlying architecture. Most modern generative AI happens to use deep learning, but not all deep learning is generative.
Intermediate Questions
Q: Why is Agentic AI considered structurally different from the AI → ML → Deep Learning → Generative AI → LLM hierarchy?
A: The other terms in that hierarchy each describe a specific type of model or technology, each one a more specific subset of the one before it. Agentic AI instead describes a pattern of using a model (almost always an LLM) — giving it the ability to autonomously plan, use tools, and take multi-step actions toward a goal, rather than simply responding once to a single prompt. It’s an application/usage pattern layered on top of a model, not itself a narrower category of model within the nested hierarchy.
Q: Give an example of a system that is AI, but NOT machine learning.
A: A rule-based expert system or a classic chess engine using explicit search algorithms (like minimax) are genuine examples of AI that involve no machine learning at all — they perform intelligent, human-like tasks (playing chess, making decisions based on explicit logic) without learning any patterns from data; their behavior is entirely defined by hand-coded rules or algorithms designed directly by engineers.
Scenario-Based Questions
Q: A non-technical stakeholder asks your team to “add AI” to a simple product feature that flags potentially duplicate customer records. How would you use this module’s mental model to guide the actual technical decision?
A: Thought process: This is a great practical opportunity to demonstrate that “adding AI” doesn’t automatically mean reaching for the most advanced, generative end of the hierarchy — the right technology choice depends on precisely what the task actually requires.
Investigation: Duplicate record detection is fundamentally a similarity/ classification problem — determining whether two records likely represent the same underlying entity. This doesn’t require generating new content at all, so generative AI/LLMs aren’t the natural fit by the very definition established in Section 4. It could be solved with classical ML (a similarity-scoring model comparing record fields, Module 8/10) or even potentially embeddings (Module 18) for comparing fuzzy text fields like names/addresses — but doesn’t need an LLM’s language generation capability.
Correct answer: Recommend a classical ML or embedding-based similarity- matching approach rather than an LLM-based solution — explaining to the stakeholder that “AI” doesn’t mean one single technology, and that a faster, cheaper, more reliable classical ML/embedding-based approach is the better technical fit for this specific, non-generative task, while reserving generative AI/LLM usage for parts of the product that genuinely need to produce new natural-language content.
Production consideration: This scenario is a genuinely common, practical situation — a non-technical stakeholder’s request phrased in terms of “AI” broadly, needing an AI engineer’s precise understanding of this module’s hierarchy to translate that request into the right, most cost-effective and reliable underlying technology choice, rather than defaulting to whatever’s currently most fashionable (often, currently, generative AI/LLMs) regardless of actual fit.
Next: Module 23 — Practical ML with Python and scikit-learn — one complete, realistic end-to-end ML project, from raw data to final predictions.
- Author
- TechByteByByte Editorial Team
- Reviewed by
- TechByteByByte Admin
- Published
- Last reviewed