An LLM learns grammar, facts, writing styles and some reasoning patterns simply from predicting text at enormous scale. After extra training to follow instructions, it becomes the engine behind chatbots, writing assistants, coding tools and AI agents.

How it works

Building an LLM has two main stages. In pre-training, the model reads a huge text collection, typically trillions of tokens from websites, books, code and other sources, and repeatedly guesses the next token. Each wrong guess slightly adjusts its parameters, the internal numbers that encode what it has learned. Modern LLMs have billions to hundreds of billions of parameters, and some use mixture-of-experts designs that activate only part of the network per token. Almost all are built on the transformer architecture, introduced in 2017, whose attention mechanism lets every token weigh its relevance to every other token in the context. In post-training, the raw model is fine-tuned on examples of good instructions and answers, then refined with human or AI feedback, such as RLHF, so it becomes helpful and safer. At use time, the model works within a context window, which in current models ranges from tens of thousands to hundreds of thousands of tokens or more. It generates replies one token at a time, with settings such as temperature controlling how adventurous its word choices are.

Why it matters

LLMs turn language into something software can work with. For creators that means faster scripts, captions, outlines and repurposing. For professionals it means drafting, summarising and analysing documents in minutes. For businesses it means support bots, internal search and automated workflows. Knowing how LLMs work helps you use them well: give clear context, check facts, and choose the right model size for the task and budget.

Where you will see it

  • Drafting video scripts, newsletters and social captions from a rough outline.
  • Summarising long reports, contracts or meeting transcripts into key points.
  • Writing, explaining and debugging code inside an editor.
  • Answering customer questions using a company's own help-centre articles.

Limits and common misconceptions

  • LLMs can hallucinate, stating false information fluently, so important facts need checking.
  • Their knowledge stops at a training cut-off unless they are connected to search or documents.
  • They predict text rather than understand the world as people do, so reasoning can fail in surprising ways.

How it differs from related terms

Tools that use it

Frequently asked questions

How does a large language model work?

It breaks text into tokens and uses a transformer neural network to predict the most likely next token, over and over. It learned which continuations are likely by training on vast amounts of text. Extra training on instructions and feedback makes it follow requests and respond helpfully, like an assistant.

Is ChatGPT an LLM?

Strictly, ChatGPT is a product built on top of LLMs. The models underneath, OpenAI's GPT family, are the LLMs. The same applies to Claude and Gemini: the app adds features such as chat history, file uploads, search and tools around the core language model.

What does large mean in large language model?

It refers to the scale of the model and its training: billions or more parameters, trained on trillions of tokens using large clusters of GPUs or similar chips. Researchers found that scaling these up reliably improved ability, which is why modern models are so big.

Related terms

All AI terms