# Large language model (LLM)

> A large language model is an AI model trained on very large amounts of text to predict the next word, which lets it write, summarise, translate, classify and answer questions in natural language.

Also called: LLM, LLMs, language model, AI model, GPT model. Category: Models and training. Source: https://aibuildindex.com/glossary/large-language-model

## In the index

- Large language models: median $4,720, middle half $1,000 to $16,000, 605 priced briefs (https://aibuildindex.com/skills/large-language-models)
- AI API integration: median $2,500, middle half $500 to $6,400, 1,993 priced briefs (https://aibuildindex.com/cost/ai-api-integration)
- OpenAI: median $2,000, middle half $400 to $6,800, 3,445 priced briefs (https://aibuildindex.com/tools/openai)

A large language model, or LLM, is the engine behind most of the AI products businesses buy today: chat assistants, support bots, document summarisers, email drafters and coding assistants. It is a statistical model of language. Given some text, it predicts what text should come next, and that one ability, scaled up, turns out to cover a surprising range of office work. For a buyer, the important point is that an LLM is a component, not a product. Almost every AI build wraps one in data, instructions, checks and integrations.

## How it works

An LLM is a [transformer](https://aibuildindex.com/glossary/transformer) network trained on a very large body of text. Text is broken into [tokens](https://aibuildindex.com/glossary/token), and during training the model adjusts billions of internal numbers (its weights) to get better at predicting the next token. After this pre-training, most commercial models are tuned further with instruction data and human feedback so they follow requests politely and refuse harmful ones.

At run time, called [inference](https://aibuildindex.com/glossary/inference), the model reads a [prompt](https://aibuildindex.com/glossary/prompt) plus any documents placed in its [context window](https://aibuildindex.com/glossary/context-window) and generates a reply one token at a time. Nothing is looked up by default: the model answers from patterns learned in training, which is why it can state false things fluently, a failure known as [hallucination](https://aibuildindex.com/glossary/hallucination).

A typical business build calls a hosted LLM through an API. A support tool, for example, sends the customer's message, the relevant help articles and a set of rules to the model, then checks the reply before it is shown.

## What it means for cost

The model itself is rarely the expensive part of a build. Most of the budget goes into the work around it: getting the right data to the model, writing and testing instructions, handling errors, connecting to existing systems and proving the output is good enough. Choices about the model still matter:

- **Which model.** Larger models are more capable and cost more per request; smaller ones are cheaper and faster but need more careful prompting.
- **Hosted or self-hosted.** Calling a provider's API is the quickest start. Running an [open-weight model](https://aibuildindex.com/glossary/open-weight-model) on your own servers adds infrastructure work but can suit strict data rules.
- **Volume.** Running costs scale with how much text goes in and out, so long documents and chatty workflows add up.

Ask a builder which model they plan to use, why, and how easily it can be swapped later.

## Common questions

### Is an LLM the same as ChatGPT?

No. ChatGPT is a product built on top of LLMs made by OpenAI. The same kind of model is available from several providers through APIs, and businesses usually build their own tools on those APIs rather than on the consumer chat product.

### Does an LLM learn from my data as I use it?

Not by default. A deployed model's weights stay fixed; it only sees your data within each request. Whether a provider may keep or train on that data depends on its terms and your account settings, which is worth checking before sending anything sensitive.

### Do I need to train my own LLM?

Almost never. Training a model from scratch is a research-scale undertaking. Business builds use an existing model and adapt it with instructions, retrieved documents or, occasionally, [fine-tuning](https://aibuildindex.com/glossary/fine-tuning).

## Related terms

- [Foundation model](https://aibuildindex.com/glossary/foundation-model): A foundation model is a large AI model trained on broad data that can be adapted to many different tasks, such as writing, coding, image understanding or classification, rather than built for one job.
- [Token](https://aibuildindex.com/glossary/token): A token is the small unit of text, often a word or part of a word, that a language model reads and writes, and the unit that most AI providers use to measure and bill usage.
- [Context window](https://aibuildindex.com/glossary/context-window): A context window is the maximum amount of text, measured in tokens, that a language model can take in and produce in a single request, including instructions, documents, conversation history and its own reply.
- [Inference](https://aibuildindex.com/glossary/inference): Inference is the stage where a trained AI model is used to produce outputs, such as answers, classifications or images, from new inputs, as opposed to training, where the model learns from data.
- [Fine-tuning](https://aibuildindex.com/glossary/fine-tuning): Fine-tuning is the process of further training an existing AI model on a smaller set of task-specific examples so that it reliably adopts a particular behaviour, format, tone or specialised skill.
- [Hallucination](https://aibuildindex.com/glossary/hallucination): A hallucination is output from an AI model that sounds plausible but is false, unsupported or invented, such as a made-up fact, citation, figure or policy presented with the same confidence as a correct answer.
