﻿# lm-eval decontamination: query fields and cached overlap evidence

Inspect lm-evaluation-harness decontamination queries, training n-gram artifacts and cache identity before reporting a clean benchmark subset.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/data-guide-lmeval-decontamination-query-cache/
Language: en

## The task defines which text is checked

The lm-evaluation-harness task configuration can declare a decontamination query separately from the prompt shown to the model. In the maintained SciQ configuration, the query combines support and question text. That is a specific extraction contract, not a generic promise to compare every field in the dataset.

Inspect the actual task revision used. Checking only a question differs from checking supporting passages as well. Including answer choices or a shared instruction can also change which overlaps are detected. Keep the extracted text available for a few representative examples when reviewing the setup.

## Training n-grams are a separate artifact

The project's decontamination documentation describes generating and scanning training-corpus n-gram files with associated metadata. An evaluator cannot inspect an unavailable training corpus merely because a task contains an enabled flag. The supplied index defines the material against which overlap is checked.

Record the index's corpus coverage and generation settings. An index built before a later data addition cannot establish the absence of overlap with that addition. Likewise, using an index from a different training recipe changes the question the result answers.

## Read the implementation alongside the guide

The maintained repository contains overlap-scanning code under its decontamination package. The guide also contains historical workflow descriptions. Check the installed revision and the runtime path that actually executes the scan before assuming a copied invocation implements the documented end-to-end behavior.

A proposed small validation deliberately includes a known overlap and a non-overlapping example, then inspects the resulting identifiers and reported metrics. A configuration file that loads successfully is not evidence that this validation has passed. No live harness run is claimed here.

## Cached results need their own provenance

The overlap implementation persists task-related lookups and overlap files and can load them on later runs. When corpus content, task extraction or normalization changes, examine whether the cache identity still describes those inputs. Familiar task and split names alone are weak evidence of unchanged content.

Keep index identity and task revision with the result. Isolate changed experiments or invalidate incompatible cache entries through a controlled workflow. Otherwise a fast repeat can reuse old overlap evidence while appearing to describe a newly prepared evaluation set.

## Name the scope of a clean subset

An n-gram method detects overlap under a selected representation and matching rule. It does not prove that a model has never seen a paraphrase, translation or another related source. Report the retained identifiers, excluded identifiers and the rule used to distinguish them.

Compare full-set and filtered results with their changed populations visible. A difference can reflect which examples were removed, not an intrinsic change to the model. The useful outcome is an inspectable overlap analysis, bounded by the task query and corpus index actually checked.

## Primary references

[lm-eval decontamination guide](https://raw.githubusercontent.com/EleutherAI/lm-evaluation-harness/main/docs/decontamination.md).

[lm-eval overlap implementation](https://raw.githubusercontent.com/EleutherAI/lm-evaluation-harness/main/lm_eval/decontamination/decontaminate.py).

[lm-eval SciQ task configuration](https://raw.githubusercontent.com/EleutherAI/lm-evaluation-harness/main/lm_eval/tasks/sciq/sciq.yaml).

Related explanations: [Independent split design](/journal/document-level-data-split-leakage/); [Timestamped provenance](/journal/document-markdown-json-provenance/).
