Methods noteData services

How to specify a training dataset before anyone builds it

How to create a dataset for LLM training starts with a written specification: the use, sources and rights, fields and labels, format, coverage, size, held-out data and acceptance tests.

Cover of the full report: How to specify a training dataset before anyone builds it
The research behind this article, with every source listed. 20 pages.

Key points

From the Summary of the full report

  1. Writing data requirements before collection is published practice. Datasheets for Datasets asks creators to read its composition questions "prior to any data collection" [1], and a dataset requirements specification comes first of five documents adapted from software development [2].
  2. Data problems often surface late. In interviews with 53 practitioners in high-stakes fields, 92% reported at least one data cascade, a chain of compounding downstream effects from data issues, and 45.3% reported two or more in a project [3].
  3. Licenses and terms need checking at the original source. An audit of 1,858 fine-tuning datasets found over 70% of licenses for popular datasets on two hosting platforms unspecified [9], and restrictions on web sources rose quickly within one year, 2023 to 2024 [10].
  4. How records and labels are written belongs in the specification. In one dataset where each example pairs two sentences, a classifier that read only the second sentence predicted the label about 67% of the time [13], and ten widely used test sets carry at least 3.3% label errors on average [12].

The first step in how to create a dataset for LLM training is a document, written before anyone collects a record. It states what the data is for, which sources are in scope and on what terms, what each record holds, the file format, how much data is needed, which records are held out for evaluation and how the delivered set is accepted. Datasheets for Datasets asks dataset creators to read its composition questions "prior to any data collection" and to answer them once collection is complete [1].

Data problems found late are common. In interviews with 53 practitioners in high-stakes fields, 92% reported at least one data cascade, the study's term for "compounding events causing negative, downstream effects from data issues", and 45.3% reported two or more in a project [3]. The authors describe cascades as "delayed" and "often avoidable" [3].

How to create a dataset for LLM training: write the specification first

Hutchinson and colleagues (FAccT 2021) adapt five documents from software development to datasets [2]. The dataset requirements specification comes first, then a design document, an implementation diary, a testing report and a maintenance plan [2]. Their template covers the vision, intended and non-intended uses, two or three mock records, where the data comes from, the numbers and types of instances, sampling, processing, maintenance, sharing and a changelog [2].

Other templates cover the same ground. Datasheets for Datasets asks 57 questions in seven sections (counted for this note) [1]. Data Cards document 31 themes whose importance varies by task [4]. Data statements for language data open with a curation rationale: which texts were included and why [5].

Start from the use

The specification opens with the task the data serves. Datasheets asks "For what purpose was the dataset created?" [1], and Hutchinson's template names intended and non-intended uses [2]. ISO/IEC 5259-2 ties each data quality requirement to a "data usage scope", with acceptance criteria that "can be quantitative or qualitative" [8].

For high-risk systems, Article 10 of the EU AI Act requires training, validation and testing data sets to be "relevant, sufficiently representative" and, as far as possible, "free of errors and complete in view of the intended purpose" [6]. One model provider's fine-tuning guide asks for evaluations to be set up before any fine-tuning, so that improvement over a base model can be measured [15].

Name the source universe and the rights

List each source in scope and each one left out, with the terms that apply to it, read at the original source. An audit of 1,858 fine-tuning datasets in 44 collections found over 70% of licenses for popular datasets on two hosting platforms "Unspecified", and three platforms gave licenses that were too permissive 16% to 29% of the time [9]. Terms also move. An audit of 14,000 web domains found that restrictions added in one year, 2023 to 2024, left roughly 5% or more of all tokens in the C4 corpus, or "28%+ of the most actively maintained, critical sources in C4", fully restricted [10].

The European Commission's template for public summaries of training content sorts sources into six categories: publicly available datasets, private datasets obtained from third parties, data crawled from online sources, user data, synthetic data and other sources [11]. The same list works as a checklist, with a date on each entry. Record whether synthetic records are allowed, their share and how they were made. A Nature study found that indiscriminate training on model-generated content causes defects in which the tails of the original distribution disappear [28]. Provenance at the record level is the subject of datasets that state their limits. This note is research and gives no legal advice.

Define entities, fields and labels

Write the record schema: each entity type that must resolve and join across sources, each required field and each label with its definition. How records are matched is set out in how entity resolution matches records across sources.

Labeling instructions belong in the specification, because they shape the data. In two natural language inference datasets, where each example pairs a premise with a hypothesis sentence, a simple classifier that read only the hypothesis predicted the label for about 67% of SNLI and 53% of MultiNLI examples, because the protocol used to write them left clues [13]. Models also picked up traits of the people who wrote the examples and generalized poorly to new writers, so Geva and colleagues recommend that test set annotators be disjoint from training set annotators [14]. Test sets carry label errors too, an average of at least 3.3% across ten widely used datasets [12].

LLM training dataset format

Format follows the training method. One model provider's fine-tuning guide asks for JSON Lines, "one complete JSON structure on every line", in a chat format, with at least 10 lines [15]. One open-source training library separates the format, standard or conversational, from the type, such as prompt-only, prompt-completion or preference, and defines each type by its columns: a preference record has "prompt", "chosen" and "rejected" [16]. Croissant, an MLCommons vocabulary in JSON-LD, describes delivered files with their checksums, record sets and typed fields [17].

State coverage, history and geography

Name the time range, the languages and the regions, and tie each to the period and place the model serves. In a study of 28 pretrained models, a time gap between pretraining and evaluation data lowered performance, and fine-tuning did not overcome it [18]. Check language on a read sample: an audit of 205 language corpora from five public datasets found at least 15 with no usable text, and many mislabeled [19]. For high-risk systems, Article 10(4) of the EU AI Act requires data sets to take into account the geographical, contextual, behavioural or functional setting of use, as far as the intended purpose requires [6].

Write each cleaning filter down and ask for a sample of what it removed. In the C4 corpus, a blocklist removed African American English and Hispanic-aligned English at 42% and 32%, against 6.2% and 7.2% for White-aligned and other English [20]. In the FineWeb study, global deduplication of a 2013 crawl kept 10% of its data, and that 10% was of worse quality than the 90% removed [27].

LLM fine-tuning dataset size

State size as a range tied to the job, and count unique records apart from repeats. One provider's guide sets a minimum of 10 examples, reports gains from 50 to 100 and suggests starting with 50 well-crafted demonstrations [15]. The LIMA study tuned a 65-billion-parameter open model on 1,000 curated examples, about 750,000 tokens [21]. In its ablations, doubling the training set did not improve response quality, while more diverse and higher-quality data did [21].

Pretraining is another scale. Compute-optimal estimates grow tokens with model size, to 20.2 billion tokens for a model of 1 billion parameters [22]. Up to four epochs of repeated data changed loss little against unique data [23].

Hold out evaluation data in the specification

Fix the evaluation split before collection and remove its near duplicates from the training set. In one study, 4.6% of the C4 validation set and 14.4% of the RealNews validation set had an approximate duplicate in training, which can inflate scores [24]. C4 also contains examples from other benchmark datasets [20]. A review of data leakage in research using machine learning found errors in 329 papers across 17 fields [25].

Size the split for the smallest difference you need to detect. Typical test sets of 2,000 sentences have about 75% power to detect a difference of 1 BLEU point on a translation task [26]. Contamination in agent tests is covered in what agent benchmarks measure, and what they miss.

Write acceptance criteria you can test

Hutchinson and colleagues call this step requirements testing, or acceptance testing [2]. Ideal tests return pass or fail, and requirements should be traceable and in many cases measurable [2]. Write each criterion as a measure, a threshold and a sample size: completeness of required fields, label accuracy on a reviewed sample, the near-duplicate rate against the held-out split. The Open Data Contract Standard lets quality rules be library metrics, such as row counts and null values, each with an operator that checks the expected range [31].

Acceptance sampling decides whether a delivery is likely acceptable. It does not estimate its quality [29]. A reviewed sample of 100 records with no errors still allows a true error rate up to 3.62% at 95% confidence (two-sided), and 1,000 clean records bring that limit to 0.37% (exact binomial method, derived) [30]. Scoring rules for each field and intervals for small samples are worked through in how to test document extraction accuracy before you buy.

Plan refresh, versions and delivery

Datasheets asks whether a dataset is updated, how often and by whom, and whether older versions stay available [1]. Hutchinson's maintenance plan asks how stale data is detected and fixed [2]. The specification sets the refresh cadence, what a source change triggers, how versions are numbered and which documents travel with each version.

Rillor's custom datasets service scopes, builds and keeps current training and evaluation data to the requirement a client sets, and each dataset comes with its schema, records with resolved identities, source provenance, lineage, version history, quality notes and stated limits.

Read the full report

The full report describes the published templates, gives the evidence and limits for each line of the specification, adds a checklist with the test for each line and an interval table for acceptance samples, and lists the sources.

The full report

How to specify a training dataset before anyone builds it

The research behind this article, with every source listed. 20 pages.

  1. Summary
  2. Background
  3. Method
  4. Findings
  5. Implications
  6. Limits of this analysis
  7. Sources

Sources

  1. Datasheets for Datasets. Timnit Gebru, Jamie Morgenstern, Briana Vecchione and others, Communications of the ACM, arXiv 1803.09010, version 8, 1 December 2021, viewed 7 November 2026. https://arxiv.org/abs/1803.09010
  2. Towards Accountability for Machine Learning Datasets: Practices from Software Engineering and Infrastructure. Ben Hutchinson, Andrew Smart, Alex Hanna and others, FAccT 2021, arXiv 2010.13561, version 2, 30 January 2021, viewed 7 November 2026. https://arxiv.org/abs/2010.13561
  3. "Everyone wants to do the model work, not the data work": Data Cascades in High-Stakes AI. Nithya Sambasivan, Shivani Kapania, Hannah Highfill and others, CHI 2021, Google Research, May 2021, viewed 7 November 2026. https://research.google/pubs/everyone-wants-to-do-the-model-work-not-the-data-work-data-cascades-in-high-stakes-ai/
  4. Data Cards: Purposeful and Transparent Dataset Documentation for Responsible AI. Mahima Pushkarna, Andrew Zaldivar and Oddur Kjartansson, FAccT 2022, arXiv 2204.01075, 3 April 2022, viewed 7 November 2026. https://arxiv.org/abs/2204.01075
  5. Data Statements for Natural Language Processing: Toward Mitigating System Bias and Enabling Better Science. Emily M. Bender and Batya Friedman, Transactions of the Association for Computational Linguistics, volume 6, 2018, viewed 7 November 2026. https://aclanthology.org/Q18-1041/
  6. Regulation (EU) 2024/1689 (AI Act), Article 10: Data and data governance, consolidated text as at 27 July 2026. European Commission, AI Act Service Desk, viewed 7 November 2026. https://ai-act-service-desk.ec.europa.eu/en/ai-act/article-10
  7. ISO/IEC 5259-2:2024, Artificial intelligence: Data quality for analytics and machine learning (ML), Part 2: Data quality measures, first edition. ISO/IEC, November 2024, preview sample via iTeh Standards, viewed 7 November 2026. https://cdn.standards.iteh.ai/samples/81860/6ac019c359644309afa716572bb73edc/ISO-IEC-5259-2-2024.pdf
  8. The Data Provenance Initiative: A Large Scale Audit of Dataset Licensing & Attribution in AI. Shayne Longpre, Robert Mahari, Anthony Chen and others, arXiv 2310.16787, version 3, 4 November 2023, viewed 7 November 2026. https://arxiv.org/abs/2310.16787
  9. Consent in Crisis: The Rapid Decline of the AI Data Commons. Shayne Longpre, Robert Mahari, Ariel Lee and others, arXiv 2407.14933, version 2, 24 July 2024, viewed 7 November 2026. https://arxiv.org/abs/2407.14933
  10. Explanatory Notice and Template for the Public Summary of Training Content for general-purpose AI models. European Commission, AI Office, 24 July 2025 (Communication C(2025) 8311 final, 5 December 2025), viewed 7 November 2026. https://digital-strategy.ec.europa.eu/en/library/explanatory-notice-and-template-public-summary-training-content-general-purpose-ai-models
  11. Pervasive Label Errors in Test Sets Destabilize Machine Learning Benchmarks. Curtis G. Northcutt, Anish Athalye and Jonas Mueller, NeurIPS 2021 Datasets and Benchmarks, arXiv 2103.14749, version 4, 7 November 2021, viewed 7 November 2026. https://arxiv.org/abs/2103.14749
  12. Annotation Artifacts in Natural Language Inference Data. Suchin Gururangan, Swabha Swayamdipta, Omer Levy and others, NAACL 2018, arXiv 1803.02324, version 2, 16 April 2018, viewed 7 November 2026. https://arxiv.org/abs/1803.02324
  13. Are We Modeling the Task or the Annotator? An Investigation of Annotator Bias in Natural Language Understanding Datasets. Mor Geva, Yoav Goldberg and Jonathan Berant, EMNLP-IJCNLP 2019, arXiv 1908.07898, version 2, 28 August 2019, viewed 7 November 2026. https://arxiv.org/abs/1908.07898
  14. Supervised fine-tuning. OpenAI, API documentation, viewed 7 November 2026. https://developers.openai.com/api/docs/guides/supervised-fine-tuning
  15. Dataset formats and types. Hugging Face, TRL documentation, viewed 7 November 2026. https://huggingface.co/docs/trl/dataset_formats
  16. Croissant Format Specification, version 1.0. Omar Benjelloun, Elena Simperl, Pierre Marcenac and others, MLCommons, 1 March 2024, viewed 7 November 2026. https://docs.mlcommons.org/croissant/docs/croissant-spec.html
  17. A Pretrainer's Guide to Training Data: Measuring the Effects of Data Age, Domain Coverage, Quality, & Toxicity. Shayne Longpre, Gregory Yauney, Emily Reif and others, arXiv 2305.13169, version 2, 13 November 2023, viewed 7 November 2026. https://arxiv.org/abs/2305.13169
  18. Quality at a Glance: An Audit of Web-Crawled Multilingual Datasets. Julia Kreutzer, Isaac Caswell, Lisa Wang and others, Transactions of the Association for Computational Linguistics 10, 2022, arXiv 2103.12028, version 4, 21 February 2022, viewed 7 November 2026. https://arxiv.org/abs/2103.12028
  19. Documenting Large Webtext Corpora: A Case Study on the Colossal Clean Crawled Corpus. Jesse Dodge, Maarten Sap, Ana Marasović and others, EMNLP 2021, arXiv 2104.08758, version 2, 30 September 2021, viewed 7 November 2026. https://arxiv.org/abs/2104.08758
  20. LIMA: Less Is More for Alignment. Chunting Zhou, Pengfei Liu, Puxin Xu and others, arXiv 2305.11206, 18 May 2023, viewed 7 November 2026. https://arxiv.org/abs/2305.11206
  21. Training Compute-Optimal Large Language Models. Jordan Hoffmann, Sebastian Borgeaud, Arthur Mensch and others, arXiv 2203.15556, 29 March 2022, viewed 7 November 2026. https://arxiv.org/abs/2203.15556
  22. Scaling Data-Constrained Language Models. Niklas Muennighoff, Alexander M. Rush, Boaz Barak and others, arXiv 2305.16264, version 5, 28 June 2025, viewed 7 November 2026. https://arxiv.org/abs/2305.16264
  23. Deduplicating Training Data Makes Language Models Better. Katherine Lee, Daphne Ippolito, Andrew Nystrom and others, ACL 2022, arXiv 2107.06499, version 2, 24 March 2022, viewed 7 November 2026. https://arxiv.org/abs/2107.06499
  24. Leakage and the Reproducibility Crisis in ML-based Science. Sayash Kapoor and Arvind Narayanan, arXiv 2207.07048, 14 July 2022, viewed 7 November 2026. https://arxiv.org/abs/2207.07048
  25. With Little Power Comes Great Responsibility. Dallas Card, Peter Henderson, Urvashi Khandelwal and others, EMNLP 2020, arXiv 2010.06595, 13 October 2020, viewed 7 November 2026. https://arxiv.org/abs/2010.06595
  26. The FineWeb Datasets: Decanting the Web for the Finest Text Data at Scale. Guilherme Penedo, Hynek Kydlíček, Loubna Ben allal and others, arXiv 2406.17557, version 2, 31 October 2024, viewed 7 November 2026. https://arxiv.org/abs/2406.17557
  27. AI models collapse when trained on recursively generated data. Ilia Shumailov, Zakhar Shumaylov, Yiren Zhao and others, Nature 631, 755-759, 24 July 2024, viewed 7 November 2026. https://www.nature.com/articles/s41586-024-07566-y
  28. NIST/SEMATECH e-Handbook of Statistical Methods, section 6.2.1: What is Acceptance Sampling? National Institute of Standards and Technology, viewed 7 November 2026. https://www.itl.nist.gov/div898/handbook/pmc/section2/pmc21.htm
  29. NIST/SEMATECH e-Handbook of Statistical Methods, section 7.2.4.1: Confidence intervals. National Institute of Standards and Technology, viewed 7 November 2026. https://www.itl.nist.gov/div898/handbook/prc/section2/prc241.htm
  30. Open Data Contract Standard, Data Quality. Bitol, version 3, viewed 7 November 2026. https://bitol-io.github.io/open-data-contract-standard/latest/data-quality/

Tell us what your data must cover.

Send the question the data should answer, the sources you know of, the coverage you need and how often it should update.

Outline a dataset