# Large Language Model \(LLM\)

A large language model is a high-capacity model trained on token sequences to predict and generate language, often with capabilities that transfer across many tasks.

- Type: term
- Domain: Engineering & architecture
- Level: Foundational
- Last reviewed: 2026-09-26
- Original: [Soroush’s Product Wiki](<https://wiki.soroush.uk/topic/large-language-model/>)

## What it means

A large language model \(LLM\) learns statistical relationships among tokens from large datasets and uses context to predict subsequent tokens or other language outputs. Many current LLMs use Transformer architectures and are adapted to follow instructions. An LLM can generate, classify, transform, or extract text, but fluent language does not mean it has verified knowledge or human understanding.

## Why it matters

LLMs let products accept flexible language and produce useful text without a separate model for every phrasing. Their probabilistic behavior, context limits, hallucinations, security exposure, and variable cost require different product requirements from conventional deterministic interfaces.

## When to use it

Use an LLM when language variation is central and approximate interpretation or generation provides value. Prefer search, rules, templates, databases, or conventional models when answers must be exact, behavior is easily specified, volume makes generation uneconomic, or a wrong response cannot be safely contained.

## How it works

1. A tokenizer converts input into model-specific tokens.
2. The model represents tokens and their relationships within the available context window.
3. Trained parameters produce a probability distribution over possible next tokens or outputs.
4. A decoding process selects tokens repeatedly until a stopping condition is reached.
5. The application validates, grounds, formats, or routes the output before presenting it or taking action.

## A practical example

A project tool uses an LLM to turn free-form meeting notes into draft action items. It asks for structured fields, shows source excerpts, requires owners to confirm assignments, and sends malformed or low-confidence cases back to manual entry.

## Where it breaks

LLMs can fabricate claims, mishandle long context, reflect training bias, and respond inconsistently to small input changes. Their internal knowledge can be stale or untraceable. Model size alone does not establish task quality, and model behavior may change across versions.

## Common mistakes

- Equating natural language fluency with factual accuracy or reasoning reliability.
- Using an LLM where deterministic parsing or retrieval would be cheaper and more dependable.
- Testing only one-turn happy paths and ignoring context, adversarial input, and repeated use.
- Letting model output directly trigger privileged actions without validation and authorization.

## Visualization

[View the visualization on the website](<https://wiki.soroush.uk/topic/large-language-model/#visualization-large-language-model>)

## Sources

1. [LLMs: What's a large language model?](<https://developers.google.com/machine-learning/crash-course/llm/transformers>) — Google for Developers · Official educational documentation
2. [Attention Is All You Need](<https://arxiv.org/abs/1706.03762>) — Advances in Neural Information Processing Systems · Peer-reviewed research

## Related topics

- [Token and Tokenizer](<https://wiki.soroush.uk/topic/token-and-tokenizer/>)
- [Context Window](<https://wiki.soroush.uk/topic/context-window/>)
- [AI Hallucination](<https://wiki.soroush.uk/topic/hallucination/>)
