Models, Data, Training, and Use
Separate the work of building and testing a model from using it to produce an output.
Two parts of the story
People often mix up data, model, training, and inference.
We can make the story clearer by splitting it into two parts:
- Building the model.
- Using the model.
Building the model
A team first decides what problem it wants to solve. It also decides how it will test success.
The work may include these steps:
- Collect and prepare useful data or examples.
- Set the learning goal.
- Choose a type of model.
- Train the model.
- Test the model on suitable cases.
- Decide if and how it should be used.
Teams often repeat these steps. A test may show that the data, goal, labels, or model must change.
Data
Data is recorded information. It may be text, images, sounds, numbers, labels, or measurements.
Training data helps shape the patterns that a model learns.
Useful questions include:
- Does the data match the real task?
- Are important people or cases missing?
- Are the labels correct?
- Is the data good enough?
- Is the team allowed to use it?
- Does the test include hard cases?
More data is not always better data.
Training
Training changes values inside a model so that the model becomes useful for a task.
These values are called parameters. They affect how the model turns an input into an output.
A trained model is not a normal database that searches every training item for an answer. It has learned patterns from the data.
But do not go too far in the other direction. Some models can repeat parts of their training data. So we should not say that this can never happen.
Testing the model
Evaluation means testing a model or system against clear rules and examples.
If a model passes one test, we can say:
This version met these rules on these test cases.
We cannot say:
It will always be correct.
The real world may contain new cases. The test may also miss an important type of error.
Using the model
Inference means using a trained model on a new input.
For example:
- A spam model scores a new email.
- An image model studies a new photo.
- A language model creates text from a prompt.
A normal prompt usually uses the model. It does not train the base model again.
Some products may save chats, retrieve old information, or use customer data in a later training process. These choices differ from product to product. Do not assume them without proof.
A model is only one part
A full product may include:
- A model.
- Rules.
- Search and retrieval.
- Calculators or other tools.
- Saved history.
- User access and permissions.
- Approval steps.
- Safety checks.
- Logs.
- People who review or decide.
Two products can use the same model and still work in different ways because the other parts are different.
Worked example: checking fruit
A fruit-packing centre wants to find damaged fruit.
Build stage
The team collects approved photos. The photos show the real fruit, cameras, lighting, and damage found at the centre.
People label the photos using a clear quality rule. A model is trained. It is then tested on separate photos, including hard cases.
Use stage
A camera takes a new photo. The model gives a damage score. Rules turn that score into continue, review, or stop. A person checks the fruit sent for review.
Each part has a different job:
- The model gives the score.
- Rules use the score.
- The app shows the result.
- A person makes the review decision.
Calling all of this the model hides important parts.
Put the steps in order
Here are five steps from a travel-time service:
- The app shows an estimate.
- Past journey data is prepared.
- The model is trained.
- The model is tested on other journeys.
- The model estimates 42 minutes for a new journey.
The best order is:
- Prepare data.
- Train the model.
- Test the model.
- Use the model on the new journey.
- Show the result.
Quick check
What happens during inference?
A. Every training item is labelled.
B. A trained model uses a new input to make an output.
C. The product name is chosen.
D. The output is proved correct.
Check the answer
Answer: B. Inference creates a result. It does not prove that the result is correct.
Remember
- Training builds or changes a model.
- Inference uses the trained model.
- Testing gives limited proof, not a promise of perfect results.
- A prompt usually uses a model; it does not train the base model again.
- The full product includes more than the model.
Next, we will use a simple method to classify systems from facts.
