How We Cut Target Leakage from 92% to 0.1% in Court Outcome Prediction (and Built a Triple-A MCP Server)
Description and use
We reduced target leakage in court outcome prediction from 92% to 0.1% by sanitizing text and trained a LightGBM model, achieving 78.2% accuracy. The model is deployed as a zero‑dependency MCP server.
Problem
AI models for court outcome prediction suffer from target leakage, where 92% of raw texts contain the outcome verbatim, causing models to simply read back the answer instead of learning legal reasoning.
Outcome
Target leakage dropped from 92% to 0.1%; model achieved 78.2% accuracy (vs 43.7% baseline) with macro‑F1 of 77.1% across 609,715 cases. MCP server received Triple‑A audit rating.
Workflow
- 1. Implement strict sanitization: strip dictum, summary lines, and outcome‑announcing phrases from raw texts.
- 2. Continuously measure residual outcome markers to confirm leakage reduction.
- 3. Train LightGBM on the sanitized dataset.
- 4. Evaluate with 5‑fold cross‑validation on out‑of‑fold data.
- 5. Wrap the pipeline into a zero‑dependency MCP server exposing three tools: rechtspraak_cijfers, lekkage_check, voorspel_uitkomst.
Evidence
Leakage dropped from 92% to 0.1% (around 1 in 1,000 texts).
Overall Accuracy: 78.2% (against a 43.7% majority baseline)
Zero external dependencies: Single Python file using only standard library
- Record date: 2026-09-15T21:00:45.174Z