Task Deduplication and Diversity Metrics at Scale

Task Deduplication and Diversity Metrics at Scale

When an eval or training dataset grows beyond a few hundred tasks, two silent failure modes emerge: near-duplicate tasks that inflate apparent coverage, and clusters so dense in one sub-domain that the dataset measures a narrow slice of capability while appearing broad. Task deduplication and diversity metrics at scale are the tools that catch both. This post explains how to apply them operationally, what each metric actually measures, and where the methods break down.

Answer Capsule

Task deduplication removes or flags tasks that are semantically equivalent or structurally near-identical, preventing inflated coverage and reward-hacking through repetition. Diversity metrics quantify how evenly a dataset spans the intended capability space. At scale, both require embedding-based clustering, explicit diversity objectives, and periodic re-measurement as the task pool grows and as frontier models shift what counts as "hard."

Why Deduplication and Diversity Both Matter for Eval and Post-Training Data

Duplicates and near-duplicates in an eval set overweight specific task templates. A model that memorises the pattern of one task effectively solves its near-copies, making pass-rate estimates optimistic. In a training set, the same problem causes reward over-fitting: the model learns the surface form of a repeated task type rather than the underlying skill.

Diversity failure is subtler. A dataset can contain zero exact duplicates and still measure one capability from forty angles while ignoring ten others. Aggregate scores then mislead: a model looks capable because it aced the dense cluster, not because it generalised. The two problems are related but distinct, and fixing one does not fix the other.

For expert-authored tasks in specialist domains, both risks compound. Experts tend to draw from familiar problem templates. Without systematic deduplication and diversity checks, a CNC/CAM dataset can contain thirty near-identical tool-path optimisation tasks and almost nothing on fixture design or tolerance stack-up analysis. The dataset looks large; its coverage is narrow. Understanding how difficulty ladders and graded task tiers interact with coverage gaps is part of the same design problem.

How to Detect Near-Duplicate Tasks at Scale

Exact-match deduplication is trivial and catches almost nothing in expert-authored datasets, where surface form varies even when the underlying reasoning step is identical. The operational approach uses semantic embeddings plus a similarity threshold.

A Three-Step Deduplication Protocol

  1. Embed all tasks. Use a sentence or document embedding model (for example a text-embedding model from a frontier provider, or a domain-fine-tuned encoder if the domain has strong jargon). Embed the task stem only, not the answer or rubric, to avoid false negatives where different answers share a stem.

  2. Compute pairwise cosine similarity within candidate clusters. Full pairwise comparison is O(n^2); at scale, use approximate nearest-neighbour search (for example FAISS or similar libraries) to retrieve the top-k most similar tasks for each task, then compute exact similarity only within those candidate pairs.

  3. Apply a threshold and flag, don't auto-delete. A cosine similarity above 0.92 is a strong near-duplicate signal for most embedding models, but the right threshold is domain-dependent. Flag pairs for expert review rather than automatic deletion; two tasks that look identical in embedding space may test different edge cases that only a practitioner can distinguish.

The threshold choice is a genuine trade-off. A threshold of 0.85 flags more pairs and requires more expert review time. A threshold of 0.95 misses structural near-duplicates where surface wording differs enough to move the embedding. Calibrate by sampling 50 flagged pairs at several thresholds and measuring expert agreement on whether they are genuinely redundant.

Diversity Metrics: What They Measure and When to Use Each

No single diversity metric captures all dimensions of coverage. The table below compares the four most operationally useful ones.

Metric

What it measures

Requires

Best used for

Blind spot

Vendi Score

Effective number of distinct tasks, based on a kernel matrix over embeddings

Embeddings, kernel function

Single-number diversity summary; comparable across dataset versions

Does not tell you which sub-domains are under-represented

Cluster entropy

How evenly tasks distribute across K clusters

Clustering run, K chosen a priori or by elbow method

Detecting dominant clusters; guiding new task authoring targets

Sensitive to K; clusters may not align with capability sub-domains

Coverage against a taxonomy

Fraction of predefined capability nodes with at least N tasks

An explicit capability taxonomy

Structured domains with known sub-skills (for example PLC ladder logic sub-types)

Taxonomy must be maintained; gaps in the taxonomy become blind spots

Average pairwise distance

Mean cosine distance between all task pairs

Embeddings

Quick sanity check; easy to compute incrementally

Outlier tasks inflate the metric; does not detect dense sub-clusters

The Vendi Score, introduced by Friedman and Dieng (2022), is particularly useful because it does not require choosing a cluster count and it degrades gracefully when near-duplicates are added. A dataset of 500 tasks with a Vendi Score of 12 is effectively behaving like 12 distinct task types, regardless of the nominal count.

Task Deduplication and Diversity Metrics at Scale: Worked Illustrative Example

Illustrative example (numbers are constructed for illustration; not drawn from a real dataset):

Suppose a manufacturing eval dataset has 400 tasks authored by ten CNC/CAM practitioners. After embedding and approximate nearest-neighbour search with a cosine similarity threshold of 0.91, the deduplication step flags 62 pairs. Expert review determines 38 of those pairs are genuine near-duplicates (same tool-path problem, different workpiece material labels). After removing the lower-quality task from each redundant pair, the dataset has 362 tasks.

Cluster entropy is then computed over K=20 clusters (chosen because the capability taxonomy has 20 sub-domains). The entropy is 2.1 bits against a maximum of log2(20) = 4.32 bits, meaning the dataset is concentrated in roughly 4-5 effective clusters. Inspection shows that facing-operation tasks dominate three clusters, while five taxonomy nodes (fixture design, tolerance analysis, surface finish verification, multi-axis collision avoidance, and post-processor customisation) have fewer than 8 tasks each.

The output of this audit is a targeted authoring brief: commission 15-20 new tasks per under-represented node before the next model evaluation run. This is more actionable than a global "add more tasks" instruction, and it directly addresses the coverage gap rather than adding more tasks to already-dense clusters.

Common Failure Modes in Deduplication and Diversity Pipelines

1. Embedding the full task including the answer

Detection: Near-duplicate flags are unusually low even for datasets authored by a small expert pool. Fix: Embed only the task stem. Answer text often differs even when the reasoning step is identical, masking true near-duplicates.

2. Using a general-purpose embedding model for a highly technical domain

Detection: Expert reviewers consistently disagree with the near-duplicate flags, finding that flagged pairs are clearly distinct and unflagged pairs are obviously redundant. Fix: Fine-tune the embedding model on a small in-domain corpus, or use a domain-specific encoder. General embeddings compress domain jargon in ways that collapse meaningful distinctions.

3. Treating diversity as a one-time measurement

Detection: Diversity metrics were computed at dataset v1.0 and have not been re-run since. Fix: Re-measure after every batch of new tasks. Diversity degrades incrementally as authors default to familiar templates. This connects to the broader problem of benchmark decay over time, which affects expert-authored sets too, just through different mechanisms.

4. Conflating lexical diversity with capability diversity

Detection: Average pairwise distance is high, but cluster entropy against the capability taxonomy is low. Fix: Use taxonomy-coverage metrics alongside embedding-based metrics. A dataset can have high surface-form variety while testing a narrow slice of the capability space.

5. Auto-deleting flagged near-duplicates without expert review

Detection: Post-deletion, the dataset has unexpected gaps in a sub-domain that previously had good coverage. Fix: Flag and queue for review; never auto-delete. Two tasks with cosine similarity of 0.94 may differ in a single constraint that makes one significantly harder than the other. This is especially important for adversarially filtered task pools where difficulty is the primary selection criterion.

6. Ignoring inter-difficulty diversity

Detection: Diversity metrics look healthy, but pass@k is bimodal: models solve almost all tasks or almost none. Fix: Stratify diversity metrics by difficulty tier. A dataset can be diverse in topic while being homogeneous in difficulty, which is a separate problem from coverage.

Where This Approach Breaks Down

Embedding-based deduplication assumes that semantic similarity in the embedding space correlates with redundancy in the capability being tested. This assumption weakens in domains where small surface changes produce large capability differences: a G-code task with one changed axis constraint is not a near-duplicate of the original, but embeddings may score it as one. In these domains, programmatic structural comparison (for example AST-level diff for code, parameter-level diff for G-code) is more reliable than embedding similarity alone.

Diversity metrics also cannot tell you whether the tasks you have are the right tasks, only how evenly distributed they are across the tasks you have. A perfectly uniform distribution across a poorly designed taxonomy is not useful. The taxonomy design problem is upstream of the metrics problem, and it requires domain expertise, not statistics. This is part of why expert task sourcing for hard benchmarks starts with capability mapping, not with authoring volume.

Finally, diversity metrics drift in meaning as frontier models improve. A cluster that was diverse in difficulty six months ago may now be uniformly easy. Re-measurement against current models is the only way to know. The relationship between coverage and difficulty is explored further in our discussion of original authored versus scraped tasks and how provenance affects headroom.

FAQ

What cosine similarity threshold should I use for task deduplication?

There is no universal threshold. A starting point of 0.90-0.92 works for general-purpose embeddings on English-language tasks, but domain-specific jargon and technical notation shift the distribution. Calibrate by sampling 30-50 flagged pairs at candidate thresholds and measuring expert agreement. Adjust until the false-positive and false-negative rates are acceptable for your review budget.

Is the Vendi Score better than cluster entropy for measuring diversity?

They answer different questions. The Vendi Score gives a single comparable number for overall diversity without requiring a cluster count. Cluster entropy requires choosing K but tells you which clusters are over- or under-represented, which is more actionable for directing new task authoring. Use both: Vendi Score for tracking diversity over time, cluster entropy for diagnosing where to commission new tasks.

How many tasks do I need before deduplication is worth running?

Run it from the first batch. Near-duplicates introduced early become templates that subsequent authors copy, compounding the problem. The cost of a deduplication pass on 100 tasks is negligible; the cost of restructuring a 2,000-task dataset with systematic near-duplicate clusters is significant.

Can I use diversity metrics to decide when a dataset is complete?

Diversity metrics can tell you when coverage against a taxonomy is saturated, meaning each node has at least N tasks. They cannot tell you whether N is sufficient for reliable capability measurement, which depends on task variance within each node, the difficulty distribution, and the statistical power you need. Treat taxonomy coverage as a necessary condition, not a sufficient one.

Do these methods work for multimodal tasks (image plus text)?

The same principles apply, but the embedding step requires a multimodal encoder that represents both modalities in a shared space. Deduplication of the visual component is harder: two engineering drawings that test the same tolerance-reading skill may look very different visually. Structural metadata (drawing type, dimension count, annotation density) often supplements embedding similarity for visual task deduplication.

What This Means in Practice

Task deduplication and diversity metrics at scale are not preprocessing steps you run once before training. They are ongoing measurements that tell you whether your dataset is doing the job you think it is. Deduplication keeps your coverage estimates honest. Diversity metrics tell you where to invest authoring effort next. Together, they are the instrumentation layer for a dataset that needs to stay ahead of frontier models as capabilities shift.

The operational reality is that both require human judgment at the decision boundary: embeddings find candidates, experts decide. Automating the decision step is where most pipelines introduce silent errors. Chiron Data Labs approaches this as a practitioner problem, not a tooling problem: the metrics surface the questions, and domain experts answer them.

If you're building evals or post-training datasets in a specialist domain and want to talk through deduplication and diversity design, get in touch with Chiron Data Labs.

When an eval or training dataset grows beyond a few hundred tasks, two silent failure modes emerge: near-duplicate tasks that inflate apparent coverage, and clusters so dense in one sub-domain that the dataset measures a narrow slice of capability while appearing broad. Task deduplication and diversity metrics at scale are the tools that catch both. This post explains how to apply them operationally, what each metric actually measures, and where the methods break down.

Answer Capsule

Task deduplication removes or flags tasks that are semantically equivalent or structurally near-identical, preventing inflated coverage and reward-hacking through repetition. Diversity metrics quantify how evenly a dataset spans the intended capability space. At scale, both require embedding-based clustering, explicit diversity objectives, and periodic re-measurement as the task pool grows and as frontier models shift what counts as "hard."

Why Deduplication and Diversity Both Matter for Eval and Post-Training Data

Duplicates and near-duplicates in an eval set overweight specific task templates. A model that memorises the pattern of one task effectively solves its near-copies, making pass-rate estimates optimistic. In a training set, the same problem causes reward over-fitting: the model learns the surface form of a repeated task type rather than the underlying skill.

Diversity failure is subtler. A dataset can contain zero exact duplicates and still measure one capability from forty angles while ignoring ten others. Aggregate scores then mislead: a model looks capable because it aced the dense cluster, not because it generalised. The two problems are related but distinct, and fixing one does not fix the other.

For expert-authored tasks in specialist domains, both risks compound. Experts tend to draw from familiar problem templates. Without systematic deduplication and diversity checks, a CNC/CAM dataset can contain thirty near-identical tool-path optimisation tasks and almost nothing on fixture design or tolerance stack-up analysis. The dataset looks large; its coverage is narrow. Understanding how difficulty ladders and graded task tiers interact with coverage gaps is part of the same design problem.

How to Detect Near-Duplicate Tasks at Scale

Exact-match deduplication is trivial and catches almost nothing in expert-authored datasets, where surface form varies even when the underlying reasoning step is identical. The operational approach uses semantic embeddings plus a similarity threshold.

A Three-Step Deduplication Protocol

  1. Embed all tasks. Use a sentence or document embedding model (for example a text-embedding model from a frontier provider, or a domain-fine-tuned encoder if the domain has strong jargon). Embed the task stem only, not the answer or rubric, to avoid false negatives where different answers share a stem.

  2. Compute pairwise cosine similarity within candidate clusters. Full pairwise comparison is O(n^2); at scale, use approximate nearest-neighbour search (for example FAISS or similar libraries) to retrieve the top-k most similar tasks for each task, then compute exact similarity only within those candidate pairs.

  3. Apply a threshold and flag, don't auto-delete. A cosine similarity above 0.92 is a strong near-duplicate signal for most embedding models, but the right threshold is domain-dependent. Flag pairs for expert review rather than automatic deletion; two tasks that look identical in embedding space may test different edge cases that only a practitioner can distinguish.

The threshold choice is a genuine trade-off. A threshold of 0.85 flags more pairs and requires more expert review time. A threshold of 0.95 misses structural near-duplicates where surface wording differs enough to move the embedding. Calibrate by sampling 50 flagged pairs at several thresholds and measuring expert agreement on whether they are genuinely redundant.

Diversity Metrics: What They Measure and When to Use Each

No single diversity metric captures all dimensions of coverage. The table below compares the four most operationally useful ones.

Metric

What it measures

Requires

Best used for

Blind spot

Vendi Score

Effective number of distinct tasks, based on a kernel matrix over embeddings

Embeddings, kernel function

Single-number diversity summary; comparable across dataset versions

Does not tell you which sub-domains are under-represented

Cluster entropy

How evenly tasks distribute across K clusters

Clustering run, K chosen a priori or by elbow method

Detecting dominant clusters; guiding new task authoring targets

Sensitive to K; clusters may not align with capability sub-domains

Coverage against a taxonomy

Fraction of predefined capability nodes with at least N tasks

An explicit capability taxonomy

Structured domains with known sub-skills (for example PLC ladder logic sub-types)

Taxonomy must be maintained; gaps in the taxonomy become blind spots

Average pairwise distance

Mean cosine distance between all task pairs

Embeddings

Quick sanity check; easy to compute incrementally

Outlier tasks inflate the metric; does not detect dense sub-clusters

The Vendi Score, introduced by Friedman and Dieng (2022), is particularly useful because it does not require choosing a cluster count and it degrades gracefully when near-duplicates are added. A dataset of 500 tasks with a Vendi Score of 12 is effectively behaving like 12 distinct task types, regardless of the nominal count.

Task Deduplication and Diversity Metrics at Scale: Worked Illustrative Example

Illustrative example (numbers are constructed for illustration; not drawn from a real dataset):

Suppose a manufacturing eval dataset has 400 tasks authored by ten CNC/CAM practitioners. After embedding and approximate nearest-neighbour search with a cosine similarity threshold of 0.91, the deduplication step flags 62 pairs. Expert review determines 38 of those pairs are genuine near-duplicates (same tool-path problem, different workpiece material labels). After removing the lower-quality task from each redundant pair, the dataset has 362 tasks.

Cluster entropy is then computed over K=20 clusters (chosen because the capability taxonomy has 20 sub-domains). The entropy is 2.1 bits against a maximum of log2(20) = 4.32 bits, meaning the dataset is concentrated in roughly 4-5 effective clusters. Inspection shows that facing-operation tasks dominate three clusters, while five taxonomy nodes (fixture design, tolerance analysis, surface finish verification, multi-axis collision avoidance, and post-processor customisation) have fewer than 8 tasks each.

The output of this audit is a targeted authoring brief: commission 15-20 new tasks per under-represented node before the next model evaluation run. This is more actionable than a global "add more tasks" instruction, and it directly addresses the coverage gap rather than adding more tasks to already-dense clusters.

Common Failure Modes in Deduplication and Diversity Pipelines

1. Embedding the full task including the answer

Detection: Near-duplicate flags are unusually low even for datasets authored by a small expert pool. Fix: Embed only the task stem. Answer text often differs even when the reasoning step is identical, masking true near-duplicates.

2. Using a general-purpose embedding model for a highly technical domain

Detection: Expert reviewers consistently disagree with the near-duplicate flags, finding that flagged pairs are clearly distinct and unflagged pairs are obviously redundant. Fix: Fine-tune the embedding model on a small in-domain corpus, or use a domain-specific encoder. General embeddings compress domain jargon in ways that collapse meaningful distinctions.

3. Treating diversity as a one-time measurement

Detection: Diversity metrics were computed at dataset v1.0 and have not been re-run since. Fix: Re-measure after every batch of new tasks. Diversity degrades incrementally as authors default to familiar templates. This connects to the broader problem of benchmark decay over time, which affects expert-authored sets too, just through different mechanisms.

4. Conflating lexical diversity with capability diversity

Detection: Average pairwise distance is high, but cluster entropy against the capability taxonomy is low. Fix: Use taxonomy-coverage metrics alongside embedding-based metrics. A dataset can have high surface-form variety while testing a narrow slice of the capability space.

5. Auto-deleting flagged near-duplicates without expert review

Detection: Post-deletion, the dataset has unexpected gaps in a sub-domain that previously had good coverage. Fix: Flag and queue for review; never auto-delete. Two tasks with cosine similarity of 0.94 may differ in a single constraint that makes one significantly harder than the other. This is especially important for adversarially filtered task pools where difficulty is the primary selection criterion.

6. Ignoring inter-difficulty diversity

Detection: Diversity metrics look healthy, but pass@k is bimodal: models solve almost all tasks or almost none. Fix: Stratify diversity metrics by difficulty tier. A dataset can be diverse in topic while being homogeneous in difficulty, which is a separate problem from coverage.

Where This Approach Breaks Down

Embedding-based deduplication assumes that semantic similarity in the embedding space correlates with redundancy in the capability being tested. This assumption weakens in domains where small surface changes produce large capability differences: a G-code task with one changed axis constraint is not a near-duplicate of the original, but embeddings may score it as one. In these domains, programmatic structural comparison (for example AST-level diff for code, parameter-level diff for G-code) is more reliable than embedding similarity alone.

Diversity metrics also cannot tell you whether the tasks you have are the right tasks, only how evenly distributed they are across the tasks you have. A perfectly uniform distribution across a poorly designed taxonomy is not useful. The taxonomy design problem is upstream of the metrics problem, and it requires domain expertise, not statistics. This is part of why expert task sourcing for hard benchmarks starts with capability mapping, not with authoring volume.

Finally, diversity metrics drift in meaning as frontier models improve. A cluster that was diverse in difficulty six months ago may now be uniformly easy. Re-measurement against current models is the only way to know. The relationship between coverage and difficulty is explored further in our discussion of original authored versus scraped tasks and how provenance affects headroom.

FAQ

What cosine similarity threshold should I use for task deduplication?

There is no universal threshold. A starting point of 0.90-0.92 works for general-purpose embeddings on English-language tasks, but domain-specific jargon and technical notation shift the distribution. Calibrate by sampling 30-50 flagged pairs at candidate thresholds and measuring expert agreement. Adjust until the false-positive and false-negative rates are acceptable for your review budget.

Is the Vendi Score better than cluster entropy for measuring diversity?

They answer different questions. The Vendi Score gives a single comparable number for overall diversity without requiring a cluster count. Cluster entropy requires choosing K but tells you which clusters are over- or under-represented, which is more actionable for directing new task authoring. Use both: Vendi Score for tracking diversity over time, cluster entropy for diagnosing where to commission new tasks.

How many tasks do I need before deduplication is worth running?

Run it from the first batch. Near-duplicates introduced early become templates that subsequent authors copy, compounding the problem. The cost of a deduplication pass on 100 tasks is negligible; the cost of restructuring a 2,000-task dataset with systematic near-duplicate clusters is significant.

Can I use diversity metrics to decide when a dataset is complete?

Diversity metrics can tell you when coverage against a taxonomy is saturated, meaning each node has at least N tasks. They cannot tell you whether N is sufficient for reliable capability measurement, which depends on task variance within each node, the difficulty distribution, and the statistical power you need. Treat taxonomy coverage as a necessary condition, not a sufficient one.

Do these methods work for multimodal tasks (image plus text)?

The same principles apply, but the embedding step requires a multimodal encoder that represents both modalities in a shared space. Deduplication of the visual component is harder: two engineering drawings that test the same tolerance-reading skill may look very different visually. Structural metadata (drawing type, dimension count, annotation density) often supplements embedding similarity for visual task deduplication.

What This Means in Practice

Task deduplication and diversity metrics at scale are not preprocessing steps you run once before training. They are ongoing measurements that tell you whether your dataset is doing the job you think it is. Deduplication keeps your coverage estimates honest. Diversity metrics tell you where to invest authoring effort next. Together, they are the instrumentation layer for a dataset that needs to stay ahead of frontier models as capabilities shift.

The operational reality is that both require human judgment at the decision boundary: embeddings find candidates, experts decide. Automating the decision step is where most pipelines introduce silent errors. Chiron Data Labs approaches this as a practitioner problem, not a tooling problem: the metrics surface the questions, and domain experts answer them.

If you're building evals or post-training datasets in a specialist domain and want to talk through deduplication and diversity design, get in touch with Chiron Data Labs.

© 2026 CHIRON, SAN FRANCISCO, CA