
An AI model scores well in testing. The team is confident, the model ships, and then it starts making mistakes it never made in the lab. A robot misses parts it should pick easily. A camera misreads a scene it should recognize. Nothing is broken, and the test results were real. This article explains why this happens so often, and what can be done about it.
Before a model is deployed, teams check how good it is. The usual method is simple: they collect a large set of examples, use most of them to train the model, and hold back a smaller part to test it. If the model does well on the examples it hasn't seen, it's ready.
The catch is in where those test examples come from. They're taken from the same collection as the training data: the same sites, the same cameras, the same lighting, the same kinds of objects, often from the same few weeks. So the test set looks a lot like what the model already learned from.
A test score answers one question: how well does the model work on data like its training data? It doesn't answer the question that matters after deployment: how well will it work where it's actually used?
Think of a student who studies with one teacher's practice questions and then sits an exam written by that same teacher. A high score is real, but it says little about how the student would do on a different teacher's exam. AI models are in the same position. Their test was written by the same world they trained in, and the real world writes a different exam.

None of these show up in a test set taken from the same collection as the training data. They only appear once the model is out in the world.
The gap between testing and the real world comes in two kinds, and it helps to tell them apart.
Domain shift is the gap that exists on day one: the place where the model is used is different from the place its data came from. A model trained in one factory and deployed in another faces domain shift the moment it's switched on.
Drift is the gap that grows over time in the same place: parts wear, seasons change, new products arrive. A model that worked on day one slowly gets less accurate.

Both lead to the same result, a model that makes more mistakes than its test score promised, and both have the same fix: the model has to learn from the conditions it's actually in.
A model running in a data center sees mostly digital data, and a new version can be rolled out in an afternoon. Machines in the field, such as robots, drones, satellites and industrial sensors, have it harder:
So the gap between testing and reality opens faster for these machines, and it's harder to close.
Teams use several methods to make models hold up better in the real world. Each one helps, and each has a limit:
All four make the model better at launch. None of them stops the gap from opening again after launch, at each new site and with every change.
The gap is about a model not knowing its own surroundings. The most direct fix is to let the model learn from those surroundings, where it works. With on-device training, the machine updates a small part of its own model from the data it sees, such as the final layers or a few calibration values, while keeping the general skills it learned in training. Updates run inside fixed safety limits and are checked before they're used.

This doesn't replace testing or cloud updates. Testing still proves the model is ready to launch, and cloud releases still bring big improvements. On-device training handles what testing can't predict: the specific site, the specific hardware and the changes that come after launch. Vellex builds a low-power chip for exactly this job. It sits beside a machine's main processor and handles the learning, in milliseconds and on milliwatts.
Why does my AI model perform worse in production than in testing? Because the test data usually comes from the same collection as the training data, while the real world has new places, rare cases, different hardware and conditions that change over time.
What is domain shift? The gap that exists on day one when a model is used somewhere different from where its training data came from.
What is the difference between domain shift and model drift? Domain shift is there from the start; drift grows over time in the same place as conditions change.
Can better testing fix this? It helps, but no test set can cover every site a machine will work in or every change that happens after launch.
How can a model adapt to the real world after deployment? By retraining it in the cloud with new data, or by letting the device update part of its own model through on-device training.
READ MORE