Diagnostic TeardownAI

Could You Have Known That at Prediction Time?

Author
Alex Florian
Published
Updated
Reading time
4 min

Why a model can score well by learning from information that arrives too late.

A support team wants an AI system to help decide which requests to handle first. To prepare it, the team uses cases resolved in the past: the customer's description, the diagnosis, the resolution and any later adjustments. The test results look excellent. Looking at those complete records, you can see why.

But the new request waiting in the queue doesn't contain its own ending. The customer has described a problem; nobody has investigated it yet. The system is being asked to make an early decision, while its test may be letting it consult information discovered days later.

That is the first thing I would investigate before paying for another round of model tuning. A model is the part of the system that learns patterns from examples and uses them to make predictions. Better learning won't make tomorrow's diagnosis available this morning.

The spreadsheet has flattened the timeline

A completed support record tells a coherent story. Its fields sit beside one another, so a description entered at intake can look no different from a resolution code entered when the case closes. Exporting the data makes the records convenient to analyze, but it doesn't preserve that difference in availability for you.

In this illustrative support case, the timeline is simple:

InformationWhen the request arrivesAfter the case closes
Customer's original descriptionAvailableStill available
Confirmed resolution codeNot yet knownAdded to the record
Result of a later interventionNot yet knownMay now be recorded

If the model receives the resolution code while predicting the initial priority, it has an unfair clue. This is data leakage: information enters learning or evaluation in a way that makes the result misleading for the intended use. Here, leakage doesn't mean that somebody stole customer data. It means the test has given the model information its real task won't supply. [1]

The problem can be less obvious than a field called Resolution. A later manual review, an adjustment or another workflow's output can reveal how the case developed. What matters is when that information became available to this prediction, not whether the column name sounds harmless.

The outcome still has a legitimate job

Knowing how old cases ended is often essential. Their outcomes can help teach the model and let the team evaluate its predictions. The mistake is using that outcome as though it were already an input when the original decision had to be made.

Think of the two roles separately. One set of information lets the model make its recommendation; another lets you judge that recommendation afterward. Removing all outcome information would break the learning exercise rather than repair it.

Reconstruct the decision, not just the record

For one completed request, put the intended prediction at a specific moment: immediately after submission, for example. Then reconstruct what the system could actually have received at that point. The person maintaining the support workflow can help establish when fields are entered; the data team can show when those values become available to the model.

That second question matters. Information can exist somewhere in the organization without reaching the prediction service in time. A value entered at 09:00 but supplied through an overnight feed is not necessarily available to a model answering at 09:01. This is an illustrative timing example, not a claim about a particular system.

A timestamp on the final export cannot answer all of this. The team needs the history of how the important inputs were produced and delivered. Feature-management tools can help organize those inputs, but the prediction's actual timing still determines which version belongs in the test. [2]

When the reconstruction exposes a later clue, I would remove that clue from the prediction inputs and repeat the evaluation before changing the model. A lower score would be useful information: it would describe a harder, more honest version of the job.

What this check proves—and what it leaves open

Getting the timeline right doesn't establish that the entire evaluation is sound. Related cases on both sides of a training/test split can make a test less independent than it appears. A service channel missing from the history can remain poorly represented, and differences in input preparation can change what the deployed model receives. Those are separate checks, not reasons to dilute this one. [1]

The practical question here is narrower: could you have assembled these particular inputs when the recommendation was needed? Once the answer is yes, improvements to the model have a meaningful task to improve. Until then, an impressive result may mostly show how easy it is to prioritize a request after you already know what happened.