Large language models, usually shortened to LLMs, are machine-learning models trained to work with language at large scale. Many modern LLMs use the transformer architecture and learn by predicting missing or next pieces of text across very large datasets. After training, they can generate, transform, classify, and analyze text through natural-language prompts.

What does “large” mean?

There is no single parameter count that officially separates a large language model from every smaller model. “Large” usually reflects a combination of model capacity, training data, and computation. A model can also be made more capable through training methods and system design rather than parameter count alone.

How an LLM learns

Text is broken into units called tokens. During pretraining, the model adjusts its internal parameters to become better at predicting tokens from context. This process teaches statistical relationships involving grammar, facts represented in the data, writing styles, code patterns, and many other structures.

Many systems are then fine-tuned or otherwise adapted so their behavior better follows instructions. Additional training can improve usefulness or safety, but it does not turn the model into a perfect database of verified facts.

Why transformers matter

The transformer architecture uses attention mechanisms that help the model represent relationships among tokens across a context. Transformers can be trained efficiently on modern hardware and scaled to large datasets. They have become the predominant architecture for current general-purpose LLMs.

How an LLM generates an answer

When prompted, a text-generating LLM calculates probabilities for possible next tokens and selects a continuation according to its decoding process. The output is produced step by step. This mechanism helps explain both the remarkable fluency of LLMs and a central limitation: a likely continuation is not automatically a true statement.

What can LLMs do?

  • Draft and revise text.
  • Summarize or classify documents.
  • Translate between languages.
  • Explain concepts and answer questions.
  • Generate and analyze software code.
  • Extract structured information from text.

These abilities make LLMs an important part of generative AI. When an LLM is connected to tools, memory, and planning software, it can also be used inside agentic AI systems.

Why LLMs hallucinate

An LLM can generate incorrect names, dates, citations, calculations, or explanations while sounding confident. This behavior is often called hallucination. It arises because the model’s core generation objective is not equivalent to checking every statement against a trusted source. Retrieval systems, tools, constrained workflows, and human review can reduce some errors but do not eliminate the need for verification in high-stakes work.

Sources and further reading