Artificial intelligence, machine learning, deep learning, and generative AI are often discussed as if they were interchangeable. They are related, but each term describes a different scope or technique. This note builds a practical map of those relationships and explains what changes between training a model, running inference, and adapting a foundation model for a specific use case.
Artificial Intelligence
Artificial intelligence is the broad field of building machines that perform tasks associated with intelligent behaviour. Those tasks can include perception, learning, reasoning, planning, language use, and decision-making.
One useful engineering definition treats an AI system as an agent: it perceives an environment and chooses actions intended to increase the likelihood of achieving a goal. This definition does not require a machine to reproduce human thought exactly. A system can behave intelligently while using mechanisms very different from a biological brain.
AI also includes more than machine learning. Rule-based systems, search algorithms, planning systems, and expert systems can all exhibit useful intelligent behaviour without learning their rules from data.
How the Main Terms Relate
A helpful simplified hierarchy is:
- Artificial intelligence is the broadest field.
- Machine learning is an approach to AI in which systems improve task performance by learning patterns from data.
- Deep learning is a family of machine-learning methods built around neural networks with multiple processing layers.
- Much of today’s generative AI is implemented using deep-learning models that learn to produce new text, images, audio, video, or other data.
The boundaries are not perfect. Generative methods existed before modern deep learning, and not every AI system uses machine learning. The hierarchy is a useful map, not a strict definition of every system.
Machine Learning
Machine learning develops methods that allow computers to learn patterns from data rather than requiring every decision rule to be written explicitly. It sits at the intersection of artificial intelligence, statistics, optimization, and computer science.
At a high level, a training algorithm uses examples to estimate a model. Once trained, the model maps new inputs to outputs such as a category, probability, numerical forecast, or generated response.
This gives us two distinct phases:
- Training adjusts model parameters using data and an objective that measures performance.
- Inference applies the trained model to new input to produce a prediction or decision.
Batch and Online Inference
Batch inference processes a collection of inputs together, often on a schedule. Examples include scoring a daily set of transactions, classifying an image archive, or generating an analytics report. It is useful when immediate results are unnecessary and throughput matters more than latency.
Online inference, often called real-time inference, handles requests as they arrive. Chat assistants, fraud detection, recommendation systems, and driver-assistance systems commonly need this model. Latency, availability, and predictable resource usage become important design constraints.
Deep Learning
Deep learning uses neural networks with multiple layers to learn representations of increasingly complex patterns. A neural network consists of connected units whose parameters are adjusted during training. Each layer transforms the representation it receives before passing a result to the next layer.
The analogy with biological neurons is historical and limited. Artificial neural networks are mathematical systems; they do not reproduce the structure or capabilities of a biological brain.
Earlier layers may learn simple features while later layers combine them into more useful representations. In an image model, early features might respond to edges or colour transitions; later representations may capture textures, shapes, or object-level patterns. The exact features are learned from the training objective and data rather than assigned manually.
Computer Vision
Computer vision concerns systems that interpret images and video. Common tasks include image classification, object detection, segmentation, optical character recognition, and visual search. Deep learning has substantially improved these tasks, although computer vision also includes classical image-processing and geometry-based methods.
Natural Language Processing
Natural language processing concerns interactions between computers and human language. It includes classification, information extraction, search, translation, summarization, question answering, and language generation. Modern NLP relies heavily on deep learning and transformer architectures, but the field also includes linguistic, statistical, and rule-based techniques.
Generative AI
Generative AI produces new content based on patterns learned from training data. Depending on the model and its inputs, that content can include text, source code, images, audio, video, or structured data.
Generative AI is not defined by whether a model can be adapted without retraining. Generation describes what the system does. Prompting, retrieval, fine-tuning, and tool use are separate techniques for changing how a generative system behaves.
Foundation Models
A foundation model is trained on broad data at sufficient scale to support many downstream tasks. Instead of training a separate model from scratch for every task, teams can adapt one foundation model through prompting, retrieval, fine-tuning, or additional training.
Foundation models can support tasks such as generation, summarization, extraction, classification, search, and question answering. They can also provide the starting point for narrower models tuned to a specific domain.
Common Model Families
Large language models. LLMs model language and commonly use the transformer architecture. They learn statistical relationships across sequences and can perform many language and code tasks. Despite the name, a language model does not understand or reason in exactly the way a person does.
Diffusion models. During training, a diffusion process progressively adds noise to data while a model learns how to reverse that process. During generation, the model starts from noise and repeatedly denoises it toward a sample. Diffusion models are especially prominent in image, audio, and video generation.
Multimodal models. These models process or generate more than one data modality, such as text, images, audio, or video. “Multimodal” describes supported inputs and outputs rather than one specific architecture: an LLM or diffusion model can also be multimodal.
Adapting Model Outputs
Prompt Engineering
A prompt supplies instructions and context at inference time. Prompt engineering is the practice of structuring those instructions, examples, constraints, and output formats so the model is more likely to produce a useful result. It changes the immediate input, not the model’s learned weights.
Fine-Tuning
Fine-tuning continues training a pretrained model on a narrower dataset or objective. It changes model parameters and can improve task performance, domain terminology, style, or output structure. It also introduces costs: dataset preparation, evaluation, deployment, and the risk of reducing performance outside the target task.
Retrieval-Augmented Generation
Retrieval-augmented generation, or RAG, searches an external knowledge source at inference time and provides relevant results as context to the model. Unlike fine-tuning, RAG does not ordinarily change model weights. It is useful when answers must depend on private, current, or attributable information.
RAG and fine-tuning solve different problems. Retrieval supplies knowledge for a particular request; fine-tuning changes recurring model behaviour. A production system may use either technique or both.
A Practical Mental Model
When evaluating an AI system, ask five questions:
- What task or goal defines success?
- What data or environment does the system perceive?
- Does it follow programmed rules, learn from data, or combine both?
- What happens during training, and what happens during inference?
- Are prompting, retrieval, fine-tuning, or tools being used to adapt the result?
These questions are more useful than arguing over labels. They reveal how the system actually works, what it depends on, and where its limitations are likely to appear.