What is a large language model (LLM)? Definition and how it works

A large language model (LLM) is a neural network trained on huge amounts of text to predict the next token, which lets it generate, summarise and translate language. Almost all modern LLMs use the Transformer architecture that Google researchers described in June 2017, and the largest models have hundreds of billions or even trillions of parameters. LLMs power ChatGPT, Claude, Gemini and Google’s AI Overviews, so they now decide how many people discover brands.

Updated: 17 October 20263 min read
Infographic: how a large language model (LLM) answers a question in 5 steps, from tokens to citations
Source: Google Machine Learning Crash Course; Vaswani et al., 2017

How does a large language model work?

A large language model works by assigning probabilities to every possible next token and picking one, over and over. A token is a piece of text: a word, part of a word or a single character. Google’s machine learning course estimates that about 400 tokens equal 300 English words. Google describes the result as a very sophisticated autocomplete: the model continues a sentence, a paragraph or a reply one token at a time.

LLM architecture: the Transformer

Modern LLMs are built on the Transformer, an architecture based entirely on attention. Ashish Vaswani, Noam Shazeer and colleagues at Google introduced it in the paper “Attention Is All You Need”, posted on arXiv on 12 June 2017. The three ideas below explain why it replaced older recurrent networks.

Self-attention

Self-attention lets the model weigh how much every other token in the input affects the meaning of the current one. In the sentence about a tired animal that did not cross the street, attention links the word “it” to “animal”, not to “street”.

Encoders and decoders

Encoders turn text into numeric representations called embeddings, and decoders turn representations back into text. Chat assistants mostly use decoder-only models, while encoder models suit search and classification tasks.

Parameters and context window

Parameters are the learned weights of the network, and the context window is how many tokens the model reads at once. Anthropic’s current Claude models, for example, accept 1 million tokens of context.

How are LLMs trained?

LLMs are trained in several stages that move from raw text to helpful answers:

  1. Pre-training: the model learns to predict tokens on a massive text corpus, which takes months of compute.
  2. Instruction tuning: the model learns to follow instructions from example prompts and answers.
  3. Reinforcement learning from human feedback (RLHF): people rank answers and a reward model steers the LLM, the method OpenAI used for ChatGPT in November 2022.
  4. Retrieval and tools: the deployed model searches the web or a database to ground answers in current facts.

Examples of large language models

Model familyCompanyProduct
GPTOpenAIChatGPT
ClaudeAnthropicClaude
GeminiGoogleGemini app, AI Overviews, AI Mode
PLLuMPolish Ministry of Digital AffairsPolish public sector models (8 to 70 billion parameters)

LLMs in marketing, SEO and AI search

LLMs matter to marketers because they now write the answer before the user sees any link. Google’s AI Overviews and standalone assistants retrieve pages, summarise them and cite only a few sources. Optimising for that step is called Generative Engine Optimization.

In my SEO projects I see three practical rules that follow from how LLMs read pages:

  • Answer the question in the first sentence under each heading, because retrieval systems cut pages into short passages.
  • Name entities explicitly (companies, products, places), because models connect facts through entities.
  • Publish exact numbers with their source, because LLMs prefer verifiable, quotable claims.

I build these rules into every AI SEO project, together with an entity SEO plan.

Limitations of large language models

The main limitation of an LLM is that it can produce fluent but false statements, known as hallucinations. Google’s course also lists high training and inference costs, bias inherited from training data and open questions about how well models generalise. For marketing teams this means every AI-written statistic needs a human fact check before publishing.

Pro tip: Write one clear, sourced definition of your product category on your own site. When an LLM answers “what is X”, a concise definition with a number and an entity name is the passage it is most likely to lift and cite.

Frequently asked questions about LLM

What does LLM stand for?

LLM stands for large language model. It is an AI model trained on very large text datasets to predict and generate language.

Is ChatGPT an LLM?

ChatGPT is an application built on OpenAI's GPT large language models. The LLM generates the text, while the ChatGPT product adds the chat interface, tools and web search.

How do large language models learn?

Large language models learn by predicting tokens on huge text corpora during pre-training. They are then refined with instruction tuning and human feedback so that their answers follow requests.

Why do LLMs hallucinate?

LLMs hallucinate because they generate the most probable continuation of text, not a verified fact. Grounding answers in retrieved sources reduces, but does not remove, this risk.

Related terms

International SEO · AI SEO (GEO)

Grow in every market, and get cited by AI

LLMs now choose which brands appear in AI answers, in every language your customers use. If you sell in several countries, I help you become the source that ChatGPT, Claude and Google's AI features quote in each market.

I help SaaS and e-commerce brands win organic traffic across Europe and the US, and get their brand recommended in ChatGPT, Gemini, Perplexity and Google AI Overviews. Every project starts with a free audit of your site, your markets and your visibility in AI answers.

Write to Adrian

Have a question about this term or your SEO?

Send a short message about your website, the markets you sell in and what you want to achieve. You get a reply from me, not from a sales team.

  • Free preliminary SEO and AI visibility audit
  • Strategy for international and multilingual markets
  • Reply within one business day
Book a free call
Adrian Dąbrowiecki

Write to Adrian

Adrian Dąbrowiecki · Marketer Coffee

Tell me about your site and your goals. I usually reply within one business day.