Training in AI is the process of changing a model's adjustable internal values so its outputs better satisfy a chosen objective. The model improves through repeated feedback and updates, rather than by a programmer writing a rule for every case.

A useful mental model

Training is controlled error correction.

Imagine a model that has adjustable dials inside it. An example goes in, and the model produces an output. A scoring rule says how good or bad that output was. Training works out which way to turn the dials, turns them a small amount, and tries again.

Those “dials” are numerical model parameters. The scoring rule is called an objective. When lower is better, its score is often called loss.

This picture is more accurate than saying the model “absorbs” its data. The data supplies examples. The objective supplies a direction for improvement. The training algorithm changes the model.

training examples
       |
       v
model makes outputs
       |
       v
objective measures loss or reward
       |
       v
calculate each parameter's contribution
       |
       v
update parameters
       |
       +---------- repeat ----------+

held-out validation data checks whether the result transfers

How AI training works

The exact method depends on the model and objective, but neural-network training commonly follows this loop:

  1. Prepare examples and an objective. Training data might pair inputs with labels, hide part of an input for the model to predict, or include feedback about preferred outputs.
  2. Choose a starting model. Training can begin with newly initialized parameters or with a model that has already been trained.
  3. Run a batch through the model. A batch is a small group of examples processed together. This forward pass resembles inference: the current model turns inputs into outputs.
  4. Score the outputs. A loss function might measure distance from target answers. Another objective might assign higher reward to preferred behavior.
  5. Assign credit or blame. For a neural network, backpropagation calculates a gradient for each parameter. A gradient says how a small change to that parameter would be expected to change the loss.
  6. Update the parameters. An optimizer uses those gradients to choose the actual changes. The learning rate controls the size of a typical update.
  7. Repeat and check. Training continues over more batches. Separate validation data checks whether improvement extends beyond the examples producing the updates.

An epoch is one pass through the training dataset. Training may use part of an epoch or many epochs. An epoch is a unit of progress, not a guarantee that useful learning occurred.

The loop describes the narrow technical meaning of training. In practice, people also use training for the larger workflow around it: collecting and filtering data, selecting an objective, running experiments, evaluating checkpoints, and deciding when to stop.

The feedback does not always look the same

The phrase “compare the prediction with the correct answer” is a helpful starting point, but it is too narrow as a definition.

  • In supervised learning, examples include target labels, such as the category assigned to an image.
  • In self-supervised learning, the data provides its own targets. A language model can learn by predicting a hidden or next piece of text.
  • In reinforcement learning, outcomes receive rewards, and training raises the chance of actions that lead to higher reward.

These methods differ in where the training signal comes from. They share the same central idea: use feedback to alter the model's parameters toward an objective.

A one-step training example

Consider a model with one parameter, w. It predicts:

output = w × input

The model starts with w = 0.5. Its training example has an input of 2 and a target output of 4.

The first prediction is:

0.5 × 2 = 1

Use squared error as the loss:

(prediction - target)²
(1 - 4)² = 9

For this example, the gradient of the loss with respect to w is -12. The negative sign means increasing w should reduce the loss. With a learning rate of 0.1, gradient descent makes this update:

new w = old w - learning rate × gradient
new w = 0.5 - 0.1 × (-12)
new w = 1.7

Now the prediction is 1.7 × 2 = 3.4, and the squared error is 0.36. One update made this example fit better.

Real models can have many parameters, and training usually combines signals from a batch. The optimizer must find changes that work across varied examples. Improving one batch is not enough. The model must also perform well on held-out data.

Why training matters

Training determines what behavior is available when a model is later used.

The architecture sets the kinds of calculations the model can perform. Training selects particular parameter values within that architecture. Those values shape which patterns the model responds to and which outputs it tends to produce.

The objective matters because the model is optimized for the signal it receives, not for every quality a person might care about. A language model trained to predict text can become useful at many language tasks, but prediction loss does not directly guarantee truthfulness, safety, or obedience to instructions. Later training can target some of those behaviors with demonstrations or preference feedback.

The data matters for the same reason. A model can only receive training signals from the examples and feedback available to it. Gaps, errors, duplication, and bias in that material can affect the trained result.

Common misconceptions

Training stores a copy of every example

Training changes parameters. It does not normally create a searchable row-by-row database of the training set inside the model.

A model can still memorize some examples, especially when data is repeated or the model is trained too closely to it. But memorization and useful generalization are different outcomes. Evaluation on genuinely separate data helps distinguish them.

Lower training loss means the model is good

Lower loss means the model fits its training objective better on the measured data. It does not prove that the model works on new cases or that the objective captures the real goal.

If training loss falls while validation performance worsens, the model may be overfitting: becoming more specialized to its training examples at the expense of new ones.

More training always makes a model better

Additional updates can help, do little, destabilize training, or increase overfitting. The result depends on the data, objective, optimizer settings, model capacity, and stopping decision.

The model learns from you while you chat with it

During ordinary AI inference, the deployed model uses fixed parameters to answer an input. Information in the current conversation can influence its next output without changing those parameters.

A provider may later use collected interactions in a separate training process, depending on the product and its data policy. That is not the same as the model updating itself during the conversation.

Every model is trained from scratch

Training can start from an existing model. Pretraining builds broad capabilities from a large, general dataset. Fine-tuning continues training for a narrower task or domain. Post-training is a broader label for later stages intended to shape behavior, which can include fine-tuning and preference-based methods.

The boundaries between these labels are not fully standardized. The reliable test is whether the process updates the model's parameters. Supplying examples in a prompt can change an output without training the model.

How training fits into an AI system

Machine learning is the broader approach in which systems improve behavior from data or experience. Training is the process that produces or adapts a model within that approach.

The output of a training run is usually a saved checkpoint containing the learned weights and other state. Developers evaluate candidate checkpoints and select one for further training or deployment.

Deployment begins a different operating phase. In inference, inputs pass through the trained model to produce predictions, classifications, or generated content. A forward pass appears in both phases. Training adds feedback, gradient calculation, and parameter updates.

Where to go next

Read What Is Inference in AI? to see what changes when the parameter-update loop stops and a trained model is used. Then use Training vs. Inference for a direct comparison of the two lifecycle stages.