Privacy and preparation
Dataset sample vs full export mismatch: a three-draw diagnosis
By SourceX Editorial · Reviewed by Noah Loul ·
10 sections
Short answer
When a buyer accepts a dataset sample but rejects the full export, rerun the buyer's unchanged acceptance test on three draws: the accepted sample, the same record IDs inside the full export, and a seeded random draw of the export. Failures on the same IDs point to inconsistent preparation; failures only in the random draw point to coverage change or selection bias; three passes mean rights, terms or task fit.
System export
Dataset sample
Key takeaways
- A sample can sentence an export only if it was drawn at random from that export and prepared the same way.
- Run the buyer's unchanged acceptance test on three draws: the accepted sample, the same IDs in the export and a seeded random draw of the export.
- Same IDs failing means a preparation difference; random-draw failures in new strata mean coverage change; failures across covered strata mean selection bias.
- When all three draws pass, the problem is rights, terms or task fit, and no pipeline change will resolve it.
- Log one row per finding with draw results, stratum, mechanism and evidence so the next request fixes the cause up front.
Why would a buyer accept the sample but reject the full export?
A buyer accepts a sample and rejects the full export when the two are not the same population prepared the same way, or when the full review tested something the sample review never did. Four causes cover almost every case: the sample was selected rather than drawn, the export spans records the sample never covered, the export went through a different preparation path, or the objection is about rights, terms or task fit rather than the data's condition.
Each cause has a different remedy, and the wrong remedy is expensive. Re-running the whole export through the pipeline does nothing for a selection problem; narrowing the scope does nothing for a preparation bug; neither fixes a rights objection. The first job is diagnosis, and it can be done with the buyer's own acceptance test before anyone rebuilds anything.
The statistical reason samples mislead is old and simple. The NIST/SEMATECH Engineering Statistics Handbook describes acceptance sampling as drawing a random sample from a lot and using it to decide whether the lot is likely acceptable, not to estimate its exact quality. A sample chosen by hand, or drawn from a different lot, cannot sentence the export it was meant to preview.
Freeze four versions before anyone re-exports
Before diagnosing anything, lock the evidence so the comparison cannot drift while people argue. Most sample-versus-export disputes go in circles because someone regenerates a file, and nobody can say afterward which version failed.
At a glance
Freeze four versions before anyone re-exports
Four things need a fixed identifier: the sample as accepted, the full export as rejected, the preparation code that produced each, and the acceptance test version the buyer applied to each. Record the buyer's rejection note with its date, and keep record counts for every file so later denominators reconcile. Datasheets for Datasets, the documentation template proposed by Gebru and coauthors, asks how a dataset was collected and what preprocessing, cleaning and labeling were applied; answering those questions separately for the sample and the export often exposes the problem before any test runs.
Freeze these before the next step:
- Sample manifest: record IDs, file hashes, the date it was drawn and the rule that chose it.
- Export manifest: record counts by year, site, product and channel, with file hashes.
- Preparation versions: the code commit, redaction rules and join logic used for the sample and for the export.
- Acceptance test version: the exact checks and thresholds the buyer ran on each, and any check added after the sample review.
- Rejection note: the buyer's wording, the date, and any failing record IDs the buyer can share.
The three-draw test: one acceptance test, three sets of records
Run the buyer's acceptance test, unchanged, on three sets of records and compare the pattern of results. The pattern points to the cause far faster than reading the failing records one by one.
Draw A is the sample exactly as the buyer accepted it. Draw B is the same record IDs, located in the full export as delivered, so the records are identical in origin but went through the export's preparation path. Draw C is a seeded random sample of the full export, stratified by the dimensions the buyer cares about, such as year, site, product line or language. Record pass or fail per check and per record, and keep the seed so anyone can redraw C.
Size C so a clean result means something. If none of n randomly drawn records fails a check, the upper end of a 95 percent confidence interval for that check's failure rate is roughly 3 divided by n, so 300 clean records put the plausible failure rate under about 1 percent. Smaller draws can still find a large problem quickly; they cannot certify a clean one.
The decision table maps each result pattern to its most likely cause, the evidence that confirms it and the next step:
| Pattern A / B / C | Most likely cause | Confirm with | Next step |
|---|---|---|---|
| Pass / Fail / Fail | Inconsistent preparation: the same records were processed differently | A field-by-field diff of A against B; compare code versions, redaction rules and joins | Rebuild the export on one preparation path, then rerun all three draws |
| Pass / Pass / Fail, failures in strata A lacked | Coverage change: the export reaches years, sites or products the sample never covered | Failure rate by stratum in C; strata missing from A | Narrow scope to tested strata, or sample, test and price the new strata separately |
| Pass / Pass / Fail, failures across strata A covered | Selection bias: the sample was not a random draw from the export | Quality indicators in A versus C within each stratum; how A was chosen | Redraw a seeded random sample and re-agree scope or price before re-delivery |
| Pass / Pass / Pass | No technical defect: rights, terms, task fit or a changed test | The rejection note, the test version used at full scale and the failing record IDs | Ask for the failing cases and the test, then reopen rights, terms or scope |
| Fail on A | The test changed after the sample review | Test version history; rerun the old version on A | Agree one test version in writing before any more data work |
Selection bias: the sample was picked, not drawn
Selection bias is the likely cause when the same records pass in both forms but a random draw from the export fails across strata the sample covered. The sample's mix may look right by year and category while its records are cleaner, longer or better resolved than typical records in each group.
It usually arrives innocently. Someone picks recent records because they are easy to find, a site manager offers the team that keeps the best notes, or a curator drops tickets that look messy. The TensorFlow Data Validation documentation names this failure directly: distribution skew between training and serving data can come from a faulty sampling mechanism that picks only a subsample of the data to train on.
Confirm it by comparing quality indicators within each stratum, such as field fill rates, note length, the share of exceptions and the share of reopened cases, between A and C. If A beats C consistently inside strata whose overall mix matches, the sample was chosen rather than drawn. Prevention is covered in the sample representativeness audit linked below; after a rejection, the remedy is a seeded redraw and an honest conversation about scope or price.
Coverage change: the export reaches years, sites or products the sample never saw
Coverage change is the likely cause when failures in the random draw concentrate in strata the sample never contained: older years, an acquired business unit, a second language, a product line launched later or a period before a system migration. The sample was fine for what it covered; the export simply covers more.
Shifts like these matter even when every record is technically clean. The WILDS benchmark, a set of ten datasets built from real deployment shifts such as different hospitals and camera locations, found that models performed substantially worse out of distribution than in distribution, and that the gap persisted with methods designed to handle shift. A buyer testing a full export is, in effect, checking whether the new strata belong to the distribution the sample promised.
Measure it by span. TensorFlow Data Validation supports drift comparison between consecutive spans of data, such as one period against the next, using L-infinity distance for categorical features and approximate Jensen-Shannon divergence for numeric ones. Comparing each year or site in the export against the sample's statistics shows exactly where the export stops resembling what the buyer approved. The remedy is a scope decision: deliver only the tested strata, or sample and test the new strata as a separate lot with its own acceptance result.
Inconsistent preparation: the same records came out different
Inconsistent preparation is the likely cause when the sample passes but the same record IDs fail inside the full export. Nothing about the records changed; the path they took did.
Samples are often prepared by hand or in a notebook, while full exports run as batch jobs written later by someone else. Typical differences include a redaction rule applied more aggressively at scale, a deduplication pass that merged distinct cases, a join that silently dropped attachments, a time-zone conversion applied twice, or a code mapping the sample never needed. A field-by-field diff of draw A against draw B finds most of these in an afternoon.
The durable fix is one preparation path for both. Great Expectations, an open-source validation library, describes its expectations as unit tests for data; running the same expectation suite against the sample and the export, and keeping the generated validation results, turns preparation consistency into evidence rather than a promise. For high-risk AI systems, Article 10 of the EU AI Act lists data preparation operations such as annotation, labelling, cleaning, enrichment and aggregation among the data governance practices a provider must address, which is one more reason to keep them versioned and identical across sample and delivery. That is general information, not legal advice.
When all three draws pass: rights, terms or a different task
If all three draws pass the buyer's own test, the rejection is not about the data's condition. Either the full review applied a check the sample never faced, or the objection concerns rights, commercial terms or whether the records fit the task at all.
Full-scale reviews often add steps: a legal review of license terms, a privacy scan across every field, or a model evaluation that the sample was too small to support. Rights problems in particular surface at scale. In a 2024 Nature Machine Intelligence paper covering over 1,800 text datasets, the Data Provenance Initiative reported that popular hosting sites left out license information for more than two-thirds of them and carried license errors for more than 50 percent, and that license information was lost when datasets were aggregated into larger collections. A full export that merges several sources can lose permissions the same way.
No pipeline change resolves these. Ask the buyer for the failing cases and the test or review that flagged them, then decide whether the gap is rights (reopen scope with the record owner), terms (renegotiate), or task fit (the records do not serve the use, which more preparation cannot change). Recording that decision honestly is worth more than another export.
The rejection reason log: one row per finding
Log every finding as its own row, with the draw results and the evidence file beside it, so the diagnosis survives handoffs and the next delivery starts from what was learned. A single summary line such as rejected for quality destroys the information needed to fix anything.
The fields below fit in a spreadsheet; the entries are illustrative and match the worked example that follows:
| Log field | What to record | Illustrative entry |
|---|---|---|
| Finding ID and date | One row per distinct finding, dated when the buyer raised it | F-07, raised on day 3 of the full review |
| Check and test version | The exact check that failed and the acceptance test version in force | Resolution code present, test version 2 |
| Draw results | Failures and record counts on draws A, B and C | A: 0 of 200; B: 0 of 200; C: 41 of 300 |
| Stratum | Where failures concentrate: year, site, product, channel or language | Tickets created before the 2022 helpdesk migration |
| Mechanism code | Selection, coverage, preparation or non-technical | Coverage |
| Evidence file | The diff, stratum table or rejection note that supports the code, with its hash | Failure rates by year, hash recorded |
| Remedy and owner | One remedy, one named owner and a due date | Map legacy codes or drop 2019 to 2021; data engineer |
| Decision and retest | Accept, narrow, re-prepare, renegotiate or walk away, plus the retest result | Narrowed to 2022 onward; fresh draw passed |
Illustrative: a helpdesk export that failed only before a migration
This example is illustrative, not a real deal. A services company offers support tickets for a buyer training a triage model. The buyer accepts a 200-ticket sample drawn from 2024, then rejects the full export covering 2019 through 2025 because its own check finds about 14 percent of tickets with no resolution code.
The three-draw test settles the cause quickly. Draw A, the accepted sample, has no failures. Draw B, the same 200 IDs inside the full export, has none either, so preparation is consistent. Draw C, 300 tickets drawn at random with a recorded seed and stratified by year, has 41 failures, and 39 of them are tickets created before 2022, when the company moved to a new helpdesk tool and resolution codes had lived in a free-text field.
The pattern, pass on A and B with failures concentrated in strata the sample lacked, marks a coverage change. The company has two honest options: map the legacy free-text resolutions to codes and test a fresh draw from 2019 to 2021 as its own lot, or narrow the delivery to 2022 onward. It also checks that the older tool's records sit inside the scope the company approved, since a migration can change which agreement governs them. Either way, the log keeps the evidence so the next buyer sees the stratum split up front.
Write the next request so the sample can speak for the export
Most of these failures are preventable at the request stage. A sample can speak for an export only if the request says how the sample will be drawn, which strata it must cover, which preparation path it will use and which acceptance test version applies to both.
For buyers working with SourceX, datasets are sourced from U.S. businesses after a request rather than held in stock, and the request-data form collects scope, volume, language, format, timing and licensing needs. Adding the draw rule and the acceptance test to that request lets a sample be built as a true preview of the delivery. The company that owns the records approves scope and terms and signs before any data is delivered, so a coverage change discovered later is a scope conversation with that company, not a pipeline fix.
Before submitting a request, settle these points:
- The sampling rule: seeded random, stratified by the dimensions that matter to the task.
- The strata the delivery may include, and how new strata will be tested if scope grows.
- One preparation path and one validation suite for sample and delivery alike.
- The acceptance test version, frozen in writing before the sample is drawn.
- What the buyer will return with any rejection: failing record IDs, the check and per-stratum counts.
Frequently asked questions
Why would a dataset sample pass review but the full delivery fail?
Usually because the sample was hand-picked or drawn from a narrower slice, the full delivery covers years or sites the sample never touched, or the delivery went through a different preparation path. Sometimes the full review added a rights or model check the sample never faced. Running the same test on three draws separates these causes.
How large should the random draw from the full export be?
Large enough that a clean result is informative. With zero failures in n random records, the 95 percent upper bound on the failure rate is roughly 3 divided by n, so 300 clean records bound it near 1 percent. Stratify the draw so small but important groups, such as older years, are not missed.
Is a curated sample ever acceptable?
Yes, if everyone calls it curated. A hand-picked sample is useful for showing what good records look like or for checking a schema, but it cannot predict the quality of the full export. Acceptance decisions about the delivery should rest on a random draw from the delivery itself.
Can redaction differences alone make a full export fail?
Yes. A redaction rule applied more aggressively in the batch job than in the hand-prepared sample can strip the very fields an acceptance check needs. Comparing the sample's records with the same IDs in the full export shows this immediately, because the source records are identical and only the preparation differs.
What should a buyer send back with a full-export rejection?
The failing record IDs or a stable way to find them, the exact check and test version, and failure counts by stratum where possible. With that, a supplier can run the three-draw diagnosis within days instead of guessing, and both sides can agree on whether to narrow, re-prepare or renegotiate.
Sources
- The NIST/SEMATECH Engineering Statistics Handbook describes acceptance sampling as drawing a random sample from a lot to decide whether the lot is likely acceptable, not to estimate its quality. Source
- TensorFlow Data Validation documentation names a faulty sampling mechanism that chooses only a subsample as a cause of distribution skew, and supports drift checks between consecutive data spans using L-infinity distance and approximate Jensen-Shannon divergence. Source
- Great Expectations describes expectations as expressive and extensible unit tests for data and generates documentation for each set of validation results. Source
- Article 10 of Regulation (EU) 2024/1689 requires data governance practices for high-risk AI systems covering data preparation operations such as annotation, labelling, cleaning, enrichment and aggregation. Source
- The WILDS benchmark of ten datasets reflecting real deployment shifts found substantially lower out-of-distribution than in-distribution performance, a gap that persisted with methods designed for distribution shift. Source
- The Data Provenance Initiative audit of more than 1,800 text datasets (Nature Machine Intelligence, 2024) found license omission above two-thirds and error rates above 50 percent on hosting sites, with license information lost during aggregation. Source
- Datasheets for Datasets proposes documenting each dataset's motivation, composition, collection process, preprocessing and recommended uses. Source
Tell us what data you need
Share scope, volume, format, timing and licensing needs. Datasets are sourced on request.