From AI to LLMs: Breaking Down the Technology Hierarchy
This article breaks down the hierarchy of AI, machine learning, deep learning, neural network architectures, and large language models (LLMs). It explains why these terms are nested rather than parallel, what each layer contributes technically, and how to use this structure to guide task definition, model selection, and cost estimation.
1. Start With the Conclusion: Nested, Not Parallel
Many technical discussions get confusing because concepts from different abstraction levels are compared on the same plane. In reality, these terms form a top-down containment chain:
Artificial Intelligence ⊃ Machine Learning ⊃ Deep Learning ⊃ Specific Neural Network Architectures ⊃ Large Language Models
So asking “what is the difference between AI and a specific LLM” is equivalent to asking “what is the difference between biology and a cat.” The former is a collection of disciplines and goals; the latter is a very specific instance within that collection. Understanding this gives selection, evaluation, and cost estimation a shared frame of reference.
The layers are unpacked below.
2. Layer 1: Artificial Intelligence (AI) — The Goal and the Discipline
AI is the outermost concept: the set of science and technology that enables machines to simulate, extend, and expand human intelligence. Its focus is not any single implementation technique, but whether a task gets done.
- Goal: get computers to perform tasks that normally require human intelligence, such as visual recognition, language understanding, decision making, and reasoning.
- Scope: everything from early rule systems and expert systems, to statistical learning methods, to today’s neural-network-based approaches.
- Common split: narrow AI aimed at specific tasks versus general AI (AGI) with cross-domain transfer ability. Almost all systems deployed in current engineering practice belong to the former.
Engineering implication: when someone says “we are building an AI system,” the statement carries almost no technical information. You have to keep asking about the task shape, data conditions, and constraints.
3. Layer 2: Machine Learning (ML) — From Writing Rules to Feeding Data
Machine learning is one of the mainstream paths to AI. Its core idea: instead of humans explicitly writing every rule, you supply data and a supervision signal and let the algorithm fit the patterns itself.
The difference from traditional programming can be summarized as:
- Traditional: humans write rules → the machine executes rules.
- Machine learning: humans provide data and labels → the algorithm induces rules → the rules are applied to new data.
Machine learning is not the only path, though. The symbolic route relies on logical inference and formal representation, computing with formulas and knowledge bases, and still holds value in scenarios with strong rules and high explainability requirements. Real systems are often hybrids: symbolic methods constrain the boundaries, statistical methods handle ambiguity.
Main paradigms:
- Supervised learning: labeled data, learning a mapping from input to output; suited to classification and regression.
- Unsupervised learning: unlabeled data, discovering cluster structure, reduced-dimension representations, or anomalies.
- Reinforcement learning: obtaining reward signals through interaction with an environment, learning sequential decision policies.
4. Layer 3: Deep Learning (DL) — Automatic Feature Extraction With Multiple Layers
Deep learning is a branch of machine learning that uses multilayer neural networks to learn hierarchical representations of data. “Deep” refers to the network having multiple hidden layers that convert raw signals into increasingly abstract semantic representations layer by layer.
The key engineering change it brings is the automation of feature engineering: no more hand-designing large numbers of features, as the model learns representations directly from raw data. This is also the root reason for its breakthroughs in image recognition, speech recognition, and natural language processing.
Common structures include convolutional neural networks (good at local spatial patterns), recurrent neural networks (good at sequence modeling but hard to parallelize), generative adversarial networks (generating samples through adversarial training), and the attention-based architectures that later became mainstream.
5. Layer 4: Specific Neural Network Architectures — Why Attention Won
This layer refers to concrete network designs inside deep learning. The attention-based architecture proposed in 2017 (the paper titled “Attention Is All You Need”) was the watershed, and its innovation centers on the self-attention mechanism:
- Global view: when processing a sequence, any two positions can be linked directly, mitigating long-range dependency decay in recurrent structures.
- Parallelizable: computation between sequence positions is not forced to be serial, so parallel compute can be fully used.
- Scalable: performance stays relatively stable as model size and data size grow, paving the way for the “scaling” route.
Its typical form is an encoder-decoder structure built entirely on attention, no longer relying on recurrence or convolution. Schematically, self-attention can be written as:
import numpy as npdef self_attention(Q, K, V, d_k):# Q/K/V: query, key, value matrices; d_k: key vector dimensionscores = Q @ K.T / np.sqrt(d_k) # scaled dot product, avoids vanishing gradientsweights = np.exp(scores) / np.exp(scores).sum(axis=-1, keepdims=True)return weights @ V # weighted aggregation yields the context representation
Engineering implication: the architecture choice determines the ceiling on later capability and the parallel efficiency, which is the physical precondition that makes large-scale pretraining possible.
6. Layer 5: Large Language Models (LLMs) — Scaled Products on Top of the Architecture
An LLM is a very large network obtained by pretraining a specific architecture on massive text. “Large” shows up as three dimensions scaled at the same time:
- Parameter scale: from billions to hundreds of billions.
- Data scale: training corpora reaching the order of trillions of tokens.
- Compute scale: large-scale parallel training plus long-cycle engineering support.
The capability it delivers is general text processing: generation, understanding, translation, question answering, code writing, and a degree of logical reasoning. The supporting technical chain usually includes pretraining, supervised fine-tuning, preference alignment, and prompt engineering; during inference, retrieval augmentation is often added to bring external knowledge into the context and reduce hallucination.
7. Common Misconceptions
- Equating LLMs with AI: an LLM is only the most visible implementation path right now.
- Assuming bigger is always better: data quality, training strategy, and inference cost also determine real-world results.
- Doing technology selection while ignoring layer differences: when a task has clear rules, traditional methods or lightweight models are often the better deal.
8. Practical Advice: Select by Layer
- Define the task and acceptance metrics first, then talk about models.
- With poor data conditions and high explainability requirements, prefer rules or lightweight machine learning.
- For unstructured data (images, speech, text), prefer deep learning approaches.
- When general language understanding and generation are needed, adopt LLM capabilities, and handle the engineering side with foundational capabilities such as general model services on the cloud, container platforms, object storage, logging, and monitoring and alerting.
- Build an evaluation set and a cost baseline, keep running regressions, and avoid a one-time all-in bet.
9. Conclusion
The value of this hierarchy is that it provides decision coordinates: the further out a layer is, the wider its applicability but the weaker its guidance; the further in, the more concrete the capability but the clearer the boundary. What is genuinely scarce in engineering practice is not a stronger model, but the ability to align task, data, and cost to the right layer.
