Introduction to LLMs: The Foundation of Modern AI
Defining the LLM
A Large Language Model is a probabilistic system trained on vast corpora of text to model the statistical distribution of natural language. More precisely, it is a deep neural network — typically with billions to trillions of parameters — that learns to assign probability distributions over sequences of tokens, enabling it to generate coherent, contextually appropriate text by iteratively sampling from those distributions.[1]
This description distinguishes LLMs categorically from traditional software. Conventional programs encode explicit rules: if input matches pattern X, return Y. An LLM encodes no explicit rules whatsoever. Instead, it encodes statistical regularities extracted from text — patterns of co-occurrence, syntactic structure, semantic relationships, and world knowledge implicit in how humans write. The model's "knowledge" is not retrieved from a database; it is approximated through billions of floating-point weights adjusted during training.[2]
LLMs belong to the broader category of generative AI — systems that produce novel outputs rather than merely classifying or retrieving existing data. Unlike discriminative models (which map inputs to labels), a generative model learns the underlying data distribution and can sample new examples from it. The generative character of LLMs is what gives them their breadth: a single model trained on diverse text can write code, translate between languages, reason about logic problems, and produce poetry — sometimes within the same conversation.
Historical Context
The path to modern LLMs runs through six decades of AI research, marked by three major paradigm shifts.
Rule-Based Systems (1950s–1980s)
Early NLP was dominated by hand-crafted rules. Systems like ELIZA (1966) used pattern-matching and scripted responses to simulate conversation.[3] Expert systems in the 1980s encoded domain knowledge as explicit logical rules. These approaches were brittle: any input outside the rule set produced failure, and scaling required manual expert effort rather than data.
Statistical Models (1990s–2000s)
The statistical turn shifted focus from hand-crafted rules to learned patterns. N-gram language models estimated the probability of a word given its n−1 predecessors, enabling more robust text prediction and machine translation.[4] Hidden Markov Models and later Conditional Random Fields improved sequence labelling tasks. These models were data-driven but shallow — they could not capture long-range dependencies or abstract semantic relationships.
Neural Networks and the Transformer Revolution (2010s–Present)
Recurrent Neural Networks (RNNs) and Long Short-Term Memory (LSTM) networks introduced the ability to process sequences with memory, enabling genuine language modelling over longer contexts.[5] Word embeddings — particularly Word2Vec (2013) and GloVe — demonstrated that words could be represented as dense vectors in a semantic space where geometric relationships encode meaning.[6]
The decisive turning point arrived in 2017 with the publication of "Attention Is All You Need" by Vaswani et al. at Google Brain.[7] The Transformer architecture introduced self-attention as the primary mechanism for relating tokens to one another, entirely replacing recurrence. This change enabled massive parallelisation during training — a prerequisite for the scale that defines modern LLMs.
BERT (2018) demonstrated that bidirectional pre-training on masked language modelling produced representations that could be fine-tuned to achieve state-of-the-art results on 11 NLP tasks simultaneously.[8] The GPT series (2018–2020) showed that unidirectional autoregressive pre-training at scale produced models with remarkable few-shot capabilities — culminating in GPT-3 with 175 billion parameters.[2]
The Scope of Capability
Contemporary LLMs demonstrate capability across a remarkably wide range of tasks:
- Text generation and completion — from single sentences to multi-chapter documents
- Reasoning — mathematical problem solving, logical inference, multi-step planning
- Code generation and debugging — writing, explaining, and fixing code in dozens of programming languages
- Translation — high-quality machine translation across hundreds of language pairs
- Summarisation and question answering — compressing long documents and answering factual queries
- Multimodal integration — interpreting and generating descriptions of images, audio, and video (in multimodal variants)[9]
It is important to note that these capabilities are emergent rather than explicitly programmed — they arise from the statistical structure of training data and are not guaranteed to generalise reliably to all inputs. Understanding this distinction is essential for deploying LLMs responsibly.
The Engine Room: Core Architecture and Mechanisms
The Transformer Architecture
The Transformer, introduced by Vaswani et al. in 2017, consists of an encoder and a decoder (in its original form), each composed of stacked layers of two primary sub-components: a multi-head self-attention mechanism and a position-wise feed-forward network.[7] Most modern LLMs are decoder-only architectures (GPT family, LLaMA, Mistral), which process tokens left-to-right and generate text autoregressively.
Self-Attention: The Core Mechanism
Self-attention allows every token in a sequence to directly attend to every other token, regardless of their positional distance. For each token, three vectors are computed from its embedding: a Query (Q), a Key (K), and a Value (V). The attention score between two tokens is the dot product of their Query and Key vectors, scaled by the square root of the dimension dk to prevent gradient vanishing, then passed through a softmax to produce a probability distribution.[7]
Multi-head attention runs h parallel attention computations (heads), each learning to attend to different aspects of the input — one head might track syntactic agreement, another coreference, another semantic similarity. Their outputs are concatenated and projected back to the model dimension.
Positional Encoding
Since self-attention is inherently permutation-invariant (it treats input as a set, not a sequence), positional information must be injected separately. The original Transformer uses sinusoidal positional encodings.[7] Modern models have moved toward learned absolute positional embeddings (GPT-2, GPT-3) or Rotary Position Embeddings (RoPE),[10] which enable better generalisation to context lengths beyond those seen during training.
Feed-Forward Sublayer and Residual Connections
Each Transformer layer applies a two-layer feed-forward network (typically with a GELU activation) to each token position independently after self-attention. Crucially, both the attention and feed-forward sublayers use residual connections (adding the sublayer's input to its output) followed by layer normalisation — a design choice that stabilises training at depth and enables gradients to flow back through hundreds of layers.[7]
Tokenization
Raw text must be converted into discrete tokens before an LLM can process it. Tokenization is a foundational design decision that affects vocabulary size, sequence length, and model efficiency.
Byte Pair Encoding (BPE)
The dominant approach in modern LLMs is Byte Pair Encoding (BPE), originally a data compression algorithm adapted for NLP by Sennrich et al.[11] BPE begins with a character-level vocabulary and iteratively merges the most frequent adjacent pair of tokens, building up a vocabulary of subword units. GPT-3 uses a BPE vocabulary of approximately 50,257 tokens; GPT-4 and LLaMA 3 use expanded vocabularies of around 100,000–128,000 tokens.
Tokens are not words. A single English word might tokenise to one, two, or several tokens depending on its frequency and morphology. "Tokenization" might become Token + ization. Rare words fragment into many tokens, which increases sequence length and inference cost. This also means LLMs are not directly counting words or characters — they operate on an intermediate representation that requires care when prompting.
Embeddings
Each token ID is mapped to a dense vector (an embedding) of dimension dmodel via a lookup table. These embeddings are learned jointly with the rest of the model during pre-training. GPT-3 uses dmodel = 12,288 for its largest variant.[2] The embedding layer is effectively a learned dictionary: each token ID indexes a row in a matrix of shape [vocab_size × d_model].
Neural Network Depth: Parameters, Layers, and Weights
The number of parameters in an LLM is the primary measure of its scale. Parameters are the learnable weights — real-valued numbers adjusted during training by gradient descent. They live in the embedding tables, the attention weight matrices (Q, K, V, and output projections for each head in each layer), and the feed-forward weight matrices.
| Model | Parameters | Layers | d_model | Release |
|---|---|---|---|---|
| GPT-2 (largest) | 1.5B | 48 | 1,600 | 2019 |
| GPT-3 | 175B | 96 | 12,288 | 2020 |
| LLaMA 2 (70B) | 70B | 80 | 8,192 | 2023 |
| Mistral 7B | 7.3B | 32 | 4,096 | 2023 |
| LLaMA 3 (70B) | 70B | 80 | 8,192 | 2024 |
| GPT-4 (estimated) | ~1.8T (MoE) | ~120 | — | 2023 |
The Chinchilla scaling laws, derived by Hoffmann et al. at DeepMind (2022), established that for a given compute budget, model size and training tokens should scale roughly equally — contradicting the prevailing practice of training ever-larger models on fixed data volumes.[12] The optimal ratio is approximately 20 training tokens per parameter. LLaMA models were explicitly designed around this insight.
Predictive Probabilities: How LLMs Generate Text
At inference time, an LLM generates text autoregressively: it takes an input sequence (the prompt), computes a probability distribution over the entire vocabulary for the next token, samples or selects a token from that distribution, appends it to the sequence, and repeats.
The final layer of the model — a linear projection from dmodel to the vocabulary size, called the language model head — produces raw scores (logits) for each token in the vocabulary. These are converted to a probability distribution by the softmax function:
Sampling Strategies
How a token is selected from this distribution is a crucial hyperparameter that governs the balance between creativity and coherence:
- Greedy decoding — always picks the highest-probability token. Deterministic but prone to repetition and local optima.
- Temperature sampling — divides logits by a temperature scalar τ before softmax. τ < 1 sharpens the distribution (more deterministic); τ > 1 flattens it (more random). Most production systems use τ ∈ [0.7, 1.0].
- Top-k sampling — restricts sampling to the k highest-probability tokens at each step, preventing very low-probability tokens from being selected.
- Nucleus (top-p) sampling — samples from the smallest set of tokens whose cumulative probability exceeds p. More adaptive than top-k.[13]
Temperature, top-k, and top-p are typically combined. The specific combination significantly affects perceived output quality and creativity — and is often the difference between a model that feels "alive" and one that feels mechanical.
The Lifecycle: From Raw Data to Deployed Model
Pre-training: The Heavy Lifting
Pre-training is the computationally dominant phase of LLM development. The model is trained on a massive corpus of text — typically hundreds of billions to trillions of tokens — using the next-token prediction objective: given the preceding tokens, predict the next one. This simple objective, applied at scale, forces the model to develop internal representations of syntax, semantics, world knowledge, and reasoning patterns.[2]
Data Collection and Curation
Training data is assembled from heterogeneous sources: web crawls (Common Crawl, C4), books (Books3, Project Gutenberg), code repositories (GitHub), academic papers (arXiv, PubMed), and curated datasets (Wikipedia, StackExchange). The composition of this mix critically affects downstream capability. Models trained on more code show improved reasoning; models trained on more scientific text show improved factual accuracy.[14]
Data quality filtering is non-trivial and expensive. Steps typically include: deduplication (exact and near-duplicate removal using locality-sensitive hashing), language identification, quality filtering (perplexity scoring against a reference model to remove low-coherence text), and toxicity filtering. The decision of what to remove and what to retain is itself a form of value alignment — and one that is rarely fully documented in model cards.[15]
Computational Cost
Training GPT-3 (175B parameters, ~300B tokens) required approximately 3.14 × 10²³ floating-point operations and is estimated to have cost between $4–12 million USD in compute at 2020 prices, with equivalent CO₂ emissions to several transatlantic flights.[2] By 2024, frontier model training runs cost an order of magnitude more and consume gigawatts of electricity — a fact that raises serious questions about the sustainability and accessibility of LLM development.
The Optimiser
Parameters are updated via stochastic gradient descent variants — almost universally AdamW (Adam with decoupled weight decay) in modern LLMs.[16] A learning rate schedule with linear warm-up followed by cosine decay is standard. Mixed-precision training (using 16-bit floats for activations and gradients but 32-bit for weight updates) is essential for memory efficiency at scale.
Fine-Tuning: From Base to Instruct
A pre-trained base model knows the statistical structure of language but does not know how to follow instructions. Fine-tuning on a curated dataset of (instruction, response) pairs teaches the model to be helpful: to answer questions, follow formatting constraints, and behave as an assistant rather than a document completion engine.[17]
Supervised Fine-Tuning (SFT) is the first step: the model is trained on a dataset of human-written demonstrations of desired behaviour, typically numbering in the tens of thousands of examples. Quality matters enormously — a small, high-quality SFT dataset generally outperforms a large, noisy one.
Parameter-Efficient Fine-Tuning (PEFT) methods — particularly LoRA (Low-Rank Adaptation) — allow fine-tuning of models with billions of parameters using only thousands of trainable parameters, by inserting low-rank decomposition matrices into the attention weight matrices.[18] This has democratised fine-tuning: a researcher with a single consumer GPU can fine-tune a 7B-parameter model for a specific task in hours.
Alignment: Reinforcement Learning from Human Feedback (RLHF)
Fine-tuned instruct models are better than base models but still produce outputs that are sometimes harmful, dishonest, or unhelpful. Alignment is the process of steering the model's behaviour toward human values and intentions. The dominant technique — introduced by OpenAI in InstructGPT (2022) — is Reinforcement Learning from Human Feedback (RLHF).[19]
Phase 1 — SFT
As above: fine-tune the base model on high-quality demonstrations.
Phase 2 — Reward Model Training
Human raters compare pairs of model outputs and indicate which is preferable. A separate neural network — the Reward Model (RM) — is trained on these preference judgements to predict a scalar reward score for any given (prompt, response) pair. This reward score serves as a learned proxy for human values.[19]
Phase 3 — RL with PPO
The fine-tuned language model is further optimised using Proximal Policy Optimisation (PPO), a reinforcement learning algorithm, to maximise the reward model's score. A KL-divergence penalty prevents the model from drifting too far from the SFT baseline (which would cause the model to "game" the reward model with outputs that score high but are incoherent).[19]
Anthropic's Constitutional AI (CAI) approach extends RLHF with a set of natural-language principles (a "constitution") that the model uses to self-critique and revise its own outputs, reducing reliance on human feedback volume.[20] Direct Preference Optimisation (DPO), introduced by Rafailov et al. (2023), achieves alignment results comparable to RLHF without the RL phase — simplifying the training pipeline significantly.[21]
RAG: Retrieval-Augmented Generation
A fundamental limitation of LLMs is that their "knowledge" is static — frozen at the training data cutoff. Retrieval-Augmented Generation (RAG), introduced by Lewis et al. at Facebook AI Research (2020), addresses this by coupling the LLM with a retrieval system that fetches relevant documents at inference time and includes them in the model's context.[22]
The RAG pipeline typically comprises: (1) an offline indexing phase where documents are chunked, embedded using a dense encoder (e.g., a bi-encoder trained for semantic similarity), and stored in a vector database (Pinecone, Weaviate, Chroma, pgvector); (2) an online retrieval phase where the user query is embedded and the top-k most similar document chunks are retrieved by approximate nearest-neighbour search; (3) an augmentation phase where retrieved chunks are prepended to the prompt as context; and (4) generation by the LLM conditioned on both the query and the retrieved context.
RAG dramatically reduces hallucination on domain-specific questions and enables LLMs to cite sources. Its limitations include: sensitivity to retrieval quality, context window constraints (retrieved chunks must fit within the model's context), and the challenge of aggregating information from multiple retrieved passages that may contradict each other.
Taxonomy of LLMs: Types and Classifications
Base Models vs. Instruct Models
A base model (also called a foundation model) is the raw output of pre-training: it predicts the next token given a context, with no instruction-following behaviour. When prompted with the beginning of an essay, it continues the essay. When prompted with a question, it might continue with more questions rather than providing an answer. Base models are powerful building blocks for researchers but not suitable for direct deployment to end users.[23]
An instruct model (or chat model) is a base model that has been fine-tuned and aligned (via SFT + RLHF or DPO) to follow instructions, maintain a helpful assistant persona, and avoid harmful outputs. GPT-4, Claude 3, and Gemini Ultra are all instruct models. The instruct model is what users interact with; the base model is what researchers fine-tune for new applications.
Closed-Source vs. Open-Weight Models
The AI ecosystem is divided between organisations that keep their model weights proprietary and those that release them publicly — a division with profound implications for safety, innovation, and power concentration.
Closed-source models (GPT-4, Claude 3, Gemini Ultra, Grok) are accessible only via API. The weights, training data, and full architecture are not publicly disclosed. This approach gives organisations control over access, safety measures, and monetisation, but it also concentrates power and limits independent safety auditing.
Open-weight models (LLaMA 2 and 3 by Meta AI,[24] Mistral 7B and Mixtral,[25] Falcon, Phi-3 by Microsoft) release model weights for research and, increasingly, commercial use. This enables local deployment, fine-tuning, and auditing — but also removes the guardrails that providers apply to API access. The debate over whether open-weight release is net-positive or net-negative for safety is one of the most contested in the field.
Domain-Specific LLMs
General-purpose LLMs trained on broad web data can be outperformed in narrow domains by smaller models trained on domain-specific corpora. Examples include:
- Medicine — Med-PaLM 2 (Google), BioMedLM (Stanford/EleutherAI), achieving near-expert performance on USMLE questions
- Law — Harvey AI's models fine-tuned on legal text, case law, and contracts
- Code — GitHub Copilot (based on Codex / GPT-4), StarCoder, Code LLaMA — models trained primarily on source code with dramatically improved coding capability
- Science — Galactica (Meta), trained on scientific papers — though this model was retracted due to confident hallucination of scientific facts[26]
Multimodal LLMs
Multimodal models extend the Transformer paradigm to non-text modalities. GPT-4V (Vision), Gemini 1.5 Pro, and Claude 3 Opus accept image inputs alongside text.[9] These models typically use a vision encoder (often a Vision Transformer, ViT) to produce patch embeddings from images, which are projected into the language model's embedding space via a learned adapter — allowing the language model to "see" image content as a sequence of tokens alongside text tokens.
Emerging multimodal models (GPT-4o, Gemini 1.5 Flash) extend this to audio and video, processing speech directly rather than through a transcription intermediary. This enables real-time, low-latency voice interaction without the compounding errors of a separate ASR system.
Key Performance Metrics and Technical Challenges
Evaluating LLMs: Benchmarks
LLM evaluation is one of the most contested areas in the field. Automated benchmarks provide reproducible comparisons but suffer from contamination, saturation, and misalignment with real-world utility.
Key benchmarks include:
- MMLU Massive Multitask Language Understanding — 57 subjects from STEM, humanities, and social science at professional and academic levels. Introduced by Hendrycks et al. (2020).[27] GPT-4 achieves ~87% (5-shot).
- GSM8K Grade School Math — 8,500 linguistically diverse elementary math problems requiring multi-step reasoning. Introduced by Cobbe et al. (2021).[28]
- HumanEval Code generation — 164 hand-crafted Python programming problems with test suites. Introduced by Chen et al. (2021).[29] GPT-4 achieves ~67% pass@1.
- HELM Holistic Evaluation of Language Models — a comprehensive, multi-metric evaluation framework from Stanford CRFM covering accuracy, calibration, robustness, fairness, efficiency, and toxicity.[30]
- MT-Bench Multi-turn benchmark — evaluates conversational ability across multi-turn interactions using GPT-4 as a judge. More aligned with deployment reality than single-turn benchmarks.
Benchmark contamination — the presence of benchmark test sets in training data — is a growing concern. Several studies have found evidence that frontier models' exceptional benchmark scores are partially attributable to memorisation rather than genuine generalisation.[30]
The Problem of Hallucination
Hallucination — the generation of plausible-sounding but factually incorrect information — is perhaps the most significant practical limitation of current LLMs. The term refers to outputs that are fluent and confident but false: fabricated citations, invented statistics, wrong dates, non-existent people.[31]
Hallucination arises from the fundamental nature of LLMs as next-token predictors: the model optimises for fluency and plausibility within its learned distribution, not for factual accuracy. When a query falls outside the model's training distribution or requires precise recall of rare facts, the model may "confabulate" — filling in gaps with statistically plausible but incorrect tokens.
Mitigation strategies include: RAG (grounding responses in retrieved documents), chain-of-thought prompting (encouraging explicit reasoning steps before conclusions), fine-tuning on datasets that penalise hallucination, uncertainty quantification (training models to express calibrated confidence), and output verification pipelines that cross-check claims against external knowledge bases.
Context Windows: The Memory of an LLM
The context window is the maximum number of tokens an LLM can process in a single forward pass — the model's effective "working memory." Everything outside the context window is invisible to the model during generation.
Context window sizes have grown dramatically: GPT-3 supported 4,096 tokens; GPT-4 Turbo supports 128,000 tokens; Gemini 1.5 Pro supports up to 1,000,000 tokens (in research preview).[9] However, "long context" capability does not straightforwardly equal "long context quality." The lost-in-the-middle phenomenon — where models show degraded performance on information placed in the middle of long contexts — has been documented empirically.[32]
Latency and Inference
LLM inference is memory-bandwidth-bound rather than compute-bound for most production deployments. The dominant cost is loading model weights from GPU HBM (High Bandwidth Memory) for each forward pass. A 70B-parameter model in 16-bit precision requires approximately 140 GB of VRAM — beyond any single consumer GPU and requiring multiple high-end server GPUs (e.g., NVIDIA A100s or H100s).
Key optimisation techniques include: quantisation (reducing weight precision from FP16 to INT8 or INT4, cutting memory requirements 2–4×); KV-cache reuse (caching key and value tensors for previously computed tokens to avoid redundant computation during autoregressive generation); speculative decoding (using a small draft model to propose multiple tokens that are verified in parallel by the large model, improving throughput); and continuous batching (dynamically batching inference requests for higher GPU utilisation).
The Ecosystem: Infrastructure and Deployment
Compute Requirements
The GPU has become the primary compute substrate for LLM training and inference. NVIDIA's H100 — with 80 GB of HBM3 memory, 3.35 TB/s memory bandwidth, and 989 TFLOPS of BF16 throughput — is the current gold standard for frontier model training.[33] A single H100 costs approximately $30,000–$40,000; a frontier training cluster might comprise tens of thousands of them, connected via NVLink and InfiniBand for multi-node communication.
Google's Tensor Processing Units (TPUs) — custom ASICs optimised for matrix multiplication — power Google's own models (PaLM, Gemini). TPUs offer competitive throughput with superior energy efficiency for Google's specific workloads but are not commercially available for third-party use at scale.
The energy and water consumption of LLM data centres has drawn increasing scrutiny. Training a large frontier model can emit hundreds of tonnes of CO₂-equivalent. Inference at scale — with millions of queries per day — may consume more total energy than training over the model's deployment lifetime.
Inference APIs and Orchestration Frameworks
Most developers interact with LLMs through inference APIs rather than running models locally. The major providers — OpenAI, Anthropic, Google, Mistral, Cohere, and cloud-hosted open models via AWS Bedrock, Azure AI, and Google Vertex — offer REST APIs that abstract away infrastructure.
Orchestration frameworks sit above these APIs to enable complex, multi-step LLM applications:
- LangChain — the most widely adopted framework, providing abstractions for chains, agents, memory, and tool use. Python and JavaScript SDKs.
- LlamaIndex — focused on RAG pipelines, data ingestion, and knowledge retrieval. Optimised for document Q&A use cases.
- DSPy — a Stanford framework that treats LLM prompting as a programming problem with optimisable modules, rather than hand-crafted prompt strings.
- Semantic Kernel — Microsoft's SDK for integrating LLMs into enterprise applications, with native Azure integration.
Agentic Workflows
The most significant architectural evolution since the Transformer itself may be the shift from stateless LLM completions to agentic systems — LLMs that plan and execute multi-step tasks autonomously, using tools (web search, code execution, file systems, APIs) and maintaining state across many interactions.
In an agentic workflow, the LLM acts as a reasoning engine that: (1) receives a high-level goal; (2) decomposes it into sub-tasks; (3) selects and invokes appropriate tools; (4) observes the results; (5) updates its plan; and (6) iterates until the goal is achieved or a stopping condition is met. This pattern — pioneered by systems like ReAct (2022),[34] AutoGPT, and Agent GPT — underlies products like Devin (the AI software engineer), computer-use agents, and autonomous research assistants.
Agentic systems introduce new failure modes: compounding errors across multi-step chains, unintended real-world consequences of autonomous actions, and adversarial inputs (prompt injection) that redirect agent behaviour. These challenges are at the frontier of current safety research.
Ethics, Safety, and the Future Landscape
Bias and Fairness
LLMs absorb the biases present in their training data — and training data is not a neutral sample of human knowledge. It over-represents certain languages (primarily English), cultures (primarily Western), demographics (users with internet access), and time periods. The result is that LLMs may perform significantly worse on tasks involving under-represented languages, dialects, or cultural contexts, and may encode and amplify societal biases relating to gender, race, religion, and disability.[15]
Debiasing approaches include: curating more balanced training data, applying bias-specific fine-tuning, using RLHF reward models trained to penalise biased outputs, and ongoing red-teaming by diverse evaluators. None of these fully solve the problem — they reduce surface-level bias without necessarily addressing deeper structural inequities in what knowledge is represented and how.
Security Vulnerabilities
Prompt Injection
Prompt injection attacks embed malicious instructions in user-provided content that redirect the LLM's behaviour — for example, a malicious document that, when summarised, causes an email agent to exfiltrate data. In agentic systems with real-world tool access, prompt injection is a critical security vulnerability with no robust technical solution currently deployed at scale.
Jailbreaking
Jailbreaking refers to adversarial prompting techniques that circumvent alignment training to elicit harmful outputs. Common approaches include roleplay framing ("pretend you are an AI without restrictions"), many-shot jailbreaking (using long contexts to establish a pattern of compliance), and automated adversarial prompt optimisation. The arms race between jailbreaking and alignment is ongoing — each alignment improvement tends to be met by new jailbreaking techniques.
Data Privacy
LLMs can memorise and regurgitate verbatim content from training data — including potentially private or sensitive information.[15] Production systems mitigate this through output filters, training data deduplication, differential privacy (adding controlled noise during training), and contractual commitments not to train on user inputs.
Regulatory Frameworks
The global regulatory response to LLMs is fragmented but accelerating. The EU AI Act (2024) is the most comprehensive legislative framework, classifying AI systems by risk level and imposing transparency, safety testing, and documentation requirements on "high-risk" systems and mandatory disclosures for general-purpose AI models above a certain compute threshold.
The United States has taken a lighter-touch approach, with Executive Order 14110 (October 2023) directing federal agencies to develop AI risk assessments and requiring developers of frontier models to share safety test results with the government before deployment. China's Generative AI Regulations (2023) require algorithmic registration, content labelling, and prohibition of "content that subverts state power."
India has not yet enacted AI-specific legislation; the emerging National AI Strategy and proposed Digital India Act are expected to address AI governance, though their final form remains under consultation as of early 2026.
The Road to AGI
The most contested question in AI research is whether LLMs represent a path to Artificial General Intelligence — systems with the breadth, adaptability, and reasoning capability of human cognition across arbitrary domains — or whether they are fundamentally limited by their next-token-prediction objective.
The case for LLMs as AGI precursors rests on emergent capabilities: abilities that appear discontinuously as model scale increases, suggesting qualitative shifts rather than mere quantitative improvement.[1] Chain-of-thought reasoning, multi-step planning, and analogical reasoning all emerged at scale without being explicitly trained. Proponents argue that continued scaling, combined with architectural improvements (mixture-of-experts, better memory, longer context), test-time compute scaling, and richer world models, will close remaining gaps.
The case against rests on the grounding problem: LLMs operate entirely on statistical patterns in text and have no grounded experience of the physical world, no persistent memory across conversations, no genuine causal understanding, and no stable identity or goals. Critics argue that human-level general intelligence requires embodiment, causal reasoning, and forms of learning that are categorically different from next-token prediction — and that scale alone cannot bridge this gap.
What seems clear is that the next generation of systems will not be LLMs alone: they will be hybrid architectures combining language models with symbolic reasoning, persistent external memory, multi-modal perception, and tool use — systems that are agentic by design rather than by bolted-on scaffolding. Whether such systems qualify as AGI — or even approach it — is a question that will be answered empirically, not philosophically.
References
- Zhao, W. X., et al. (2023). "A Survey of Large Language Models." arXiv preprint arXiv:2303.18223. arxiv.org/abs/2303.18223
- Brown, T., et al. (2020). "Language Models are Few-Shot Learners." Advances in Neural Information Processing Systems, 33, 1877–1901. arxiv.org/abs/2005.14165
- Weizenbaum, J. (1966). "ELIZA — a computer program for the study of natural language communication between man and machine." Communications of the ACM, 9(1), 36–45.
- Jurafsky, D., & Martin, J. H. (2023). Speech and Language Processing (3rd ed. draft). Stanford University. web.stanford.edu/~jurafsky/slp3/
- Hochreiter, S., & Schmidhuber, J. (1997). "Long Short-Term Memory." Neural Computation, 9(8), 1735–1780.
- Mikolov, T., et al. (2013). "Distributed Representations of Words and Phrases and their Compositionality." NeurIPS 2013. arxiv.org/abs/1310.4546
- Vaswani, A., et al. (2017). "Attention Is All You Need." Advances in Neural Information Processing Systems, 30. arxiv.org/abs/1706.03762
- Devlin, J., et al. (2018). "BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding." NAACL-HLT 2019. arxiv.org/abs/1810.04805
- OpenAI. (2023). "GPT-4 Technical Report." arXiv preprint arXiv:2303.08774. arxiv.org/abs/2303.08774
- Su, J., et al. (2023). "RoFormer: Enhanced Transformer with Rotary Position Embedding." Neurocomputing, 568, 127063. arxiv.org/abs/2104.09864
- Sennrich, R., Haddow, B., & Birch, A. (2016). "Neural Machine Translation of Rare Words with Subword Units." ACL 2016. arxiv.org/abs/1508.07909
- Hoffmann, J., et al. (2022). "Training Compute-Optimal Large Language Models." (Chinchilla). NeurIPS 2022. arxiv.org/abs/2203.15556
- Holtzman, A., et al. (2020). "The Curious Case of Neural Text Degeneration." ICLR 2020. arxiv.org/abs/1904.09751
- Gao, L., et al. (2020). "The Pile: An 800GB Dataset of Diverse Text for Language Modeling." arXiv:2101.00027. arxiv.org/abs/2101.00027
- Bender, E. M., et al. (2021). "On the Dangers of Stochastic Parrots: Can Language Models Be Too Big?" FAccT 2021. dl.acm.org/doi/10.1145/3442188.3445922
- Loshchilov, I., & Hutter, F. (2019). "Decoupled Weight Decay Regularization." ICLR 2019. arxiv.org/abs/1711.05101
- Wei, J., et al. (2022). "Finetuned Language Models are Zero-Shot Learners." ICLR 2022. arxiv.org/abs/2109.01652
- Hu, E. J., et al. (2022). "LoRA: Low-Rank Adaptation of Large Language Models." ICLR 2022. arxiv.org/abs/2106.09685
- Ouyang, L., et al. (2022). "Training language models to follow instructions with human feedback." (InstructGPT). NeurIPS 2022. arxiv.org/abs/2203.02155
- Bai, Y., et al. (2022). "Constitutional AI: Harmlessness from AI Feedback." Anthropic. arxiv.org/abs/2212.08073
- Rafailov, R., et al. (2023). "Direct Preference Optimization: Your Language Model is Secretly a Reward Model." NeurIPS 2023. arxiv.org/abs/2305.18290
- Lewis, P., et al. (2020). "Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks." NeurIPS 2020. arxiv.org/abs/2005.11401
- Bommasani, R., et al. (2021). "On the Opportunities and Risks of Foundation Models." Stanford CRFM. arxiv.org/abs/2108.07258
- Touvron, H., et al. (2023). "Llama 2: Open Foundation and Fine-Tuned Chat Models." Meta AI. arxiv.org/abs/2307.09288
- Jiang, A. Q., et al. (2023). "Mistral 7B." Mistral AI. arxiv.org/abs/2310.06825
- Taylor, R., et al. (2022). "Galactica: A Large Language Model for Science." Meta AI. arxiv.org/abs/2211.09085 (Note: model was retracted from public access within 72 hours of release due to confident hallucination of scientific content.)
- Hendrycks, D., et al. (2020). "Measuring Massive Multitask Language Understanding." ICLR 2021. arxiv.org/abs/2009.03300
- Cobbe, K., et al. (2021). "Training Verifiers to Solve Math Word Problems." (GSM8K). OpenAI. arxiv.org/abs/2110.14168
- Chen, M., et al. (2021). "Evaluating Large Language Models Trained on Code." (HumanEval). OpenAI. arxiv.org/abs/2107.03374
- Liang, P., et al. (2022). "Holistic Evaluation of Language Models." (HELM). Stanford CRFM. arxiv.org/abs/2211.09110
- Maynez, J., et al. (2020). "On Faithfulness and Factuality in Abstractive Summarization." ACL 2020. arxiv.org/abs/2005.00661
- Liu, N. F., et al. (2023). "Lost in the Middle: How Language Models Use Long Contexts." Transactions of the ACL. arxiv.org/abs/2307.03172
- NVIDIA Corporation. (2023). NVIDIA H100 Tensor Core GPU Architecture Whitepaper. resources.nvidia.com — H100 Whitepaper
- Yao, S., et al. (2022). "ReAct: Synergizing Reasoning and Acting in Language Models." ICLR 2023. arxiv.org/abs/2210.03629