The invisible variable: why AI that predicts court rulings may fail to see private investigator evidence


Artificial intelligence has arrived in litigation.


There are tools capable of analysing thousands of rulings, detecting patterns, comparing precedents, and estimating the probability of particular outcomes.


The promise is appealing: litigating with statistics in hand.


But every prediction has a prior condition: a model can only properly learn what its data represents.


I have examined this question in a study of 1,936 Spanish court rulings handed down between 2020 and 2024, pending academic publication.


The main conclusion can be summarised as follows: detective evidence can be legally important and, at the same time, be poorly represented as a variable in the body of case law from which predictive systems learn.


First finding: 68.2% favourable assessments in classifiable cases

Among the rulings in the corpus where the judicial assessment is explicit enough to determine its direction, 68.2% contain a favourable assessment of the detective evidence for the party that submitted it.


This does not mean that hiring a detective gives you a 68.2% chance of winning a lawsuit.


It means that, when the text allows us to identify and expressly classify how that evidence was received by the court, the assessment is favourable in more than two-thirds of the corpus's classifiable cases.


It does not prove causation. But it does reveal that this evidence frequently appears as a useful element that is positively assessed whenever the court rules on it expressly.


Second finding: around 55% give no clear indication of how the evidence was assessed

In roughly 55% of the relevant set, there is no assessment explicit and consistent enough to be reliably labelled.


The evidence was part of the proceedings, but the judgment may refer to it in different ways: "detective's report," "private investigation," "witness testimony," "surveillance," "photographs in the case file," or it may simply fold it into an overall assessment.


For a lawyer who knows the file, these differences may be manageable. For building an automated corpus, they are a problem.


The same procedural reality ends up written ten different ways, or without any specific label at all.


The problem doesn't necessarily start in the algorithm

When we talk about algorithmic bias, we tend to look straight at the machine.


But there is an earlier stage: how was the data we use to train the system born in the first place?


A judgment is drafted to resolve a case and to give reasons for a decision, not to feed an AI database.


When we later use thousands of judgments as predictive raw material, an unexpected consequence appears: whatever is not expressed consistently becomes much harder to learn consistently.


How the data is generated shapes the intelligence that later comes from it.


The judgment does not reproduce everything that happened at trial

A case may contain documents, witnesses, expert reports, examinations, recordings, a detective's report, and photographs.


The judge forms their conviction from the whole of it.


But the judgment selects, synthesises, and gives reasons only for what is necessary. It is not a complete transcript of the trial.


There is therefore a difference between the evidentiary reality of the proceedings and its textual representation in the judgment.


For a system that only knows the latter, that difference is decisive.


Detective evidence is especially vulnerable to that loss

The report has a singular nature. There is a document, photographs or videos, and, when the facts are disputed, a statement from the professional who observed them.


A judge may also form their conviction based on the detective's precision, the coherence of their statement, the correspondence between the images and the testimony, and their answers under cross-examination.


Much of that does not necessarily make it into the final text.


And if it doesn't make it into the judgment, it doesn't reach the corpus cleanly either.


AI learns from the documentary shadow of the trial

When we train a model exclusively on rulings, we are not teaching it the complete proceedings.


We are teaching it the written representation that was left of them.


This does not affect only the detective. It can happen with a witness's credibility, the quality of an expert report, a contradiction detected in the courtroom, or any element perceived directly by the judge and not developed in the ruling.


A missing variable does not make the model stop predicting

When a relevant variable is missing, the algorithm doesn't necessarily stop.


It keeps calculating with whatever it does have: type of proceeding, court, subject matter, legislation cited, language, precedents, metadata, and other features.


It may even find predictive variables that do not match the legally causal variables a lawyer would consider important.


Predictive correlation and legal explanation are not the same thing.


The invisible detective

Suppose a tool offers a 42% probability of success in an employment lawsuit.


But our case contains something many precedents did not, or that the corpus represents poorly: three days of surveillance, a complete visual sequence, a detective who will appear in person, and objectively documented conduct.


What weight does the model give to that difference?


If the variable is not properly identified in its data, it may assign it little weight, or none at all.


Not necessarily because the AI is bad.


Because the data it learned from does not adequately describe what we now have in front of us.


Three practical consequences

First: be careful with the percentage when the case has an extraordinary piece of evidence. Statistical prediction works better when the matter resembles the universe the statistic comes from. An evidentiary strategy can precisely make our case stop resembling the average.


Second: the 68.2% is not a calculator either. It describes the direction of the judicial assessment within the corpus's classifiable subset, not an individual probability of success.


Third: evidentiary strategy still needs craft. A tool can analyse trends; deciding what fact still needs to be proven and what evidence can change the case is a different matter altogether.


The CGPJ itself calls for caution

In 2026 the General Council of the Judiciary (CGPJ) approved guidelines on the use of AI systems in judicial activity, built on principles of human oversight, bias prevention, information quality, and traceability.


The boundary is significant: AI may assist, but it may not replace the assessment of facts and evidence, nor the judicial decision itself.


This is not an anti-technology stance. It is the correct one.


Before AI, we need intelligence about the data

This is one of the ideas M Intelligence is built on.


Before asking "what can AI predict?" we should ask "what reality does our dataset actually represent?"


What variables it contains. Which are missing. Which are proxies. What ambiguities exist. What methodological decisions we have made.


Bias does not necessarily begin in the neural network. It can begin much earlier, when a procedural reality is not consistently represented in the text.


Conclusion: AI predicts what it can see

In the 1,936 rulings analysed, we found a paradox.


When the assessment of detective evidence can be expressly classified, it turns out favourable to the party submitting it in 68.2% of the classifiable cases.


But in roughly 55% of the relevant set, the judicial text does not offer a specific assessment standardised enough to be clearly labelled.


There is relevant procedural information that does not easily turn into a variable.


The warning for litigants is simple: do not ask only "what percentage does the model give me?"


Also ask: "what does the model actually know about my evidence?"


Related reading: La IA: Asedio a la privacidad — Editorial Tirant Lo Blanch


Truth has a method.


    

By Francisco Marco. PhD in Law (UAB), private investigator and director of Método 3.