Product teams mix both: a classifier routes tickets; a generator drafts replies. Knowing which paradigm you need saves months of misfit tooling.
When to use discriminative models
- Fixed labels with abundant labeled data (fraud, churn, intent ID)
- Need calibrated probabilities for thresholds
- Smaller, cheaper models on tabular or vision features
See AI track supervised learning lessons for baselines.
When to use generative models
- Open-ended language, code, or creative variation
- Few-shot instructions instead of thousands of labels
- Assistants that must synthesize prose from many sources (with RAG)
Hybrid pattern
# Pseudocode: route then generate
intent = classifier("user message") # discriminative
if intent == "billing":
draft = llm.generate(policy_prompt + user_message) # generative
else:
draft = template_fallback(intent)
Important interview questions and answers
- Q: Can one product use both?
A: Yes—routing, safety classifiers, and RAG rerankers are often discriminative around a generative core.
Self-check
- When would you refuse an LLM for a churn model?
- What does the hybrid pseudocode optimize?
Tip: Sketch a flowchart: route (discriminative) → draft (generative) before buying GPU hours.
Interview prep
- When classifier?
Fixed labels, need calibrated probabilities, tabular features—classic ML often wins.
- Hybrid pattern?
Discriminative router picks workflow; generative model drafts language.