Quick reference
Dataset preparation checklist
- State the task: prediction target, intended users, and unacceptable errors.
- Inventory sources: license, consent, provenance, date range, language/domain mix, and sensitive-data risks.
- Define one example: inputs (features), target/label if any, identifier, and metadata.
- Split early: train for fitting, validation for decisions, test for one final unbiased estimate. Group or time-based splits may be required.
- Clean reproducibly: remove corrupt items and PII as appropriate; normalize only using training-set statistics; deduplicate before or within split policy.
- Transform: encode categories/numbers for conventional ML; tokenize and create shifted labels/masks for LLMs.
- Audit: inspect examples, distributions, duplicates, leakage, coverage, and benchmark contamination.
- Version and document: preserve code, dataset version, split seed/rules, and a datasheet.
Feature vs. learned representation
In conventional ML, a feature is usually an input column deliberately selected or engineered, such as price, age, or word count. In an LLM, tokens are inputs; the useful internal features are learned representations produced by the model's layers, not a hand-built spreadsheet of language properties.
Sources: Gebru et al. (2021); Hugging Face Datasets documentation.