An LLM is a large neural net that learns to predict the next token from the words and code in vast sets of text data.
Repeated across a large training set and many learned parameters, that prediction task produces a system that can write, summarize, translate, classify and answer questions.
The important caveat is that an LLM generates likely continuations. It does not automatically check a database, confirm that a claim is current or prove that its answer is true.
Sources checked: October 16, 2026.
From text to tokens
An LLM does not read a sentence as a human sees it. A tokenizer converts the text into numbered units drawn from a fixed vocabulary. One token might be a common word, a word fragment, a space-plus-word combination or a punctuation mark.
Google’s introduction to language models uses subword tokenization to show why a longer word can become several tokens. The exact split depends on the model and language, so token counts are not the same as word counts.
Tokens matter in practice because model inputs, outputs and context windows are measured in them. They also affect API cost and response length.
What the model learns during training
During pretraining, the model sees many token sequences and adjusts its internal parameters to improve its next-token predictions. A parameter is a learned numerical value inside the network. “Large” usually refers to the scale of the model, training data and computing work, not to one fixed parameter threshold.
The training objective sounds narrow: given the tokens so far, which token is likely to come next? Yet doing this across varied text teaches the model useful statistical patterns about language, code, document structure and relationships that appear in its data.
Training does not store every source as a searchable library. Some facts and patterns are represented in the model’s weights, but a user cannot assume that the model can retrieve a particular source or reproduce it accurately.
Why transformers changed language models
Most modern LLMs use the Transformer architecture. The original 2017 paper, Attention Is All You Need, proposed a sequence model based on attention rather than recurrence.
Attention lets the network weigh relationships between tokens in the same sequence. In “The bank approved the loan because it had verified the documents,” attention helps the model connect “it” with the relevant earlier subject and use surrounding words when predicting what follows.
Transformers also made training more parallelizable than recurrent models, which process a sequence step by step. That helped researchers train larger networks on larger datasets. It does not mean a model understands every relationship correctly; attention is a computation, not a truth check.
How an LLM produces an answer
When you submit a prompt, the application first turns it into tokens. The model processes those tokens and produces a probability distribution over the possible next tokens. The system selects one token, appends it to the sequence and repeats the process until it reaches a stop condition or output limit.
This is called inference. Settings such as temperature can change how narrowly or broadly the system samples from the distribution. A lower temperature can make outputs more consistent, but it does not guarantee factual accuracy.
A chat product also supplies instructions and conversation history around your message. Those extra tokens influence the next-token predictions. They occupy the same finite context budget as your prompt and the answer.
Base models, assistants and reasoning models
A pretrained base model mainly continues text. Developers usually add post-training so the model follows instructions, uses safer response patterns or produces structured output.
Supervised fine-tuning shows the model examples of desired behavior. Preference training compares alternative responses. Other reinforcement-learning methods can improve performance on tasks with checkable outcomes, such as code or mathematics. These stages change behavior, but they do not turn probabilistic generation into a guaranteed source of truth.
The product around the model matters too. Search, retrieval and tools can supply current information or perform actions. The model still generates the request for a tool; separate software executes it and returns the result.
What an LLM can do well
LLMs are useful when the task depends on language patterns rather than a guaranteed exact answer. Common uses include:
- drafting, rewriting and summarizing text;
- extracting fields from documents;
- classifying messages or records;
- translating between languages or formats;
- explaining and generating code;
- turning a natural-language request into structured tool arguments.
A good workflow keeps a human or deterministic check where errors would matter. For example, an LLM can propose a spreadsheet formula, but the sheet should calculate it. It can summarize a policy, but the original policy should remain the authority.
Why LLMs hallucinate
The model is rewarded for producing a plausible continuation, not for stopping whenever evidence is missing. It can therefore invent a citation, merge two similar facts or answer an ambiguous question with unwarranted confidence.
Our guide to AI hallucinations explains practical checks. For current or private facts, retrieval can help by placing relevant documents in the prompt before generation. That approach is called retrieval-augmented generation.
Retrieval reduces some knowledge gaps, but it adds its own failure points: the search may miss the right document, retrieve an outdated version or provide text that does not support the conclusion.
LLM, chatbot and AI agent are not synonyms
An LLM is the model that predicts tokens. A chatbot is an interface and application built around a model. An AI agent is a broader system that may let a model choose tools, keep task state and perform multi-step work.
The same LLM can power all three. What changes is the surrounding software, permissions, sources and checks. See AI agents versus chatbots for that distinction.





