Field guide · Data and datasets

Data and datasets: from a pile of files to trainable material

You pull 200,000 conversations from a shared drive and call it “enough data”. Training starts and the problems appear: some customers never consented, some fields contain phone numbers, train and test share the same samples, and nobody can delete a bad batch cleanly. Whether data is usable is not a size question. It has to answer: where it came from, why you may use it, how it was processed, how to reproduce it and how to delete it.

For Anyone cleaning, labelling, splitting or preparing training data You leave with A data card, a rights checklist and a path from the use sentence to a reproducible version Time 12 minutes to read; about a day for a small batch Last checked 25 Nov 2026

This is Specul’s data-production framework, not legal advice or a ranking of datasets or licences. Specific use, licensing and compliance conclusions remain with the authorisation documents, contracts, applicable law and original sources.

If you only have five minutes
  1. Write the use sentence first: what exactly is this data training?
  2. Check copyright, contract, privacy and likeness separately; do not collapse them into “licensed”.
  3. Split train, validation and test by source, not just randomly.

The full guide starts below. Use the tables for reference; you do not need to memorise them.

One concrete job

Take one concrete job: 2,000 support conversations to train a ticket classifier with three labels: refund, shipping and product. Write the source, licence, fields, split and deletion method first.

Whether a record is usable is not a matter of size. It must answer where it came from, on what basis it is used, how it was processed, how it reproduces and how it can be removed.

1 · Fix the purpose: pretraining, fine-tuning, preference, evaluation and RAG need different data

“Not enough data” can mean five different problems: pretraining lacks scale and diversity, fine-tuning lacks task examples, preference data lacks paired comparisons, evaluation lacks discrimination, RAG lacks retrievable and citable documents. Their minimum fields, quality bars and risks differ completely. Fine-tuning on an evaluation set or building RAG from raw web text only reveals the mismatch at the end.

Write the purpose as an input–output–judgement sentence. For example: “given a customer-support dialogue, output the issue category and whether to escalate; a human judges against 12 labels.” Without input, output and judgement, annotators improvise and quality cannot reproduce.

PurposeMinimum fieldsQuality barMain risk
Pretraining / continued pretrainingText or image-text, source, licence, language, dateScale, deduplication, language coverage, low-quality filteringCopyright, privacy, contamination, long-tail removal
Supervised fine-tuningInstruction, input, expected output, rationale or labelTask coverage, answer consistency, difficulty tiersLabel drift, short answers, templating
Preference / alignmentTwo responses to one prompt, preference direction, rationaleValid contrast, position debiasing, annotator agreementPreferring longer answers, cultural bias
Evaluation / benchmarkItem, reference answer or scorer, difficulty, sourceDiscrimination, contamination check, reproducible scoringTrain-set leakage, scorer drift
RAG / knowledge baseDocument, chunk, date, permission, citation anchorRetrievable, fresh, correctly permissioned, citable to sourceStale, over-permissioned, chunks that break meaning
MultimodalImage/audio/video, caption, alignment, licenceResolution, duration, alignment accuracy, scene coverageLikeness, voice, trademark, synthetic media
If the purpose is not written as input–output–judgement, labelling and evaluation both fall back to intuition.

↑ Back to contents

2 · Rights are not one column: copyright, contract, privacy and likeness are separate

“Publicly accessible” does not mean “may be trained on, commercialised and redistributed”. Web content may be copyrighted, databases may carry compilation rights, platform terms may restrict crawling and redistribution, personal data is constrained by privacy rules, and real people and voices raise likeness and personality rights. Each layer needs its own check; one “CC” or “public” label cannot cover them.

This page gives a checking order, not a legal conclusion for any use. Licences and use remain with authorisation documents, contracts, platform terms and applicable law. When unsure, stop using the batch before training, not after.

Rights layerQuestionDocument to readWhat does not substitute
CopyrightIs the text, image, audio or code protected; are copying, adaptation and commercial use allowedLicence, authorisation, source page“Publicly visible” or “credit given”
Database / compilationAre bulk extraction, reorganisation and redistribution restrictedPlatform terms, database licenceA licence for individual records
Contract / platform termsDo the API, crawler, download, cache and redistribution terms allow itTerms of service, API terms, signed contractTechnical accessibility
Personal dataDoes it contain identity, contact, health, location or biometric dataPrivacy notice, consent record, deletion mechanismA verbal claim that it is anonymised
Likeness / voice / personalityIs a real face, voice, name or persona identifiable; use, duration, territoryLikeness or voice release, consent, withdrawal termsBuying one photograph
Confidentiality / transferAre client data, internal documents and cross-border transfer allowedNDA, transfer assessment“Internal use first”
Publicly accessible is not the same as trainable, commercialisable and redistributable; check the three separately.

↑ Back to contents

3 · Provenance: every batch must trace to a version, a date and a licence

Provenance is not “the data came from the internet”. It needs at least a source URL or dataset identifier, retrieval time, HTTP status, licence snapshot, content hash, collector and parameters. Pages change, licences change and accounts disappear; without a snapshot, you cannot prove what was obtained six months later.

Store provenance separately from content: the data table holds content and hashes, the manifest holds source and licence, the log holds the collection process. Removing or replacing a record then does not require rewriting the table, and audits can filter problem batches by source, licence or date.

FieldWhy it is neededIf missing
Source URL / dataset IDReturn to the original page or versionCannot recheck licence or content
Retrieval time and statusDistinguish normal pages, redirects, 404s and paywallsError pages become training text
Licence snapshotProve which terms applied thenCannot explain after terms change
Consent / authorisationBasis for real people, clients and internal dataCannot prove the basis for use
Content hashDeduplication, version comparison, deletion trackingOne edit makes location impossible
Collector and parametersReproduce the same batchDifferent person or script yields different data
Deletion / withdrawal recordRemove from training sets, indexes and cachesData remains after rights are withdrawn
Data without a provenance snapshot is a liability, not an asset.

↑ Back to contents

4 · Cleaning: define what to keep before how hard to filter

Cleaning is not “make the data clean”; it is “make the retained data answer the purpose”. Fix encoding, boilerplate, navigation, duplicates, garbled text and mixed languages first. Handle personal data, toxicity, adult content and privacy leaks according to purpose and rules. Long-tail languages and minority expression must not be wiped out by one quality score.

Every filter needs sampled evidence: how much was removed, which records, why and what it did to the target distribution. “Two terabytes after cleaning” means nothing without saying what was lost between three and two.

Encoding and format
What to do: Normalise UTF-8, line endings, strip HTML, extract PDF text
Evidence: Parse-failure rate, sampled text

Boilerplate and navigation
What to do: Remove headers, menus, ads and repeated notices
Evidence: Template hit rate, residual sample

Language identification
What to do: Label primary language and mixed-language ratio
Evidence: Confusion matrix, short-text audit

Personal data
What to do: Detect names, phones, emails, IDs, addresses, biometrics
Evidence: Recall, false-positive rate, redaction log

Deduplication
What to do: Exact hashes plus near-duplicate detection
Evidence: Duplicate rate, samples of removed clusters

Quality filtering
What to do: Length, symbol ratio, repetition, perplexity, classifier score
Evidence: Retention by threshold, distribution shift

Safety filtering
What to do: Handle toxicity, adult, illegal and leaked content by purpose
Evidence: Hit types, human review, appeal path

Stronger filtering is not better. Write what must be kept before what must be removed.

↑ Back to contents

5 · Labelling: guideline, pilot, double annotation, adjudication, drift

Annotation quality is not “find smarter people”; it is “make two people reach the same judgement on the same item”. Write the guideline with boundary cases, counterexamples, required fields and forbidden inferences. Pilot 30–50 items, measure agreement and disputes, then double-annotate, adjudicate and audit. Scaling first only produces unexplainable labels.

Agreement metrics must fit the task: kappa or alpha for categories, ICC for continuous scales, Kendall’s tau for rankings. When agreement is low, revise the guideline and samples before blaming annotators. Keep a gold set and rerun it whenever annotators, model pre-labelling or guidelines change.

Guideline
Output: Boundary cases, counterexamples, fields, decision tree
Acceptance: A newcomer can label ten items independently

Pilot
Output: 30–50 items covering hard cases
Acceptance: Disagreement hotspots documented

Double annotation
Output: At least two independent labels per item
Acceptance: Agreement reaches the preset threshold

Adjudication
Output: A third person or rule resolves disputes
Acceptance: Rationale is traceable

Gold set
Output: Fixed, held out, boundary-heavy
Acceptance: Reruns after annotator or pre-label changes

Drift check
Output: Stratified audit by time, source and difficulty
Acceptance: Distribution drift alerts

Annotation is not a headcount problem. First make two people reach the same judgement on the same item.

↑ Back to contents

6 · Splits and contamination: train, validation and test are not a random cut

A random split lets the same entity, template or near-duplicate text appear in both training and test. Group by entity, time, source or user first, then split within groups; check near-duplicates across sets; compare public benchmarks at n-gram and item level. Otherwise a higher score only proves the model has seen the test.

Lock the test set: lock the file, the scorer and the preprocessing. Looking at it after every tuning run turns it into a validation set. Keep a holdout that never participated in selection, even if it is smaller.

Group by entity
Use when: Multiple samples per person, product or document
Guard against: Same entity across sets

Split by time
Use when: News, dialogue, transactions, logs
Guard against: Future leaking into past, distribution shift

Split by source
Use when: Multiple sites, vendors or devices
Guard against: Source-specific templates mistaken for capability

Split by user
Use when: Recommendation, personalisation, dialogue
Guard against: Same user behaviour across sets

Near-duplicate check
Use when: Web, code, papers, lyrics
Guard against: Paraphrase, translation, template variants

Benchmark contamination
Use when: Using public benchmarks
Guard against: Items, answers or rationales in training

A random cut is not a split. Group by entity, time or source first.

↑ Back to contents

7 · Versions and reproduction: lock data, code, config and environment together

Storing only the “final data” does not reproduce. Keep data hashes and manifests, cleaning and labelling code, split config, random seeds, dependency versions, hardware environment, licence snapshots and a changelog. A dataset card states purpose, sources, fields, size, languages, time range, known biases, prohibited uses and contact.

Do not version by date alone. A short data hash plus config version distinguishes two batches on the same day; every rebuild produces a new hash and old versions stay read-only. Dataset cards and model cards should reference each other, or a model incident cannot be traced back to training data.

Data content
Record: Per-file SHA-256 plus manifest hash
Reproduction use: Confirm the same batch

Cleaning / labelling code
Record: Git commit plus command
Reproduction use: Rerun the same processing

Split config
Record: Entity/time fields, ratios, seed
Reproduction use: Rebuild the same train/test sets

Dependencies and environment
Record: Lockfile, CUDA/driver, hardware
Reproduction use: Explain speed and numeric differences

Licence snapshot
Record: Terms text, date, source
Reproduction use: Prove the basis at the time

Changelog
Record: Adds, removes, edits, reason, impact
Reproduction use: Audit and rollback

Dataset card
Record: Purpose, sources, fields, biases, prohibited uses
Reproduction use: Boundary note for users

A data version that cannot be reproduced is not a version.

↑ Back to contents

8 · Privacy and deletion: minimise first, then discuss deletion

Personal data is not just names and phone numbers. Location traces, device IDs, chat context, faces, voiceprints, medical records and support logs can all identify someone. Minimise first: do not collect, store or transfer fields you do not need; for what remains, redact, restrict access, encrypt and set retention.

Deletion must propagate to training sets, indexes, caches, backups and derived data. There is no general guarantee that model weights “forget” a record; what you can do is stop further use, record provenance, remove it from retrieval, remove it from fine-tuning data and state the limit in the model card. Do not treat one retraining run as proof of deletion.

  • Minimise by field: do not collect, store or send fields the purpose does not need.
  • Handle direct and quasi-identifiers separately: names, phones, IDs, device IDs, location and time combinations can re-identify.
  • Separate access: annotation, training, evaluation and audit see different scopes; least privilege by default.
  • Put retention and deletion into contracts and a runbook; do not rely on someone remembering to delete.
  • State in the dataset and model cards that full forgetting is not guaranteed; separate retrieval-layer and fine-tuning-layer deletion paths.
Minimise before discussing deletion; there is no general guarantee of forgetting inside model weights.

↑ Back to contents

9 · Cost: price usable examples, not downloaded volume

The most underestimated data costs are labour and rework. Download and storage are cheap; cleaning, labelling, QA, legal review and rework are not. A batch cut from three terabytes to two may yield only a few hundred thousand usable records. Quote and schedule per accepted usable example, with annotation rounds, rework rate and review time written in.

Split cost into one-off and ongoing: one-off covers collection, cleaning, labelling and evaluation-set construction; ongoing covers refresh, deduplication, drift monitoring, deletion requests and licence review. Counting only the one-off leaves maintenance to surprise you after launch.

Acquisition / licensing
Unit: Batch / contract
Why it runs away: Scattered sources, term-by-term negotiation
Control: Source list and priority first

Storage / transfer
Unit: GB per month
Why it runs away: Keeping raw, intermediate and derived copies
Control: Tiered storage and retention

Cleaning
Unit: Hours per 10k records
Why it runs away: Rules change repeatedly without sampling
Control: Pilot on a small batch before scaling

Labelling
Unit: Items per round
Why it runs away: Unclear guideline, double annotation becomes many
Control: Pilot and agreement threshold

QA
Unit: Audit rate
Why it runs away: Totals checked without stratification
Control: Stratify by source, difficulty and time

Rework
Unit: Rounds per batch
Why it runs away: Acceptance criteria change late
Control: Acceptance table plus change order

Legal / compliance
Unit: Review per batch
Why it runs away: Only after an incident
Control: Check by rights layer before launch

Cost per usable example; downloaded volume is not throughput.

↑ Back to contents

10 · Failure branches: stop the batch, locate the cause, do not train first

Once a data problem enters training, the fix cost multiplies. When a licence is unclear, provenance is broken, labels drift, test data leaks or personal data appears, isolate the batch first, then locate whether the cause is collection, cleaning, labelling, splitting or versioning. Do not trade a temporary schedule gain for “train one version and see”.

Unclear licence
Check first: Source, terms snapshot, scope
Likely cause: URL saved without terms
Fix: Stop the batch; add authorisation or replace

Many duplicates
Check first: Exact/near-duplicate rate, source concentration
Likely cause: Syndication, template copying
Fix: Deduplicate clusters, keep representatives

Label drift
Check first: Guideline version, annotator, time
Likely cause: Guideline changed without relabelling
Fix: Rerun gold set, rework under new guideline

Suspiciously high score
Check first: Train/test overlap, near-duplicates, benchmark contamination
Likely cause: Random split or leaked items
Fix: Rebuild grouped splits, decontaminate, retest

Personal data present
Check first: Fields, detector recall, human audit
Likely cause: Regex-only redaction
Fix: Isolate, redact, re-audit, log deletion

Severe class imbalance
Check first: Distribution by source and difficulty
Likely cause: Cleaning removed the minority class
Fix: Stratify, resample or reweight

Source page gone
Check first: Snapshot, hash, mirror
Likely cause: Only the URL was stored
Fix: Check the snapshot; remove if unverifiable

Isolate the batch first. Training one version only writes the problem into the weights.

↑ Back to contents

11 · A minimum path: from purpose sentence to reproducible dataset card

This path fits a batch intended for fine-tuning, evaluation or RAG. Each step leaves evidence before the next begins.

  • Write the purpose sentence: input, output, judgement, use case and what it will not do.
  • List sources and rights: source, terms, authorisation, consent, territory, duration and prohibited uses.
  • Build provenance: URL/ID, retrieval time, status, licence snapshot, hash and collection parameters.
  • Pilot cleaning: encoding, boilerplate, language, PII, deduplication, quality and safety filtering; record retention.
  • Write the labelling guideline and pilot 30–50 items: boundary cases, counterexamples, agreement, disputes.
  • Annotate and adjudicate: double annotation, gold set, audit, drift log.
  • Grouped splits and contamination checks: entity/time/source groups, near-duplicate and benchmark comparison.
  • Lock versions: data hash, code, config, seed, environment, licence snapshot, changelog.
  • Write the dataset card and deliver: purpose, sources, fields, size, biases, prohibited uses and deletion path.
  • Monitor after launch: duplicate rate, distribution drift, source failure, deletion requests, licence changes.
The minimum path is not the fastest path; it is the shortest reproducible, auditable and deletable loop.

↑ Back to contents

Sources and further reading

These links are for checking facts, licences and official scope. External pages may change; cite the original text and check date.

Next

If you get stuck while following it, go back to the matching route instead of rereading the whole guide.

← Back to home Spot an error? Send a correction