By this point in the Learn AI Foundations path, we have covered:
- what artificial intelligence is;
- how AI systems work at a high level;
- machine learning;
- generative AI;
- large language models; and
- the difference between an AI model and an AI application.
Now we need to understand one of the most important distinctions in AI:
training vs inference.
These two terms describe very different stages in the life of an AI model.
A simple way to remember them is:
TRAINING = BUILD OR ADAPT THE MODEL
INFERENCE = USE THE MODEL
This distinction matters because it affects:
- how AI systems are built;
- how much computing they require;
- how much they cost to operate;
- how data is handled;
- how privacy should be considered; and
- how AI applications behave in production.
What is AI training?
Training is the process used to teach or adapt an AI model by adjusting its internal parameters based on data and a training objective.
At a very simplified level, training looks like this:
DATA → MODEL MAKES PREDICTION → ERROR IS MEASURED → PARAMETERS ARE ADJUSTED → REPEAT
This process can happen many times across a large amount of data.
The goal is to produce a model that performs well on the type of task it is being trained for.
What happens during training?
The exact process depends on the model, but the general idea is similar.
Step 1 — Provide training data
The model is exposed to examples.
For a language model, this may include large amounts of text and other data.
For an image model, the training data may include images and related information.
Step 2 — The model produces an output
The model attempts to predict or generate something based on the input.
Step 3 — Measure error
The training process calculates how far the output is from the desired objective.
Step 4 — Adjust parameters
The model’s internal parameters are modified to improve future performance.
Step 5 — Repeat
This happens repeatedly over many examples.
Over time, the model learns increasingly useful statistical relationships.
What are model parameters?
Parameters are numerical values inside the model that influence how it processes information.
During training, these parameters are adjusted.
You do not need to understand the underlying mathematics at this stage.
What matters is the concept:
Training changes the model.
The result of the training process is a model whose parameters have been adjusted to perform certain tasks.
What is inference?
Inference is what happens when a trained model is used on new input.
For example, when you type a prompt into an AI assistant, the model processes that input and generates a response.
That is inference.
A simplified flow is:
PROMPT → TRAINED MODEL → RESPONSE
The model is being used.
It is not necessarily being retrained from scratch because of your prompt.
A simple analogy
Imagine a person studying for an exam.
Training:
The student spends months studying, practising questions and improving their knowledge.
Inference:
The student sits down during the exam and uses what they learned to answer a new question.
The analogy is not technically exact, but it is useful.
Training is preparation.
Inference is application.
Does using ChatGPT train the model?
This is a common question.
The correct answer depends on the specific product, account configuration, provider policies and data controls.
But from a technical perspective, when you submit a prompt and receive an answer, the immediate action you are performing is inference.
Your request is being processed by a trained model.
Whether the service provider may later use interaction data for separate improvement or training processes is a different question and depends on the product’s terms, settings and data-handling practices.
This is why it is important not to confuse:
“The model processed my prompt.”
with:
“My prompt immediately retrained the model.”
Those are not the same thing.
Why does this matter for privacy?
Businesses often ask:
“If we send company information to an AI system, does the AI learn it forever?”
The answer cannot be reduced to a simple yes or no.
You need to separate several concepts:
- the model processing information during inference;
- conversation or application history;
- provider retention policies;
- saved memory features;
- logging;
- future training or product-improvement use; and
- organisation-specific contractual controls.
These are different mechanisms.
This is why organisations should understand the service they are using rather than assuming all AI systems handle data in the same way.
Training is expensive
Training large AI models can require substantial computing resources.
Large-scale training may involve:
- specialised processors;
- large clusters of computing infrastructure;
- significant energy consumption;
- large volumes of data;
- engineering teams;
- model evaluation; and
- long training periods.
This is one reason very large foundation models are generally trained by organisations with substantial resources.
Inference also costs money
Once a model has been trained, using it still requires computing resources.
Every inference request consumes processing capacity.
If an application receives millions of requests, the cost can become significant.
This creates an important business consideration:
AI operating cost is not only about building the model.
It is also about how often the model is used and which model is used for each task.
Why smaller models can matter
Suppose your application needs to classify 500,000 support tickets each month.
You could use a very large reasoning model for every request.
But if a smaller model performs the classification accurately enough, it may be:
- faster;
- cheaper;
- more scalable; and
- more efficient.
This is why production AI systems often choose different models for different inference workloads.
Training vs fine-tuning
Not all training starts from zero.
Fine-tuning means taking an existing trained model and adapting it further using additional training examples.
For example:
Foundation model
↓
Additional specialised training
↓
Fine-tuned model
Fine-tuning can help improve performance for specific tasks or behaviours.
Fine-tuning vs prompting
These are also different.
Prompting:
You give instructions during inference.
Fine-tuning:
You alter model behaviour through an additional training process.
For example:
Prompt:
“Always return this analysis using the following five headings.”
That changes the current request.
Fine-tuning:
The model is trained using many examples of the desired format or behaviour.
That modifies the model more fundamentally.
Fine-tuning vs RAG
Another important distinction is between fine-tuning and retrieval-augmented generation.
Fine-tuning adapts model behaviour through additional training.
RAG retrieves relevant information during inference and supplies it to the model as context.
Imagine your company policy changes every month.
You probably do not want to retrain the model every time the document changes.
A retrieval system may be more appropriate:
QUESTION → FIND LATEST POLICY → GIVE POLICY TO MODEL → GENERATE ANSWER
When should information be retrieved instead of trained into the model?
Retrieval is often useful when information is:
- frequently updated;
- company-specific;
- permission-sensitive;
- required to be traceable to a source; or
- too large or dynamic to embed permanently into a custom training process.
Examples include:
- company policies;
- technical documentation;
- product pricing;
- customer records;
- financial results;
- security findings; and
- current regulations.
Training data vs inference data
Another useful distinction is between:
training data
and
inference input.
Training data is used during the model-training process.
Inference input is information supplied when the trained model is used.
For example:
Training:
A model learns broad patterns from a large training process.
Inference:
You provide today’s sales report and ask the model to summarise it.
The sales report is being used as input for that request.
Why context does not equal training
Suppose you upload a 50-page company document to an AI assistant.
The application makes the document available to the model as context.
The model can then answer questions from it during inference.
That does not automatically mean:
“The model has now been permanently retrained on my document.”
The application may simply be including relevant portions of the document in the model’s current context.
This distinction is fundamental to understanding modern AI systems.
A practical example: internal company assistant
Imagine a company wants employees to ask questions about internal policies.
The company has:
- 200 policies;
- procedure documents;
- HR guides;
- IT documentation; and
- security standards.
There are two very different approaches.
Approach A — retrain constantly
Every time a document changes, retrain the model.
This can become expensive and difficult to maintain.
Approach B — retrieval during inference
The application searches the latest documents when a user asks a question.
The workflow becomes:
EMPLOYEE QUESTION
↓
SEARCH AUTHORISED DOCUMENTS
↓
RETRIEVE RELEVANT SECTIONS
↓
LLM INFERENCE
↓
ANSWER + SOURCES
This approach keeps rapidly changing knowledge outside the model itself.
Pre-training
You may encounter the term pre-training.
Pre-training is the large-scale initial training stage that gives a foundation model broad capabilities.
For a language model, this is where the model learns extensive statistical patterns across language and other supported information.
After pre-training, further techniques may be used to adapt or align the model.
Post-training
Modern AI models can also undergo additional stages after initial pre-training.
These are often grouped broadly under post-training.
Different providers use different methods, but the goals can include improving:
- instruction following;
- reasoning behaviour;
- safety;
- helpfulness;
- tool use;
- formatting; and
- other desired behaviours.
The important beginner concept is:
Model training can happen in several stages.
Human feedback in training
Human feedback can also be used during certain model-training or post-training processes.
People may evaluate model outputs or provide examples that help developers improve how a model behaves.
The techniques involved can be complex, but the principle is straightforward:
Human judgement can become part of the process used to shape model behaviour.
Inference happens every time the model is used
Suppose your business deploys an AI support assistant.
During one day, customers submit 10,000 requests.
Each request may cause one or more inference operations.
For example:
Customer message
↓
Inference 1: classify request
↓
Retrieve account information
↓
Inference 2: generate response
↓
Inference 3: quality check
One customer interaction could therefore involve several model calls.
Inference latency
Latency refers to the time required to produce a response.
If an AI application takes 30 seconds to perform a task, that may be acceptable for a complex research report.
It may be unacceptable for a real-time customer-service assistant.
Application designers therefore balance:
- model capability;
- speed;
- cost;
- accuracy; and
- user experience.
Batch inference
Not every AI task must happen immediately.
Some workloads can be processed in batches.
For example, a business may want to analyse 50,000 customer survey responses overnight.
Instead of processing each response interactively, the system can process them as a batch workload.
This can make sense for:
- large document collections;
- historical analysis;
- offline classification;
- report generation; and
- data enrichment.
Real-time inference
Other workloads need immediate responses.
Examples include:
- chatbots;
- voice assistants;
- interactive coding tools;
- customer support;
- live translation; and
- AI copilots.
These systems require lower latency.
Where does inference run?
Inference can run in different places.
For example:
- a cloud AI service;
- a company’s own servers;
- a data centre;
- an edge device;
- a smartphone; or
- specialised hardware.
The correct choice depends on the model and use case.
Cloud inference
Cloud-based inference is common because AI providers can operate large computing infrastructure and expose models through APIs.
Advantages can include:
- easy access to powerful models;
- rapid deployment;
- scaling;
- managed infrastructure; and
- reduced need to operate specialised hardware.
Businesses still need to evaluate:
- data handling;
- security;
- cost;
- latency;
- availability; and
- regulatory requirements.
Local inference
Some organisations run models on infrastructure they control.
This is sometimes called local or self-hosted inference.
Potential reasons include:
- privacy;
- data control;
- network isolation;
- latency;
- offline operation; and
- specialised requirements.
However, the organisation must then manage more of the infrastructure itself.
Edge inference
Inference can also happen directly on devices.
Examples may include:
- smartphones;
- cameras;
- vehicles;
- industrial devices;
- IoT systems; and
- other edge hardware.
Running models close to the source of data can reduce latency and may improve privacy in some architectures.
Why hardware matters
AI workloads involve large amounts of mathematical computation.
Specialised hardware can accelerate both training and inference.
This is why AI discussions frequently mention:
- GPUs;
- AI accelerators;
- specialised chips; and
- high-performance computing infrastructure.
The hardware requirements vary enormously depending on the model size and application.
Training and inference have different priorities
Training systems may prioritise:
- massive computational capacity;
- high-throughput data processing;
- long-running workloads; and
- distributed computing.
Inference systems may prioritise:
- response speed;
- cost per request;
- availability;
- scalability; and
- efficient memory use.
Why model compression matters
Large models can be expensive to run.
Various techniques can be used to make models smaller or more efficient.
You may encounter terms such as:
- quantisation;
- distillation;
- pruning; and
- model optimisation.
You do not need to understand these techniques in detail yet.
The important idea is that developers can trade some model size or precision for lower cost, lower memory use or faster inference.
What is quantisation?
At a high level, quantisation reduces the numerical precision used to represent parts of a model.
This can reduce memory requirements and improve inference efficiency.
It is particularly useful when running models on limited hardware.
What is model distillation?
Distillation broadly involves training a smaller model to reproduce useful behaviour from a larger model or teacher system.
The aim is often to retain much of the useful capability while reducing cost or size.
Why this matters for AI products
An AI product may not always use the largest possible model.
It could use:
- small models for simple classification;
- larger models for complex reasoning;
- specialised models for images;
- embedding models for retrieval; and
- different models depending on workload.
This allows applications to optimise inference cost.
A practical example: automated security checks
Imagine a security team manages 30 customer environments.
Every morning, engineers manually check:
- offline devices;
- unresolved threats;
- agent versions;
- configuration issues; and
- other indicators.
A system could collect this information automatically.
Then different inference tasks might occur:
Inference task 1
Summarise the raw findings.
Inference task 2
Group related issues.
Inference task 3
Explain business or operational impact.
Inference task 4
Generate a prioritised engineer task list.
The model is being used repeatedly.
It does not need to be retrained every morning.
The security data changes.
The model remains the trained capability used to analyse that data.
A practical example: financial research engine
Imagine building an AI-assisted investment research system.
The model does not need to be retrained whenever a company publishes new financial results.
A stronger architecture is:
NEW FINANCIAL REPORT
↓
EXTRACT VERIFIED DATA
↓
STORE STRUCTURED INFORMATION
↓
LLM INFERENCE
↓
ANALYSIS
↓
VALIDATION
↓
RESEARCH REPORT
The underlying model is being reused against new evidence.
Inference should use authoritative data where possible
If an AI system needs an exact customer balance, it should retrieve that value from the authoritative database.
If it needs current company revenue, it should retrieve verified financial information.
If it needs today’s weather, it should use current weather data.
The model can then interpret or explain that information during inference.
This leads to a useful architecture principle:
DO NOT TRAIN WHAT YOU CAN RETRIEVE RELIABLY.
This is not an absolute rule, but it is a strong starting point for many business applications.
Inference outputs still need controls
A trained model can still produce errors during inference.
This is why production applications may include:
- input validation;
- source grounding;
- structured output schemas;
- business rules;
- output validation;
- human review;
- logging;
- monitoring; and
- security controls.
Training a powerful model does not remove the need for good application design.
Model evaluation happens before and after deployment
A model should be tested before being used for important work.
But testing should not stop when the system goes live.
Production monitoring can help identify:
- quality changes;
- unexpected outputs;
- latency problems;
- cost increases;
- tool failures;
- security issues; and
- changing user behaviour.
Training may happen rarely; inference may happen millions of times
This is a useful way to think about scale.
A foundation model may undergo an enormous training process.
Once deployed, that model may then serve millions or billions of inference requests.
This means:
TRAINING COST = LARGE BUT OCCASIONAL
INFERENCE COST = SMALLER PER REQUEST BUT REPEATED CONSTANTLY
For a high-volume AI business, inference economics can become extremely important.
Why businesses should understand inference cost
Suppose one AI operation costs only a tiny amount.
That sounds insignificant.
Now multiply it by:
100,000 users × 20 requests per day × 365 days
The operating cost can become substantial.
Good AI products therefore optimise:
- prompt size;
- model selection;
- context size;
- caching;
- number of model calls;
- batching; and
- workflow architecture.
The model should not do work software can do better
Imagine a workflow where the AI model is asked to:
- calculate exact tax;
- validate a fixed ID format;
- check whether a date has expired;
- perform a database lookup; and
- write an explanation.
Only the final task may require a language model.
A better design is:
SOFTWARE → exact calculation
SOFTWARE → format validation
SOFTWARE → date check
DATABASE → authoritative lookup
LLM INFERENCE → clear explanation
This is cheaper and often more reliable.
A simple decision framework
When designing an AI system, ask:
Does this require learning?
If the problem requires building or adapting model behaviour, training or fine-tuning may be relevant.
Does this require current information?
Retrieve it during inference.
Does this require deterministic logic?
Use normal software.
Does this require language or interpretation?
Use model inference.
Does this require human accountability?
Add an approval step.
The full AI lifecycle
We can now build a more complete picture:
1. DEFINE THE PROBLEM
↓
2. PREPARE DATA
↓
3. TRAIN / ADAPT MODEL
↓
4. EVALUATE MODEL
↓
5. DEPLOY MODEL
↓
6. RUN INFERENCE
↓
7. VALIDATE OUTPUT
↓
8. MONITOR
↓
9. IMPROVE
This is much closer to how AI operates in the real world than simply thinking:
“I type something into ChatGPT and AI happens.”
Frequently asked questions
What is AI training?
AI training is the process of adjusting a model’s internal parameters using data and a training objective so that it becomes better at a particular task.
What is inference?
Inference is the process of using a trained AI model to produce an output from new input.
Is prompting training?
No. Prompting normally provides instructions and context during inference. It does not itself mean the model is being retrained.
Does every ChatGPT message train the model?
The immediate technical operation when generating a response is inference. Separate provider policies may determine whether interaction data is retained or used later for improvement or training, so users and organisations should check the applicable service settings and terms.
What is fine-tuning?
Fine-tuning is an additional training process used to adapt an existing model for particular behaviour or tasks.
What is the difference between fine-tuning and RAG?
Fine-tuning changes model behaviour through additional training. RAG retrieves relevant information and supplies it to the model during inference.
Is training more expensive than inference?
Large-scale model training can be extremely expensive. Individual inference requests are generally far less expensive, but high-volume inference can still create significant operating cost.
Can inference happen on my own computer?
Yes, if the model is suitable for the available hardware and licence. Models can run in the cloud, on private infrastructure or on local devices.
What is inference latency?
Inference latency is the time required for the model or application to return a result after receiving a request.
Do companies need to retrain models whenever their data changes?
No. Frequently changing information can often be retrieved from databases, documents or APIs and provided to the model during inference.
Key takeaways
- Training builds or adapts the AI model.
- Inference uses the trained model.
- Sending a prompt is normally an inference operation, not immediate retraining.
- Training data and inference input are different concepts.
- Fine-tuning is additional model training.
- RAG provides external information during inference rather than training it into the model.
- Training large models can require enormous computing resources.
- Inference cost matters because production applications may make millions of model calls.
- Models can run in the cloud, locally or on edge devices.
- Normal software should handle deterministic work where possible.
- Production AI systems should validate and monitor inference outputs.
Continue the Learn AI journey
You now understand the difference between building a model and using a model.
The next step is to understand what actually happens to the information you send during inference.
Why can an AI model work with a short conversation but struggle with an enormous document?
What exactly is a token?
What does “context window” mean?
And why does the amount of context affect quality, speed and cost?
Next: AI Tokens and Context Windows Explained — How Models Read Your Prompts →