GeekHub Learn
Module

Discriminative versus Generative AI in 60 seconds

Every AI model in the world is doing one of two things: drawing a line between things, or creating new things. Once you see this split, model choice becomes obvious.

A bouncer at a club is discriminative: looks at you and decides "in" or "out". An artist drawing a portrait is generative: produces something new that did not exist before.

  • Discriminative models answer: "What category does this input belong to?" or "What is the predicted value?". Examples: spam or not spam, house price, image of a cat or dog.
  • Generative models answer: "Given this prompt, produce a plausible new sample." Examples: write an essay, draw a logo, compose music.

Mathematically, discriminative models learn P(label | input). Generative models learn P(input) and then sample from it. You do not need to compute this, but knowing the framing helps you read papers.

Visualize it

A two-column diagram. Left column "Discriminative" with arrows: image -> label, email -> spam or not, transaction -> fraud or not. Right column "Generative" with arrows: prompt -> essay, prompt -> image, prompt -> music.

Try it now

In ChatGPT, run two prompts. First: "Classify this email as spam or not: [paste]". Second: "Write a sample spam email about a fake lottery win." First is discriminative use of an LLM, second is generative.

Hands-on lab

Pick three real apps you use. For each, identify whether the AI inside is discriminative, generative, or both. Examples to start: TikTok, Photoshop, Gmail.

Try it now

Is Google Translate discriminative or generative? Defend either answer in two sentences.

Common mistakes

  • Assuming LLMs are always generative. They can be used discriminatively (classify, score, route).
  • Confusing "creative" with generative. A creative-looking output can still be a classification underneath.

Debugging tip

If your AI app is unreliable, ask whether you are using a generative model for what is really a discriminative job. Often, a tiny classifier solves it.

Challenge

Take your favorite SaaS app. Sketch two AI features: one discriminative, one generative. Specify inputs, outputs, and which would be more valuable to ship first.

Where this shows up

  • Discriminative: fraud detection, content moderation, search ranking
  • Generative: writing assistants, image generation, code completion
  • Mixed: AI agents that classify intent then generate a response

From the field

Most 2026 production AI features are 80% discriminative under the hood, with a generative layer on top to make outputs natural. Knowing this lets you architect for cost and reliability.

Recap

Every AI task is either picking a label or producing new content. LLMs can do both, but treat them as expensive generative tools and reach for classifiers when classification is what you need.


Quick recall

3 prompts · think before you flip

Prompt 1 of 3

Define discriminative vs generative in one sentence each.

Quiz time

1 question · tap an answer to check it

  1. 1. A model that decides if a tweet is positive or negative is

Finished lesson 1.3?

Mark complete to update your module progress and unlock the streak.

Loading