AI, machine learning, deep learning and Generative AI: how they fit together

A plain-language guide to the difference between AI, machine learning, deep learning and Generative AI, with a diagram and a worked example.

3 min read Updated Data Is Easy
On this page
  1. Artificial intelligence: the whole field
  2. Machine learning: systems that learn from data
  3. Deep learning: many-layered neural networks
  4. Generative AI: models that create
  5. A worked example: one problem, four approaches
  6. What this means for your learning path

“AI”, “machine learning”, “deep learning” and “Generative AI” are often used as if they mean the same thing. They do not, and knowing the difference makes it much easier to choose what to learn and to understand what a tool can actually do. The quick answer: each one sits inside the one before it.

How AI, machine learning, deep learning and Generative AI nest inside each otherFour nested rounded rectangles. The outermost is artificial intelligence, containing machine learning, which contains deep learning, which contains Generative AI.Artificial intelligenceMachine learningDeep learningGenerative AIcreates new text, images, audio, coderules + search + learninglearns from datamany-layered neural networks
Each field is a subset of the one around it.

Artificial intelligence: the whole field

Artificial intelligence is the broad goal of building computer systems that perform tasks we associate with human intelligence: understanding language, recognising images, planning, making decisions. It includes approaches that involve no learning at all, such as a chess program that searches through possible moves, or an expert system built from hand-written rules.

Machine learning: systems that learn from data

Machine learning is the part of AI where, instead of writing the rules, you give the computer examples and let it find the rules. Show a model thousands of past loan applications labelled “repaid” or “defaulted” and it learns which patterns predict each outcome.

Classic machine learning models, such as linear regression, decision trees and random forests, work very well on structured, table-shaped data. They remain the right tool for many business problems, and they are where most people should start. Our tutorial Build your first machine learning model with scikit-learn walks through the full workflow.

Deep learning: many-layered neural networks

Deep learning is the part of machine learning that uses neural networks with many layers. Each layer transforms its input a little, and stacking many layers lets the network learn very complex patterns directly from raw data such as pixels, audio waveforms or text, without people having to design the features by hand.

Deep learning powers image recognition, speech-to-text and machine translation. It needs much more data and computing power than classic machine learning, which is why it took off once large datasets and GPUs became widely available.

Generative AI: models that create

Most machine learning models predict or classify: is this email spam, what will sales be next month. Generative AI models create new content that resembles what they were trained on: text, code, images, music or video.

  • Large language models (LLMs) such as GPT, Llama and Mistral generate text by repeatedly predicting the next token, a word or part of a word.
  • Diffusion models such as Stable Diffusion generate images by learning to remove noise step by step.
  • Multimodal models work across text, images and audio together.

Almost all modern Generative AI is built with deep learning, in particular the transformer architecture, which is why it sits at the centre of the diagram.

A worked example: one problem, four approaches

Imagine an online shop that wants to handle customer reviews.

Approach What it does
Rule-based AI Flags any review containing words from a list such as “broken” or “refund”.
Machine learning Learns from thousands of labelled reviews to predict whether a new one is positive or negative.
Deep learning Reads the raw text with a neural network and picks up sarcasm and context that keyword rules miss.
Generative AI Summarises a month of reviews into the top five complaints and drafts a reply to each unhappy customer.

What this means for your learning path

Generative AI gets the headlines, but it rests on the layers beneath it. Python, data handling and basic statistics come first; machine learning concepts such as training data, testing and evaluation apply to every layer above them. That is the order the Generative AI learning roadmap follows, and the order the free tutorials are arranged in.

Key takeaways

  • AI is the broad field; machine learning is the part that learns from data
  • Deep learning uses many-layered neural networks on raw data
  • Generative AI creates new content and is built on deep learning
  • Classic machine learning is still the best tool for many table-shaped problems