HomeFoundations

AI, ML & Neural Networks — explained without jargon

Before transformers, RAG, or agents, three ideas underpin everything modern AI does. Here's how they fit together.

The nesting doll

AI is the largest circle. Inside it sits Machine Learning. Inside ML sits Neural Networks. Inside NNs sits Deep Learning, and inside Deep Learning sit today's Large Language Models.

AI ───────────────────────────────────────────
 └─ Machine Learning ─────────────────────────
     └─ Neural Networks ─────────────────────
         └─ Deep Learning ──────────────────
             └─ Transformers / LLMs ───────

Artificial Intelligence (AI)

The broadest field — building systems that perform tasks we'd normally call 'intelligent': perception, reasoning, planning, language, and decision-making.

  • Umbrella term — includes rule-based expert systems, search algorithms, robotics, and modern ML.
  • Goal: make machines act rationally given inputs and goals, not necessarily 'think like humans'.
  • Two loose camps: Narrow AI (today's models, great at one task) and AGI (hypothetical, general-purpose).
  • Every LLM, chatbot, recommender, and self-driving stack is a kind of AI system.

Machine Learning (ML)

A subset of AI where systems learn patterns from data instead of being explicitly programmed with rules.

  • Supervised learning — learn a mapping from labeled examples (e.g., spam vs. not-spam).
  • Unsupervised learning — find structure in unlabeled data (clustering, embeddings).
  • Reinforcement learning — learn by trial-and-error to maximize a reward signal.
  • Workflow: data → features → model → loss function → optimizer → evaluation.

Neural Networks (NN)

A family of ML models loosely inspired by the brain — stacked layers of simple units (neurons) that transform inputs into useful representations.

  • Each neuron computes a weighted sum of inputs, adds a bias, and applies a non-linear activation.
  • Layers compose: early layers learn low-level features, deeper layers learn abstract concepts.
  • Trained via backpropagation + gradient descent on a loss function.
  • Deep learning = neural networks with many layers; Transformers (the backbone of LLMs) are a specific NN architecture.

Quick comparison

ConceptWhat it isExample
AIAny system that behaves intelligentlyChess engine, route planner
MLAI that learns from dataSpam filter, recommender
NNML model of layered neuronsImage classifier, transformer

Ready to go deeper?

Continue with the AI & ML Fundamentals lesson.

Open the lesson