Evaluation-Driven Development › Splits, Holdouts, and the Contamination Boundary
Language AI HandbookAll chapters A case used to choose the prompt has become development evidence. Subsequent performance on that case measures behavior on a known example. Adaptive reuse can overfit a holdout even when tuners see only aggregate feedback. Dwork et al. (2015)
Keep cases for development and reserve separate cases to confirm changes. A known failure can also become a regression test once resolved. Regression cases deliberately remain known and protect behavior you have already fixed. In a real split, keep duplicates, paraphrases, and examples from the same underlying customer issue in one partition when they would otherwise leak across it.
PythonIn [9]Expand
import random
def split_suite(cases: list[Case], holdout_frac=0.34, seed=7):
if len(cases) < 2 or not 0 < holdout_frac < 1:
raise ValueError(
"Need at least two cases and a fraction strictly between 0 and 1."
)
rng = random.Random(seed)
shuffled = cases[:]
rng.shuffle(shuffled)
n_hold = min(len(shuffled) - 1, max(1, round(len(shuffled) * holdout_frac)))
return {"holdout": shuffled[:n_hold], "dev": shuffled[n_hold:]}PythonIn [10]Expand
splits = split_suite(SUITE)
for name, cases in splits.items():
print(name, "->", [c.case_id for c in cases])ConsoleOut [10]Expand
holdout -> ['c005', 'c001'] dev -> ['c006', 'c004', 'c002', 'c003']
The seeded example gives four dev cases and two holdout cases. Both partitions are visible here so you can inspect the mechanics. This notebook uses dev for tuning examples and makes no generalization claim from the toy holdout.
Inspect the split before treating it as a representative sample. The chart counts how many cases each slice contributes to each partition. The toy holdout contains no technical cases. Protecting technical behavior on this split therefore requires other evidence.
PythonIn [11]Expand
partition_groups = ["billing", "technical", "multilingual"]
partition_counts = {
partition: [
sum(case.slice == group for case in cases) for group in partition_groups
]
for partition, cases in splits.items()
}
partition_rows = list(range(len(partition_groups)))VisualizationOut [12]Expand

Restrict access to holdout cases and detailed outputs during tuning. If you inspect a failure and tune against it, move it into dev or the known regression set. Replace it with fresh confirmation data when you need an independent estimate.
Comments
Add to the conversation
A question, a correction, or an example from your own work.
No comments yet. Be the first to share your thoughts!