First, the key terms.
- Weight
- A parameter that changes how much an input affects an output.
- Loss
- A numerical measure of error under a chosen objective.
- Learning rate
- A setting controlling the size of parameter updates.
The idea, explained
During training, an optimizer changes parameters to reduce a loss function. Gradient descent uses the slope of that function to choose an update direction. The learning rate controls the step size. A model with low training loss can still perform poorly on unseen data, so separate evaluation data matters.
Make a prediction
Use a toy model that predicts delivery time from distance: predicted minutes = weight × kilometres. With weight 2 and distance 3, it predicts 6 minutes. The weight is a parameter; the distance is an input. The model is intentionally simple so we can inspect every part.
Measure the error
If the observed delivery took 9 minutes, the prediction missed by 3. Squared error is (9 − 6)² = 9. The loss turns a mismatch into a quantity that an optimizer can use. A different loss would emphasize errors differently.
Update, then test separately
Training adjusts the weight in a direction intended to reduce loss. A weight of 3 gives 9 minutes for this example, but fitting one example is not enough. Test on other distances and traffic conditions. Inference then uses the selected weights to predict a new delivery without an automatic weight update.
Follow a worked example.
A model predicts 8 when a training example’s target is 10. With squared error, that example contributes (10 − 8)² = 4 to the loss. After training, using the model to predict the next example is inference; it does not automatically mean another parameter update.
Walk it through, one step at a time
- Start with weight 2, distance 4 and actual time 12. The prediction is 8 and squared error is 16.
- Trying weight 2.5 produces 10 and squared error 4 on this example. This illustrates improvement, not a universal best update rule.
- Now use the model on a new distance of 5. With weight 2.5, inference predicts 12.5 minutes. A later true outcome is needed to measure that prediction’s error.
Where people get stuck
More training steps or a lower training loss do not by themselves prove better real-world performance.
Now try it yourself.
1. Check the core idea
Is changing the wording of a prompt the same as retraining model weights?
Reveal the answer & reasoning
No. A prompt changes the input at inference time. Training changes parameters through an optimization process.
2. Apply what you learned
A model gives a better answer after you add detail to a prompt. Does this prove that training occurred?
Reveal the answer & reasoning
No. A more informative input can change an inference result while parameters remain unchanged. Training requires a process that updates parameters; conversation context and permanent model learning are different things.