Articles

What Are LLMs? Large Language Models, Explained

What are LLMs and how do they work? A plain-English guide to large language models: tokens, training, real examples, and what they still get wrong.

Chisato Chisato · · Updated · 9 min read
Abstract art of language-model tokens

A large language model, or LLM, is an AI system trained on enormous amounts of text to predict and generate language. It’s the technology behind ChatGPT, Claude, Gemini, and the open-weight models you can run yourself. At its core an LLM does something deceptively simple — guess the next chunk of text — but at sufficient scale that simple objective produces something that can write code, summarize documents, answer questions, and hold a conversation.

What are LLMs, exactly?

LLMs are a family of neural networks that share one training objective: given some text, predict what comes next. “Large” is the operative word. These models have billions — sometimes trillions — of internal parameters and are trained on datasets measured in trillions of words. Below a certain scale, a language model autocompletes sentences plausibly. Above it, capabilities start to emerge that nobody explicitly programmed: translation, arithmetic, code generation, multi-step reasoning.

That’s why the same underlying technology shows up everywhere at once. The chatbot answering your support ticket, the coding assistant in your editor, the tool summarizing your meeting notes, and the search engine synthesizing an answer instead of listing links are, under the hood, all the same kind of system — an LLM with different wrapping.

It helps to keep three layers distinct:

  • The model — the trained neural network itself, a file (or cluster of files) full of learned numbers.
  • The product — what you interact with: ChatGPT, Claude, Gemini. Products add chat interfaces, memory, web browsing, and tools around the model.
  • The API — the programmatic interface developers call to build the model into their own software.

When people ask “what are LLMs,” they usually mean the whole stack. The rest of this guide takes it apart layer by layer.

The timeline explains why the term went from research jargon to household word so fast. The transformer architecture arrived in 2017; researchers spent the next few years discovering that making these models bigger kept making them better, with no obvious ceiling. GPT-3 in 2020 showed a language model could perform tasks it was never trained for, just from instructions in the prompt. ChatGPT in late 2022 put that capability behind a chat box, and within months LLMs went from a niche research topic to the fastest-adopted consumer technology in history. Everything since — coding assistants, AI search, agents — is that same core idea being packaged into new shapes.

How an LLM works

The fundamental operation of an LLM is next-token prediction. Text is first broken into tokens — chunks of characters that are usually pieces of words, so “understanding” might become “under” + “standing.” The model reads a sequence of tokens and produces a probability for every possible next token in its vocabulary. One is chosen, appended to the sequence, and the process repeats. String those predictions together and you get fluent, coherent text.

The choosing step matters more than it sounds. The model doesn’t always take the single most likely token — that produces repetitive, robotic text. Instead it samples from the probability distribution, and settings like temperature, top-p, and top-k control how adventurous that sampling is. A low temperature makes output focused and deterministic; a high one makes it varied and creative. This is also why an LLM can give two different answers to the identical question.

What makes modern LLMs work is the transformer, a neural-network architecture built around a mechanism called attention. Attention lets the model weigh how much each token in the input matters to each other token, so it can track context, references, and meaning across a long passage rather than just the last few words. When a pronoun on page ten refers to a name on page one, attention is what connects them. This is the breakthrough that made today’s models possible.

Two numbers shape an LLM’s capability:

  • Parameters — the internal values learned during training (often billions or trillions). More parameters generally mean more capacity, though architecture and data quality matter just as much; small recent models routinely beat large older ones.
  • Context window — how much text the model can consider at once. Modern models have grown from a few thousand tokens to a million or more, which is what lets them reason over entire codebases or documents in a single pass.

How LLMs are trained

Training happens in two broad stages:

  1. Pretraining. The model reads a vast corpus of text — web pages, books, code, papers — and learns to predict the next token, adjusting its parameters slightly after every prediction. This is where it absorbs grammar, facts, reasoning patterns, and world knowledge, and it’s where nearly all the computational cost lives: months of time on thousands of specialized chips.
  2. Post-training. The raw pretrained model is a text predictor, not an assistant — ask it a question and it might continue with three more questions, since that’s a plausible continuation. Post-training aligns it to be helpful and safe, typically through instruction tuning (training on examples of good question-answer behavior) and reinforcement learning from human and AI feedback, which rewards responses people prefer. This is what turns a next-token predictor into something you can actually talk to.

Once a model is trained, there are two very different ways to adapt it to your problem. You can put instructions and examples directly in the prompt — the model learns the pattern on the fly, with no training involved — or you can fine-tune it on your own dataset, permanently adjusting its weights. The trade-offs between in-context learning and fine-tuning come down to cost, flexibility, and how specialized your task is; most teams get surprisingly far with prompting alone, often with a well-crafted system prompt setting the model’s role and rules.

Examples of LLMs in 2026

The names you’ll encounter most often fall into a few families:

  • GPT (OpenAI). The models behind ChatGPT, the product that took LLMs mainstream. Available as a consumer app and through an API used by a large share of AI products on the market.
  • Claude (Anthropic). A family spanning fast, cheap models up to frontier ones, with a reputation for strong writing and coding. Also a consumer product and a developer API.
  • Gemini (Google). Google’s flagship family, integrated across Search, Android, and Workspace, and notable for very large context windows.
  • Llama (Meta). The best-known open-weight family — the trained model weights are published, so anyone can download, inspect, fine-tune, and self-host them.
  • Mistral. A European lab known for efficient models that punch above their parameter count, released in both open and commercial forms.

The closed frontier models generally lead on raw capability, but the open-weight field has been closing the gap, and small open models now handle a real share of production workloads. There is no single “best LLM” — there’s a frontier tier for hard reasoning, a mid tier balancing cost and quality, and a small tier for high-volume, latency-sensitive work.

One more wrinkle: “language” undersells what current models handle. The flagship models are multimodal — they accept images, audio, and documents alongside text, and some generate those media too. The architecture and the next-token idea are the same; the vocabulary of tokens has simply grown beyond words. In practice the industry still calls them LLMs, and the text interface remains the primary way you steer them.

LLM vs. generative AI vs. chatbot

These three terms get used interchangeably, but they sit at different levels:

TermWhat it meansExample
Generative AIAny AI that creates new content — text, images, audio, videoImage generators, music models, LLMs
LLMA generative model specialized in languageGPT, Claude, Gemini, Llama
ChatbotA product with a conversational interface, which may or may not use an LLMChatGPT, but also old rule-based support bots

So: generative AI is the umbrella, LLMs are the language branch of it, and a chatbot is one way to package an LLM. The distinction matters in practice — “we use generative AI” tells you almost nothing about what a system can do, while “it’s built on a frontier LLM with retrieval” tells you quite a lot.

What LLMs can — and can’t — do

LLMs are remarkably general: writing, translation, coding, extraction, classification, and analysis all fall out of the same model. The newest models also add deliberate reasoning — spending tokens “thinking” before answering — which sharply improves performance on hard, multi-step problems. But they have real limits:

  • Hallucination. A model can state false information confidently, because it generates plausible text, not verified facts. Hallucinations are a structural consequence of next-token prediction; retrieval-augmented generation and tool use help ground answers in real data, but nothing eliminates the failure mode entirely.
  • Knowledge cutoff. A model only knows what was in its training data, up to a point in time — which is why current information requires web access or retrieval.
  • No built-in memory. By default, each conversation starts fresh; persistent memory has to be engineered around the model.
  • Uneven reliability. A model that aces one task can quietly fail at a neighboring one, which is why serious deployments measure quality with evals rather than trusting a demo.

A useful mental model: an LLM is a brilliant, widely read collaborator with no accountability and occasional total confidence in wrong answers. Extremely valuable — with verification.

How to use an LLM

You generally meet an LLM in one of three ways:

  1. Through a chat product. ChatGPT, Claude, or Gemini in a browser or app. Zero setup; this is where most people should start.
  2. Through an API. You call the model from your own software, paying per token. This is how LLM features get built into products, and it’s where the engineering lives: prompting techniques like chain-of-thought improve reasoning quality, function calling lets the model trigger your code and APIs, and pairing the model with a vector database lets it search your own documents. At scale, costs are real — techniques like prompt caching can cut bills dramatically.
  3. Locally. Open-weight models can be downloaded and run on your own hardware with tools like Ollama — attractive for privacy, offline use, and experimentation, with the trade-off that consumer hardware limits you to smaller models.

The fastest-moving frontier is letting LLMs act rather than just answer. An AI agent wraps a model in a loop: it plans, calls tools, reads the results, and keeps going until the task is done — booking the ticket rather than telling you how to book it. Agents inherit every limitation of the underlying model, which makes the verification habits above matter even more.

For developers, the practical advice is boring but true: start with a strong hosted model and plain prompting, add retrieval when the model needs your data, add function calling when it needs to act, and only reach for fine-tuning or self-hosting when you’ve measured a gap that cheaper options can’t close.

The takeaway

LLMs are very large next-token predictors built on the transformer architecture and trained in two stages — pretraining on vast text, then alignment into useful assistants. At scale, that mechanically simple recipe produces a strikingly general tool: the same model writes, codes, translates, and reasons, and the same handful of families (GPT, Claude, Gemini, Llama, Mistral) power most of what you’ll encounter. Understanding the basics — tokens, parameters, context windows, training, and the failure modes like hallucination — is the foundation for using these models well and knowing when to trust them.

Frequently asked questions

What does LLM stand for?
LLM stands for large language model — an AI system trained on massive amounts of text to predict and generate language. The name reflects both what it processes (language) and its defining property (scale: billions of parameters trained on trillions of words).
Is ChatGPT an LLM?
ChatGPT is a product built on top of LLMs. The chat interface, memory features, and web browsing are the product layer; the underlying models from OpenAI are the LLMs doing the actual text generation. The same distinction applies to Claude and Gemini.
What are examples of LLMs?
The best-known families are OpenAI's GPT models (behind ChatGPT), Anthropic's Claude, Google's Gemini, Meta's open-weight Llama models, and Mistral's models. Open-weight models can be downloaded and run on your own hardware.
What is the difference between an LLM and AI?
AI is the umbrella term for any system that performs tasks we associate with intelligence. An LLM is one specific kind of AI — a model specialized in language, trained by next-token prediction. Every LLM is AI, but plenty of AI (image classifiers, recommendation systems, chess engines) is not an LLM.
Chisato Chisato · · 5 min read

What Is Catastrophic Forgetting in AI Fine-Tuning?

Catastrophic forgetting is when training a model on new data erases skills it already had. Why it happens during fine-tuning, and how teams work around it.

#AI #LLMs #Machine Learning