# Inference

> Canonical: https://skillalmanac.com/glossary/inference | Last verified: 2026-11-24 | Index status: index-eligible

Inference is the use of a trained machine learning model to produce outputs, such as predictions or, for a large language model, a generated response to a prompt.

Also called: AI inference, inferencing, model inference, what is inference in AI, what is inferencing in AI, artificial intelligence inference, inference AI.

## In plain language

Inference means using a model that has already been trained. IBM's example is a spam detection model that infers whether an email is spam based on the spam examples it saw in training. Google's glossary contrasts it with training, which determines the model's weights.

## Technical definition

Google's glossary describes training as determining a model's ideal weights and inference as using those learned weights to make predictions. For autoregressive language generation, inference includes repeatedly predicting the next token from the supplied context using learned model parameters. In statistics, inference has a somewhat different meaning, per Google.

## How it shows up when you use agents

Google's glossary defines inference in large language models as the process of using a trained model to generate a response to an input prompt. When an agent sends a prompt to a language model and gets a response back, that exchange is inference in this sense.

Anthropic's pricing page lists separate per-million-token rates for input and output, and separate prompt caching rates. It states that cache write tokens are charged when content is first stored and cache read tokens when a later request retrieves it. See [Token](/glossary/token) for how text is counted.

## Worked example: use parameters rather than fit them

Suppose training has produced a toy linear model `y = 2x + 1`. Supplying `x = 3` and calculating `y = 7` is inference: the calculation uses the given parameters 2 and 1. Fitting those parameters from examples would be training. This hypothetical arithmetic example does not claim that a model was trained or evaluated on real data.

## Common confusions

- **Inference versus training.** Google's glossary says training determines a model's weights and inference uses those learned weights to make predictions.
- **Inference versus fine-tuning.** Anthropic's glossary defines fine-tuning as further training a pretrained language model using additional data; see [fine-tuning](/glossary/fine-tuning).
- **Inference versus statistical inference.** Google's glossary notes that inference has a somewhat different meaning in statistics.

## Worked examples in this catalogue

### [local-model-sizing](https://skillalmanac.com/skills/skill-almanac/local-model-sizing)

```
Give the skill a model and your GPU, Mac or PC specification.
```

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: The skill works out whether an open-weight language model will run on a given GPU, Mac or PC.

Why it exercises the concept: It is a check on whether a model can run on a particular machine.

## Related terms

- [Token](https://skillalmanac.com/glossary/token.md)
- [Large language model (LLM)](https://skillalmanac.com/glossary/large-language-model.md)
- [Context window](https://skillalmanac.com/glossary/context-window.md)
- [AI model](https://skillalmanac.com/glossary/ai-model.md)
- [Fine-tuning](https://skillalmanac.com/glossary/fine-tuning.md)
- [Speculative decoding](https://skillalmanac.com/glossary/speculative-decoding.md)
- [Time to first token (TTFT)](https://skillalmanac.com/glossary/time-to-first-token.md)

## Sources

- [What is AI inference?](https://www.ibm.com/think/topics/ai-inference), IBM (accessed 2026-11-24)
- [Machine Learning Glossary: inference](https://developers.google.com/machine-learning/glossary#inference), Google (accessed 2026-11-24)
- [Pricing](https://platform.claude.com/docs/en/about-claude/pricing), Anthropic (Claude Docs) (accessed 2026-11-24)
- [Glossary](https://platform.claude.com/docs/en/about-claude/glossary), Anthropic (Claude Docs) (accessed 2026-11-24)

Definitions are written by Skill Almanac from the sources above and checked against them on 2026-11-24. [Glossary index](https://skillalmanac.com/glossary.md).
