Algorithms, Models, Training and Inference
Every AI system follows the same basic lifecycle: an algorithm is trained on data to produce a model, and the model is then used to make predictions. This lesson explains these terms in business language and shows how they affect cost, timelines and risk.
Learning outcomes
After completing this lesson, you will be able to:
- Explain algorithms, training, models, inference and predictions in business terms.
- Explain why a prediction creates value only when a business decision acts on it.
- Describe the options for obtaining a model: train, adapt or use a pre-trained model.
- Describe why training is an investment and inference is a running cost.
- Distinguish real-time inference from batch inference.
- Explain false positives, false negatives, thresholds, precision and recall in business terms.
- Describe the cycle by which models are improved after deployment.
The vocabulary of the AI lifecycle
The following terms appear in almost every conversation with technical teams and vendors. Business leaders do not need to build models, but they must understand what each term means for their decisions.
- Algorithm
- The learning method, such as a decision tree, gradient boosting or a neural network. It defines how patterns are learned, not what they are.
- Training
- Running the algorithm over historical data so that it learns patterns. Training needs data, compute time and expertise.
- Parameters
- The internal values that training adjusts until the model's outputs match the examples well. Large foundation models have billions of them.
- Model
- The artefact produced by training: a reusable set of learned parameters that captures the patterns in the data.
- Features
- The input attributes the model uses, such as customer tenure, number of complaints or average order value.
- Inference
- Using a trained model on new data to produce an output. It happens every time the model is used.
- Prediction
- The output of inference, such as a probability, a category, a forecast or generated text.
- Confidence score
- A value returned with many predictions that indicates how certain the model is, used to route uncertain cases to people.
The AI lifecycle vocabulary
From data to decision: one example end to end
The terms are easiest to understand when they are followed through a single use case. A subscription business wants to reduce customer churn. The following steps show how the lifecycle unfolds, and the final step is the one most often forgotten.
-
Assemble historical data
Three years of customer records, with features such as tenure, usage, support contacts and price changes, and the known outcome: whether each customer left.
-
Train
The data science team applies an algorithm such as gradient boosting. Training adjusts the model's parameters until it predicts past churn well.
-
Evaluate
The model is tested on customers it did not see during training to confirm that it works on new cases.
-
Run inference
Each month, the model scores every current customer. Each score is a prediction, such as a 0.82 probability of leaving within 90 days.
-
Act on the prediction
The retention team contacts the highest-risk customers with an offer. Without this step, the prediction creates no value.
A prediction is an input to a decision, not an outcome in itself. Business cases should therefore describe who will act on each prediction, what they will do differently and how the result will be measured. A highly accurate model that nobody acts on delivers nothing.
Where models come from
Not every organisation trains its own models. There are three broad ways to obtain one, and they differ greatly in cost, time and the expertise required. An organisation can train a custom model on its own data, which gives the most control and suits problems specific to the business, such as predicting churn from its own customer records. It can adapt a pre-trained model, giving a model that already has general capabilities additional training or reference information for its domain. Or it can use a pre-trained model as it is, through a managed service, and pay only for inference.
For generative AI, the third option is the normal starting point, because training a foundation model requires investment that only a few organisations can justify. Adaptation techniques such as retrieval augmented generation (RAG) and fine-tuning are covered in the module on adapting foundation models, and the sourcing decision itself in the module on build, buy or partner decisions. The following table summarises the three options.
| Option | Upfront effort | Data needed | Typical example |
|---|---|---|---|
| Train a custom model | High: data preparation, specialist skills, compute | Substantial labelled organisational data | Churn or fraud model built with Amazon SageMaker AI |
| Adapt a pre-trained model | Moderate | Domain documents or a smaller set of examples | A foundation model connected to company policies with RAG |
| Use a pre-trained model as it is | Low: pay per use | None for training; only the prompt and its context | Summarising meeting notes with a model in Amazon Bedrock |
Why the distinction matters for the business
Training is an investment; inference is a running cost. Training a custom model requires assembling data, specialist time and compute, and it is repeated whenever the model is retrained. In most projects, preparing the data takes more effort than running the training itself. Inference cost grows with usage: a model that scores every online transaction runs millions of times a day. For generative AI, organisations usually skip training altogether by using a pre-trained foundation model, and they pay for inference per request or per token.
Predictions are probabilistic. A model returns its best estimate, not a certainty. A churn model with 90% accuracy is wrong one time in ten, so the business process must decide what happens with errors: who reviews borderline cases, what a wrong prediction costs and how customers can challenge decisions. The next section explains how to reason about these errors.
Inference can be real time or batch. A fraud check during card payment needs a response in milliseconds (real-time inference), so the model must be available continuously and connected to the payment system. Scoring every customer for a monthly marketing campaign can run overnight (batch inference), which is usually cheaper because resources are used only while the job runs. The following comparison summarises the choice.
Reading predictions: errors, thresholds and confidence
For a model that answers a yes-or-no question, such as "is this claim fraudulent?", every prediction falls into one of four outcomes. Two are correct and two are errors, and the two kinds of error usually have very different business costs. The following table describes them for a fraud model.
| Outcome | Meaning | Business consequence in a fraud example |
|---|---|---|
| True positive | Flagged, and it was fraud | Fraud stopped |
| False positive | Flagged, but it was legitimate | Investigator time wasted; a genuine customer delayed or annoyed |
| False negative | Not flagged, but it was fraud | Fraud loss; the most expensive error in this case |
| True negative | Not flagged, and it was legitimate | Claim paid without delay |
Most models produce a score, and people choose the threshold above which a case is flagged. The threshold is a business decision, not a technical one. A low threshold flags more cases, catching more fraud but creating more false positives for investigators to review. A high threshold reduces wasted reviews but lets more fraud through. The right setting depends on the relative cost of each error and on how much review capacity exists.
Two measures describe this trade-off in plain terms. Precision answers "of the cases the model flagged, how many were really fraud?" and reflects wasted effort. Recall answers "of all the real fraud, how much did the model catch?" and reflects missed cases. Raising the threshold usually increases precision and reduces recall. Overall accuracy, the share of all predictions that were correct, can be misleading when the event of interest is rare, as the second worked example shows.
Accuracy alone can mislead
A headline accuracy figure says little on its own. When a vendor quotes accuracy, ask how common the event is, what the false positive and false negative rates are, and what each error costs the business.
The following diagram shows where the four outcomes come from and how moving the threshold changes them.

Name the outcome
How models improve over time
A model does not improve by itself after deployment. Its performance is fixed at training time and tends to decline as conditions change. Improvement comes from a deliberate cycle, which the following steps summarise.
-
Monitor
Compare predictions with actual outcomes and track business KPIs.
-
Collect new data
Gather recent examples, including the outcomes of past predictions and user feedback.
-
Retrain or update
Train a new version on recent data, or for generative AI update prompts, knowledge sources or the model version.
-
Evaluate and approve
Test the new version against the current one before replacing it.
-
Deploy and repeat
Release the better version and continue monitoring.
Each trained model is a distinct version. Keeping previous versions makes it possible to compare them and to return to a known good version if a new one performs worse. The causes of declining performance, and what to monitor, are covered in the lesson on model drift and ongoing monitoring.
The improvement cycle
Reading a vendor proposal
A vendor proposes a demand forecasting solution priced as a one-off fee for "building the model" plus a monthly fee "per forecast generated". The finance director asks what each fee pays for and what might be missing.
The one-off fee pays for training: preparing historical sales data and running the algorithm to produce the model. The monthly fee pays for inference: each time the model generates a forecast. What is missing is retraining. Demand patterns change with new products, promotions and economic conditions, so the model will need periodic retraining on recent data, plus monitoring to detect when accuracy falls. A complete business case asks the vendor how often retraining is included and how accuracy will be reported.
Is 98.6% accuracy good?
An insurer tests a fraud model on 100,000 past claims, of which 1,000 (1%) were fraudulent. The model flags 2,000 claims, and 800 of those are genuinely fraudulent. The vendor reports 98.6% accuracy. How should the claims director interpret the result?
The four outcomes are 800 true positives, 1,200 false positives, 200 false negatives and 97,800 true negatives. Accuracy is (800 + 97,800) / 100,000 = 98.6%. However, a model that flagged nothing at all would score 99% accuracy, because 99% of claims are legitimate, while catching no fraud. Accuracy is therefore the wrong headline measure. The figures that matter are shown below.
80%
Recall: share of all fraud caught
40%
Precision: share of flags that were fraud
1,200
Legitimate claims sent for investigation
99%
Accuracy of a model that flags nothing
The director should weigh the value of catching 800 fraudulent claims against the cost of investigating 1,200 legitimate ones and the customer impact of delaying them, and should ask how these numbers change at different thresholds. If investigator capacity is limited, a higher threshold might flag fewer claims with higher precision, at the cost of missing more fraud.
A product scores every website visitor in real time. Which part of its cost grows with traffic: training or inference?
Show answer
Inference. Each visitor triggers a prediction, so inference cost scales with usage. Training cost recurs only when the model is retrained.
Exam Tips
Remember for the exam
- Training produces a model; inference uses it to make predictions on new data.
- Training is a periodic investment; inference cost scales with usage.
- A prediction creates value only when someone acts on it; business cases must describe that action.
- Real-time inference answers while the process waits; batch inference is scheduled and usually cheaper.
- False positives waste effort; false negatives miss cases. The threshold that balances them is a business decision.
- For rare events, high accuracy can hide a useless model; ask for precision and recall.
- Models do not improve automatically; improvement needs monitoring, new data and retraining.