Skip to content
// ai glossary

What is inference in AI? Simple guide

The moment a trained model is used to produce an answer. Each chat reply is an inference.

Last reviewed

In plain English

Inference is the moment a trained model is actually used to produce an answer. Every time you send a message to a chatbot and get a reply, that is one inference. Training is when the model learns. Inference is when it works.

Training and inference

TrainingInference
What happensThe model learns from dataThe model produces an answer
How oftenOnce, or occasionally for updatesEvery time someone uses it
Who does itThe company building the modelThe company running it, or you through an API
What it needsHuge amounts of data and computing powerMuch less per request, but it adds up

A simple example

A model was trained months ago on a large body of text. Today you ask it for three subject lines for an email. The model reads your prompt and generates words one at a time until the answer is complete. That whole process is inference, and it took a moment, not months.

Why it matters

  • Cost. When you pay for an AI API, you are mostly paying for inference, measured in tokens. Our guide to estimating AI API costs shows how to turn it into a budget.
  • Speed. Larger models and longer outputs generally take longer to produce.
  • Where it runs. Inference can happen in a provider's data centre or, for smaller models, on your own computer or phone.

Common mix-ups

  • Inference is not learning. Chatting with a model does not change it. It only uses what it already learned and what is in the conversation.
  • The same prompt can give different answers, because the output includes some randomness. See temperature.
  • ModelThe trained AI 'brain' that produces outputs. Companies release different models with different strengths and prices.
  • APIA way for one program to talk to another. Developers use AI APIs to add AI features to their own apps.
  • Training dataThe examples a model learned from. Its knowledge and biases come from this data.

Keep reading