LLMs
How language models read your pages and write answers.
What an AI answer says about a brand depends on what the model learned in training and on which pages sit in its context window when it answers. Only pages in the context window can be cited. A large language model (LLM) is a neural network trained on large amounts of text to predict the next token, and chat assistants and AI search products use LLMs to write their answers.
#Training and inference
An LLM has two phases. In training, the model reads large collections of text and adjusts its parameters, the numerical weights that define how it processes text, each time it predicts the next token wrongly. Training ends with fixed weights and a knowledge cutoff, the date after which the training data contains no information.
In inference, the trained model answers a prompt. It predicts one token, adds it to the text, and repeats until the answer is complete. The model does not learn from the prompt and has no database of facts to look up. Its output depends on its weights and on the text in its context window. How large language models work describes both phases.
The two phases are the two routes by which a page can reach an AI answer. A page in the training data can shape what the model knows, but the model cannot cite it. A page retrieved at answer time sits in the context window, and the system can link to it. Retrieval-augmented generation covers the second route, and Common Crawl covers one of the main sources of training data.
#Tokens and the context window
Models read and write text in tokens: whole words, parts of words, characters or punctuation. OpenAI estimates that 100 tokens are about 75 English words. The ratio depends on the tokenizer, and a provider can change it when it ships a new one. Anthropic's tokenizer for Claude Opus 4.7 and later produces about 30% more tokens for the same text than its earlier tokenizer.
The context window is the number of tokens a model can work with in one request. The system prompt, the conversation, any retrieved pages and the answer all share it. Current flagship models from OpenAI, Anthropic and Google accept about 1 million tokens. A larger window holds more sources, but models use information at the start and end of a long context more reliably than information in the middle. Anthropic's documentation says accuracy and recall degrade as the token count grows.
These limits shape how a page is read in AI search. The model sees passages of a page alongside passages from other sources, and developer search tools cap how much text they extract from each page. A passage that states its claim in its first sentence keeps the claim near the start of the extract.
#The Transformer
Current LLMs are built on the Transformer, an architecture introduced in 2017 by eight researchers at Google in the paper "Attention Is All You Need". Its self-attention mechanism lets each token weigh every other token in the input. The Transformer processes a whole sequence in parallel, which made training at large scale practical. What the Attention Is All You Need paper introduced traces the line from that paper to the models behind ChatGPT, Claude, Gemini and Google AI Overviews.
#Alignment
Alignment is background knowledge for your team rather than something a site can act on. No published study has shown that the alignment method changes which pages a model cites. Providers add a second stage of training so that a model follows instructions and avoids harmful answers. OpenAI used reinforcement learning from human feedback (RLHF) for InstructGPT and ChatGPT: people ranked model outputs, and the model learned to prefer the higher-ranked ones. Anthropic developed Constitutional AI for Claude, in which the model critiques its own outputs against a written set of principles and AI feedback replaces human labels for harmlessness.
How RLHF and Constitutional AI differ compares the two methods and grades the claims made about them.
#Hallucination and grounding
A model asked about something outside its training data still generates the most likely continuation of the prompt. That continuation can be false, and the error is called hallucination. Retrieval reduces it by putting sources in the context window before the model writes, a practice providers call grounding. Google Cloud says grounding reduces the chances of invented content, and does not say that it removes them.
For a page, the mechanics lead to a short list of requirements. The page must be crawlable and indexed to be retrieved. Each passage should make one claim that makes sense on its own. The page should contain information the model cannot produce from training, such as original data or first-hand experience. The AI search section explains how retrieval systems find and select those passages.
Basics
What did the Attention Is All You Need paper introduce?
The 2017 Google paper Attention Is All You Need introduced the Transformer, the architecture behind ChatGPT, Claude, Gemini and AI search.
How do large language models work?
LLMs predict text one token at a time from what fits in their context window. Tokens, context window sizes and the lost-in-the-middle effect.
What is a context window?
A context window is the number of tokens a model can read and write in one request. Sizes from Anthropic, OpenAI and Google, and what happens at the limit.
What are tokens in AI?
A token is the unit of text a language model reads and writes. OpenAI estimates that 100 tokens are about 75 English words. Counts and limits by provider.
What is an LLM hallucination?
An LLM hallucination is a false or unsupported statement given as fact. Why models produce them, how grounding helps, and how often AI search cites wrongly.
What are vector embeddings?
A vector embedding is a list of numbers that represents the meaning of text. OpenAI's text-embedding-3-large returns 3,072 of them by default.
What is an AI agent?
An AI agent is a system in which a language model plans steps, calls tools and acts for a user in a loop. How OpenAI, Anthropic and Google define agents.
What are reasoning models, and how do they change AI search?
Reasoning models think before answering and can search several times per response. What OpenAI, Google and Anthropic document, and what it means for citations.
Training and alignment
What does LLM training data look like?
LLM training data comes from web crawls such as Common Crawl, licensed data, books, code, human feedback and synthetic data. Real examples and site controls.
What is a knowledge cutoff, and why do AI answers go out of date?
A knowledge cutoff is the last date covered by a model's training data. Current cutoffs from OpenAI, Anthropic and Google, and how web search works around them.
How do RLHF and Constitutional AI differ?
RLHF learns from human ratings. Constitutional AI learns from written principles and AI feedback. How each works, and what is known about citations.