Large language models (LLMs) learn in two stages. Pretraining comes first as a neural network reads trillions of words and practises predicting the next one until it has absorbed grammar and a large amount of knowledge about the world. Post-training follows. Fine-tuning and human feedback turn that raw predictor into an assistant that follows instructions. That's the short answer to how are LLMs trained, and it decides what a model can say about your brand.

When a model answers from training alone, everything it says about your brand comes from the text it saw during that process. OpenAI describes its models as learning "from relationships in information" and says plainly that models don't store data "like a database." So the model holds patterns of words near your brand name and the categories it belongs to. It also holds patterns of competitors that come up in the same sentences.
How much a model learns about you depends on how often and how consistently the web describes you. A brand forms a strong association when reviews and documentation describe it in terms that match its press coverage. If your brand appears twice, in conflicting terms, you'll get a vague or wrong answer. Check this before anything else. Ask two or three assistants about your company with browsing switched off, and note what they get right and what they invent.
During pretraining, a model learns to predict the next token (a word or a piece of a word) across a huge body of text. Each wrong guess adjusts billions of internal numbers called parameters, and after trillions of guesses those numbers encode language and facts. Meta's Llama 3 paper gives a sense of the scale with its flagship model, which has 405B parameters trained on 15.6T text tokens. In the same paper, Meta's team says that during this stage "the model learns the structure of language and obtains large amounts of knowledge about the world from the text it is 'reading'."
The output of pretraining is a base model. Andrej Karpathy, a founding member of OpenAI, calls it an "Internet Document Simulator". It will continue any text you give it, but it won't reliably answer a question. The main variable between labs is the data recipe, which sets how hard they filter and what they deduplicate. It also determines which sources they repeat. For a marketer, frequency matters most. A fact that appears on thousands of pages gets learned. A fact that appears once remains unlearned.
ChatGPT is trained on three kinds of data. OpenAI's help center lists three primary sources of information. The first two are public internet content and data from third-party partners. The third is data that users provide or generate, along with contributions from human trainers and researchers. Each one reaches the model differently.
The open web is the largest source. Most labs start from crawls such as Common Crawl, a nonprofit archive whose monthly crawls each hold more than two billion web pages. OpenAI says it doesn't intentionally collect from sources behind paywalls or the dark web, and that it filters out spam and sites that aggregate personal information. A gated page, or one that blocks crawlers in robots.txt, never enters the pool.
Labs also pay for or negotiate access to content that isn't public. OpenAI says its partners range from a private video library to the Government of Iceland, which helps with preserving native languages. Archives and metadata of this kind fill gaps the open web leaves.
The third source is human input through written demonstrations and rankings. User conversations also contribute where the user's settings allow it. This data shapes behaviour more than knowledge, and the fine-tuning and feedback sections below cover it.
Labs rarely publish their current mixes. The last detailed public breakdown from OpenAI came in the 2020 GPT-3 paper, and it shows that the mix doesn't follow raw size. Filtered Common Crawl had the most text but was weighted to 60% of training, while smaller, higher-quality sources were sampled far more often than their size alone would allow.
| Source in GPT-3 | Tokens available | Weight in training mix |
|---|---|---|
| Filtered Common Crawl | 410 billion | 60% |
| WebText2 | 19 billion | 22% |
| Books1 and Books2 | 67 billion | 16% |
| Wikipedia | 3 billion | 3% |
Filtered Common Crawl
WebText2
Books1 and Books2
Wikipedia
Wikipedia supplied under 1% of the available tokens and got 3% of the training weight. Labs trust curated reference text more than the average web page, and the model sees it more times as a result.
A frontier pretraining run takes weeks to months on thousands of graphics processing units (GPUs). Fine-tuning and feedback rounds come after that. Meta trained Llama 3 405B on up to 16K H100 GPUs and reported 419 unexpected interruptions during one 54-day stretch of pretraining. Most of those were hardware failures. The cluster had to recover from each one and carry on.
Training time depends on model size and data volume, with hardware also a factor. The gap between small and large models is enormous. Microsoft Research trained phi-1, a small coding model, in 4 days on 8 A100s. For you, the timeline explains a delay. The data for a model is frozen before the long run starts, and testing and release take months after it ends. Whatever you publish today reaches a model's memory only when a new model is trained on it.
Fine-tuning teaches a base model how to behave by training it further on examples of good answers. Human writers produce prompts with ideal responses, and the model learns to imitate that format as it answers questions and follows instructions. These examples also teach it to refuse harmful requests. OpenAI's InstructGPT work, the method behind early ChatGPT, used about 13k training prompts with written demonstrations from roughly 40 screened contractors.
Compare that with the trillions of tokens in pretraining. Fine-tuning data is tiny, so its main effects are on style and behaviour, with only small gains in knowledge. I find this the most useful point for marketers to absorb. Fine-tuning decides whether a model gives a recommendation or lists options when asked about a product category, as well as how much it hedges. It can't teach the model a brand it never saw in pretraining. Labs and companies also fine-tune models for narrow jobs such as legal drafting or customer support, which is why the same base model behaves differently across products.
Reinforcement learning from human feedback (RLHF) refines outputs through rewards for the answers people prefer. Labelers compare several answers to the same prompt and rank them. Those rankings train a separate reward model that scores new answers, and the main model then trains to earn higher scores. InstructGPT's reward model learned from 33k training prompts with ranked outputs.
The effect was larger than model size. In the InstructGPT paper, labelers preferred answers from a 1.3B parameter InstructGPT model to those from the 175B GPT-3, a model more than 100 times bigger. Feedback still comes in after launch. The thumbs-up and thumbs-down buttons in chat apps collect it, and so do the AI trainers and red teamers OpenAI lists among its sources. Feedback shapes how a model ranks and frames answers. It can't fix a fact the model never learned.
Synthetic data is text that one model generates to train another. Labs use it where human text is scarce or messy, such as step-by-step reasoning or code exercises. Microsoft's phi-1 paper mixed 6B tokens of filtered web text with 1B tokens of synthetic textbooks and exercises written by GPT-3.5, and the small model scored 50.6% on a standard coding test.
The approach has limits. A 2024 study in Nature by Ilia Shumailov and colleagues at Oxford and Cambridge found that training on model-generated content without care causes "irreversible defects", in which "tails of the original content distribution disappear." Niche products and smaller brands sit in those tails, which also contain rare facts. So labs filter synthetic data heavily and still value original human writing. Clear, first-hand pages about your brand are exactly the kind of source a model-written summary can't replace.
A model knows nothing that happened after its training cutoff, the last date covered by its training data. OpenAI's API documentation lists GPT-4o with an Oct 01, 2023 knowledge cutoff. Product launches and rebrands after that date fall outside the model's memory, as do later price changes.
Cutoffs move only when a lab trains or updates a model. OpenAI says each new generation of foundation models is trained from scratch on a new dataset. Cutoffs differ between models and between versions of the same model, and a model asked about its own cutoff often gets it wrong. Check the vendor's model page. Then compare that date with your last major change. If the change came later, the model will describe the older version of your company.
Before an assistant runs a web search, it already has a view of your brand from training. That view shapes everything after it. Answers come from either the model's trained memory or pages it retrieves at the moment you ask. Retrieval is not training. Search results sit in the conversation for that one answer and change nothing in the model.
Memory still steers the search. When OpenAI moved GPT-4o's training cutoff from November 2023 to June 2024, its release notes said a fresher data set "makes it easier" for the model "to frame its web searches more efficiently and effectively." A model that already links your brand to a category is more likely to search for you and recognise you in results. A model that has never seen you overlooks you when it decides what to search for. Test both modes with one question with search off and the same question with search on.
Act before the next training run. Make sure the facts you'd want a model to repeat are public and crawlable, with consistent wording everywhere they appear. Check your robots.txt as well, because blocking AI crawlers takes your pages out of future training sets, and newer models will be trained on whatever the web says about you now. Once you know how are LLMs trained, the job comes down to measuring where you stand in both modes. Snoika audits websites and tracks brand visibility in Google and in AI assistants. Check your AI visibility free.
Pretraining a frontier model takes weeks to months, with fine-tuning and testing adding time before release. Smaller models can train in days. The duration depends on model size and data volume, as well as the available hardware.
Training draws on public internet content and data supplied by partners. Human contributions include training examples and user conversations where settings allow their use. The current proportions aren't publicly detailed, so older published breakdowns shouldn't be treated as today's recipe.
Fine-tuning teaches a model to follow instructions by learning from examples of good responses. It mainly changes behaviour rather than factual knowledge, influencing whether an answer recommends an option or presents alternatives. It also teaches refusals for harmful requests.
Human feedback improves answers by rewarding responses that people prefer. Reviewers rank competing answers, and those rankings train a reward model that guides further training. This shapes how answers are framed, but it doesn't guarantee factual accuracy.
Web searches don't permanently update a model's trained knowledge. The question “how are llms trained” concerns changes to the model itself, while retrieved pages provide context for the current answer. An assistant can therefore report recent information without learning it permanently.
Keep reading
All articles


See how AI talks about your brand