# What Is an LLM? The Facts Agent Users Need

> Canonical: https://skillalmanac.com/learn/what-is-an-llm-for-agent-users | Updated: 2026-11-25 | Index status: index-eligible

Understand language models, tokens and context, with a worked Transformer and BERT example. Separate model behavior from the application around it.

## Facts

- 2026-11-25: Google's glossary defines an LLM minimally by language-model scale, not one architecture (https://developers.google.com/machine-learning/glossary#large-language-model)
- 2026-11-25: The original Transformer decoder combines causal attention masking with shifted target inputs (https://arxiv.org/html/1706.03762v7)
- 2026-11-25: BERT uses a bidirectional Transformer encoder and masked language-model pretraining (https://arxiv.org/html/1810.04805v2)
- 2026-11-25: Claude's context window includes request contents and generated output, including thinking (https://platform.claude.com/docs/en/build-with-claude/context-windows)

A large language model is a statistical model with very many learned parameters that estimates probabilities of text tokens or token sequences from context. Text generation, question answering and summarization are common applications, rather than requirements shared by every language-modeling design.

For the short definition, see [large language model](/glossary/large-language-model). This guide explains what that distinction means when you use an assistant or coding agent.

## The model and the application do different work

A text-generating model supplies a response. The surrounding application decides which documents and conversation history to supply, which tools to expose and how to save state. A saved chat memory or a handoff file is different from the parameters learned during model training.

Do not assume every language model is an ordinary next-token generator. BERT, for example, uses masked bidirectional pretraining; its original paper also includes a next-sentence-prediction objective. A Transformer is an architecture, whereas next-token prediction and masked-token prediction describe different modeling objectives.

## A worked Transformer example

Imagine translating **Le chat dort** into **The cat sleeps**. This is a simplified illustration, not a model run. Words stand in for tokens; it does not specify a real tokenizer's segmentation.

In the original Transformer, encoder positions can attend across the source sentence. The representation at **chat** can use information from both **Le** and **dort**. The encoder also contains position-wise feed-forward layers; the paper's attention-based design does not mean the network contains nothing except attention.

The decoder generates the translation one token at a time. When predicting **sleeps**, it can use the earlier output **The cat** and the encoded French sentence. During training, causal attention masking and shifted decoder inputs prevent it from consulting the answer token or later target tokens.

BERT instead uses a bidirectional encoder. In the illustrative input **The [MASK] sleeps**, a masked-token prediction can use both **The** and **sleeps**. **Cat** is one plausible completion, not a measured prediction. BERT's original corruption procedure does not replace every selected training token with [MASK].

These are different uses of masking: causal masking blocks attention connections, while the masked-token example hides an input token. See the original Transformer paper, sections 3.1 and 3.2.3, and the BERT paper, section 3.1. The [Transformer definition](/glossary/transformer) summarizes the architecture separately from its training objective.

## What tokens and context mean for an agent

Text is processed in [tokens](/glossary/token), which need not be whole words. Anthropic documents that counts depend on the model and the supplied input; use the token-counting endpoint for the model you plan to use instead of a fixed words-to-tokens conversion.

For Claude, the [context window](/glossary/context-window) includes the request and the new output, including thinking. System instructions, tool definitions and returned documents consume space too. Output also has a separate maximum. Compaction summarizes earlier material so a conversation can continue; it does not enlarge the underlying window or promise perfect preservation.

A practical check is to compare the supplied documents with the answer: was the relevant passage included, and does it support the result? A larger window alone does not guarantee reliable recall. The context-window documentation describes degradation with longer context as context rot.

## Avoid these common mistakes

- **Treating the architecture as a product name.** A model family, a chat application and a coding agent are different things; identify the component you mean.
- **Treating saved application state as retraining.** Passing a note in the next request changes available context, not by itself the learned parameters.
- **Assuming every service bills in the same way.** Check the service's published pricing and reported usage. The token-counting documentation distinguishes estimated counts from billed usage.
- **Confusing supplied and newly generated thinking.** In Anthropic's counting requests, supplied assistant thinking can count as input. Newly generated thinking is output; preservation of older thinking depends on the model and configuration.
- **Treating fluent wording as verification.** Compare important output with the underlying documents or other suitable evidence.

## A practical next step

Try the [context-window packer](/skills/skill-almanac/context-window-packer) to examine a proposed prompt budget, or the [LLM cost estimator](/skills/skill-almanac/llm-cost-estimator) with a supplied usage profile and price table. These are illustrative catalog connections, not claims that either skill was executed or shown to improve a run for this guide.

For the retrieval-versus-training distinction, continue with [retrieval-augmented generation](/glossary/retrieval-augmented-generation). For connections between an application and external tools, see [Model Context Protocol](/glossary/model-context-protocol).

## Related skills

- [context-window-packer](https://skillalmanac.com/skills/skill-almanac/context-window-packer.md): Platform Score 56/100 (provisional)
- [llm-cost-estimator](https://skillalmanac.com/skills/skill-almanac/llm-cost-estimator.md): Platform Score 56/100 (provisional)

## Related guides

- [Prompt Engineering for Agents vs Chat Models](https://skillalmanac.com/learn/prompt-engineering-guide-for-agents.md)
- [AI Hallucination: What to Check in Agent Output](https://skillalmanac.com/learn/ai-hallucination-what-to-check.md)
- [MCP vs API: When an Agent Needs an MCP Server](https://skillalmanac.com/learn/mcp-vs-api.md)
- [What Is an AI Agent? The Model, Tools and Memory Loop](https://skillalmanac.com/learn/what-is-an-ai-agent.md)

## Sources

- https://developers.google.com/machine-learning/glossary#large-language-model
- https://arxiv.org/html/1706.03762v7
- https://arxiv.org/html/1810.04805v2
- https://platform.claude.com/docs/en/build-with-claude/context-windows
- https://platform.claude.com/docs/en/build-with-claude/token-counting

Platform Scores report our assessment under a published method. They are not a safety guarantee.
