← /projectsAIPython · MinHash-LSH · TF-IDF

Contamination auditor for LLM evaluations — built as a commercial v1 and positioned for acquisition by eval-infrastructure companies, MLOps platforms, or leaderboard vendors.

Built with Python, MinHash-LSH, TF-IDF, CLI and pytest. The code is on GitHub.

EvalGuard solves a specific, measurable problem: when a model's training or fine-tuning corpus overlaps with a benchmark, the reported evaluation score is inflated — and right now there is no standard tool to quantify by how much. EvalGuard fills that gap. Given a corpus D and a benchmark B, it produces two defensible numbers: contamination rate ρ (the fraction of benchmark items compromised) and score inflation Δ (the points by which the headline score is overstated). Every detection comes with a full evidence trail showing which matcher fired, the matched span, and the reason — not a black-box judgment.

Two numbers out
Two numbers outAn audit of a benchmark against a corpus, with illustrative numbers: every leaked item raises the contamination rate ρ, and the score inflation Δ is the slice of the reported score those items account for. Each hit arrives with its span.

The target users are teams fine-tuning open-weight models on scraped or semi-public data who need to trust their eval numbers before shipping. The framing is explicitly self-serve and non-adversarial: the corpus stays on-premise, the CLI drops into CI, and the output is an audit report rather than a public indictment. This survives the five standard objections to contamination detection as a product — the wedge is internal trust, not external accusation.

The CI gate
The CI gateThe CLI drops into a pipeline: it scans, prints ρ and Δ with the evidence file, and exits non-zero above the threshold, so a contaminated model never gets promoted. Illustrative runs.

The v1 implementation covers the open-data regime with a four-matcher ensemble (n-gram/MinHash-LSH, TF-IDF, paraphrase, answer-leak), a ground-truth injection harness for rigorous detector evaluation, data-driven per-form calibration, and 34 passing tests. On real data (OpenBookQA × AG News), three of four contamination forms are recovered at precision 1.00 and recall 1.00; the auditor fails conservatively in all conditions — it under-reports, never fabricates.

Four matchers, one verdict
Four matchers, one verdictEach benchmark item is checked four ways against the corpus: exact spans (n-gram and MinHash-LSH), lexical similarity (TF-IDF), paraphrase, and answer leakage. A hit names which matcher fired, the span, and the reason.
The injection harness
The injection harnessKnown contamination is planted into a clean corpus and the detector is scored on what it recovers. On OpenBookQA × AG News, three of four forms come back at precision 1.00 and recall 1.00; the fourth is under-reported, never fabricated. 34 tests guard it.

Positioned for acquisition. The near-term returns are the open benchmark, CLI credibility, and the labeled injection harness — a hard-to-reproduce research artifact that compounds as a moat. Most likely acquirers are eval-infrastructure companies adding a trust layer, MLOps/model-registry platforms needing a promotion-gate check, and leaderboard or data vendors wanting a cleanliness certification. Full technical detail, experimental results, and commercial framing are in the project report linked below.

The instrument
The instrumentAn antique microscope from The Met's collection, CC0, in the site's three tones with a green accent. EvalGuard does the same job for a reported score: put it under the glass and show what is actually there.

Keep reading

A few sentences is plenty. If it's a fit, our first call starts with the work instead of an intro.

Send me a noteClass of 2029