# What is inference in AI?

> Inference is running a trained model to produce an output, such as an answer to a prompt. The model's weights stay fixed while it runs.

Canonical: https://promptlyfound.com/glossary/inference
Updated: 2026-12-01

## Short answer

Inference is **running a trained model to produce an output, such as an answer to a prompt**. The model uses the weights it learned in training, and they do not change while it runs. Every AI search answer is an inference run, and retrieved pages enter the model at this step. Reasoning models spend extra tokens at inference to think before they answer.

## Key findings

- Google's machine learning glossary defines inference in large language models as the process of using a trained model to generate a response to an input prompt. Training determines a model's weights, and inference uses them. [1]
- On the 2024 AIME math exams, OpenAI's o1 averaged 74% with one sample per problem, 83% with consensus among 64 samples and 93% when a learned scoring function re-ranked 1,000 samples. [2]
- OpenAI bills the hidden reasoning tokens of its reasoning models as output tokens. A response can use from a few hundred to tens of thousands of them. [3]
- Anthropic's glossary says the documents in retrieval-augmented generation are retrieved at runtime, when a query is sent to the model, and passed into the context window. [4]

Inference is the step at which an AI search product writes its answer. A site's pages can only reach that answer through training data, which was fixed earlier, or through retrieval during inference.

## How does inference work?

Inference runs a finished model on new input. [Google's machine learning glossary](https://developers.google.com/machine-learning/glossary) defines it for large language models as the process of using a trained model to generate a response to an input prompt. It describes training as finding a model's ideal weights, and inference as using those learned weights to make predictions.[1]

Speed is measured at inference. [Anthropic's glossary](https://platform.claude.com/docs/en/about-claude/glossary) defines latency as the delay between submitting a prompt and receiving the output, and time to first token as the time until the model generates the first token. Model size, hardware, network conditions and the complexity of the prompt all affect both.[4]

## What is the difference between training and inference?

Training changes the weights, and inference only uses them.[1] A model learns from its training data before release. Its weights do not change while it answers a prompt, so the prompt affects that answer but does not retrain the model. [How do large language models work?](https://promptlyfound.com/llms/how-llms-work) explains both phases in more detail.

## How do reasoning models use inference?

Reasoning models spend more computation at inference to get better answers. In [Learning to reason with LLMs](https://openai.com/index/learning-to-reason-with-llms/), OpenAI said the performance of its o1 model improved with more time spent thinking, which it called test-time compute. On the 2024 AIME math exams, o1 averaged 74% with one sample per problem. It reached 83% with consensus among 64 samples, and 93% when a learned scoring function re-ranked 1,000 samples.[2]

The thinking has a price. [OpenAI's guide to reasoning models](https://developers.openai.com/api/docs/guides/reasoning) says reasoning tokens are not visible through the API but are billed as output tokens. Depending on the problem, a model may generate from a few hundred to tens of thousands of them.[3] [What are reasoning models?](https://promptlyfound.com/llms/reasoning-models) covers how they search and cite.

## How does inference affect AI search?

Retrieval happens at inference. Anthropic's glossary says the documents in retrieval-augmented generation are retrieved at runtime, when a query is sent to the model, and passed into the context window. This lets a model use information beyond its training data.[4] A page published after a model's training can still appear in its answers this way. [When does AI answer from training data, and when does it search?](https://promptlyfound.com/ai-search/training-data-vs-live-retrieval) covers when each path applies.

## Sources

1. Machine Learning Glossary. Google for Developers. https://developers.google.com/machine-learning/glossary
2. Learning to reason with LLMs. OpenAI, 2024-09-12. https://openai.com/index/learning-to-reason-with-llms/
3. Reasoning models. OpenAI API documentation. https://developers.openai.com/api/docs/guides/reasoning
4. Glossary. Claude API documentation. https://platform.claude.com/docs/en/about-claude/glossary

---

This is a plain-text copy of https://promptlyfound.com/glossary/inference from Promptly Found. The web page is the canonical version and includes the charts.
