AI vs ML vs Deep Learning vs Generative AI
Clear definitions, how the fields relate, which problems each solves, and how an architect chooses between rules, classical ML, deep learning and generative AI.
Definitions
| Term | Meaning | Examples |
|---|---|---|
| Artificial intelligence (AI) | Broad field of systems performing tasks that normally require human intelligence | Rules engines, search, planning, ML |
| Machine learning (ML) | Systems that learn patterns from data rather than explicit rules | Fraud scoring with gradient-boosted trees, demand forecasting |
| Deep learning (DL) | ML using multi-layer neural networks; excels on unstructured data | Image recognition, speech, translation |
| Generative AI | Models that generate new content (text, images, code, audio) | LLMs (Claude, GPT, Gemini, Llama), diffusion image models |
| Foundation model | Large model pre-trained on broad data, adaptable to many tasks | LLMs, multimodal models, embedding models |
flowchart TB AI[Artificial intelligence] --> ML[Machine learning] ML --> DL[Deep learning] DL --> GEN[Generative AI<br/>LLMs, diffusion] AI --> SYM[Symbolic AI<br/>rules, search, planning] ML --> CLS[Classical ML<br/>trees, regression, clustering]
Choosing the right approach
| Problem | Best fit | Why |
|---|---|---|
| Deterministic policy (tax rules, eligibility) | Rules engine / code | Explainable, exact |
| Tabular prediction (churn, fraud, credit risk) | Classical ML (XGBoost/LightGBM) | Accurate, cheap, explainable with SHAP |
| Images, audio, sensor patterns | Deep learning | Learns features from raw data |
| Language understanding and generation, summarization, Q&A over documents, coding help | Generative AI (LLMs) + RAG | Flexible, zero/few-shot |
| Semantic search, similarity | Embedding models + vector search | Meaning-based retrieval |
| Ranking and recommendations | Two-tower DL + ranking models | Scale, personalization |
[!ARCHITECT] LLMs are not the answer to every AI problem. For structured prediction, classical ML is usually cheaper, faster, more accurate and easier to govern. Use LLMs where language, unstructured content or flexible reasoning is central.
Interview questions and answers
A stakeholder wants "an LLM to detect fraud in transactions". How do you respond?
Fraud on tabular transaction data is best served by classical ML with streaming features and rules; LLMs could help investigators summarize cases or explain alerts. Propose the right tool for each part and evaluate against baselines.