{"course":{"slug":"hugging-face","title":"Hugging Face, End to End","url":"https://addaly.com/learn/hugging-face","level":"intermediate","track":"create"},"lesson":{"slug":"dataset-cards-and-provenance","title":"The card is where a dataset stops being a file","url":"https://addaly.com/learn/hugging-face/dataset-cards-and-provenance","position":44,"of":75,"minutes":8,"answer":"A dataset card's job is provenance (where rows came from, under what terms, labelled by whom, with what agreement) because a licence tag cannot grant rights the compiler never held.","keyIdea":"A dataset card's job is provenance (where rows came from, under what terms, labelled by whom, with what agreement) because a licence tag cannot grant rights the compiler never held, and a dataset without recorded provenance can never be assessed against whatever the law turns out to be."},"body":{"format":"markdown","text":"## What a dataset card has to answer\n\nA model card answers \"what will this do\". A dataset card answers something harder: \"where did this come from, and what am I allowed and likely to get wrong with it\". Four questions carry most of the weight.\n\n**Where did the rows come from?** Scraped, licensed, generated by a model, written by annotators, donated by users. This single sentence determines legality, bias and whether a benchmark is contaminated. A card that will not say is telling you something.\n\n**What is the licence, and does it match the source?** A dataset scraped from a site with restrictive terms does not become permissive because its uploader ticked Apache 2.0. The rights a dataset can grant are bounded by the rights its compiler held. Where a card's licence and its described origin disagree, the disagreement is the finding.\n\n**Who or what labelled it?** Crowd workers paid per item, domain experts, automatic rules, or another model. Each produces a different error profile. Labels from a model carry that model's biases into anything you train, and if the labelling model is the one you later benchmark against, your evaluation is circular.\n\n**What is in it that you would not expect?** Duplicates, a dominant language, a date range, a skewed source mix, offensive content. The best cards state this plainly; most do not state it at all.\n\n## The structured part\n\nThe front matter is YAML, and it is what the Hub indexes:\n\n```yaml\n---\nlicense: cc-by-4.0\nlanguage:\n  - hi\n  - en\ntask_categories:\n  - text-classification\nsize_categories:\n  - 10K<n<100K\nannotations_creators:\n  - expert-generated\nsource_datasets:\n  - original\nconfigs:\n  - config_name: default\n    data_files:\n      - split: train\n        path: data/train-*.parquet\n---\n```\n\n`configs` is the functional part: it tells `load_dataset` which files belong to which split, which is why a well-configured repository loads with no arguments.\n\n## Writing the prose half\n\nA usable card, in order:\n\n1. **One sentence** saying what a row is. \"Each row is a customer support message in Hindi or English with an intent label from a fixed set of nine.\"\n2. **Collection.** When, from where, by what method, over what period.\n3. **Labelling.** Who, with what instructions, and (the number almost nobody publishes) the **inter-annotator agreement**. If two labellers agreed on 78% of items, no model trained on it should be expected to exceed that by much, and knowing 78% before you start saves you weeks of chasing a ceiling.\n4. **Splits**, with counts and how they were made. Say if the split is random, and say if it is by time or by document, because that choice decides whether your evaluation is honest.\n5. **Known problems.** Duplicates left in, a class that is mostly one source, text that is machine-translated, a date range that stops.\n6. **Personal data**, and what was done about it.\n7. **What it should not be used for.** The most useful section and the rarest.\n\n## The contamination note\n\nIf your dataset contains text that appears in common web crawls, and almost anything published before 2023 does, then models trained on the web may have seen it. Say so. A benchmark that has leaked into pretraining corpora still has uses, and reporting a number on it as though it were held out is misleading. This is unresolved across the field, not a solved problem with a checkbox, and the honest position is disclosure rather than a claim of cleanliness.\n\n## The legal shape, stated honestly\n\nWhether training a model on copyrighted material is permitted differs by country and is actively contested. Several jurisdictions have text-and-data-mining exceptions with conditions attached; others do not; litigation is ongoing in more than one. Nothing here is legal advice and nobody writing a dataset card can resolve it.\n\nWhat you can do is make the question answerable by somebody qualified: record the source of every row, record the terms under which you obtained it, keep a `source` column, and keep the date. A dataset whose provenance is documented can be assessed later under whatever the law turns out to be. A dataset whose provenance was never recorded cannot be, and that is the failure that closes doors.\n\n## Do this now\n\nOpen the card of a dataset you have used and try to answer the four questions at the top of this lesson. If you cannot answer two of them, you do not know what you trained on, and that is a finding worth writing down before the next run."},"check":{"question":"A dataset card declares Apache 2.0 while describing rows scraped from a site whose terms forbid redistribution. How should this be read?","options":[{"text":"The declared licence governs, since the uploader assumed the legal risk by publishing under it.","correct":false,"tempting":"Treats a declaration as a transfer of risk to the publisher, which does not protect a downstream user."},{"text":"Scraping publicly accessible pages places the content outside the original terms, so the tag is consistent.","correct":false,"tempting":"Assumes public accessibility settles the question, which is exactly what is contested across jurisdictions."},{"text":"The tag cannot grant rights the compiler did not hold, so the licence and the stated origin conflict.","correct":true},{"text":"Only the source site can raise an objection, so the licence is valid for anyone who is not that site.","correct":false,"tempting":"Confuses who is likely to complain with what permissions actually exist."}]},"prev":{"slug":"building-your-own-dataset","title":"Turning your files into a dataset","url":"https://addaly.com/learn/hugging-face/building-your-own-dataset"},"next":{"slug":"audio-and-image-datasets","title":"Media columns decode when you touch them","url":"https://addaly.com/learn/hugging-face/audio-and-image-datasets"},"authorship":"Founder and series editor: Dr Mustafa Mun. Written by AI models to a written standard. Exam keys checked blind by a second model: 3,665 of 3,666 agreed. Academic review invited.","review":{"status":"Draft, open for academic review"},"cite":"Addaly (2026) 'The card is where a dataset stops being a file', in Hugging Face, End to End. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/hugging-face/dataset-cards-and-provenance (Accessed: 13 October 2026).","licence":{"name":"CC BY-NC-SA 4.0","url":"https://creativecommons.org/licenses/by-nc-sa/4.0/"},"reader":{"schema":1,"title":"The card is where a dataset stops being a file","courseTitle":"Hugging Face, End to End","module":{"index":5,"slug":"datasets-and-the-work-before-the-model","title":"Datasets, and the work that happens before any model"},"answer":null,"keyIdea":"A dataset card’s job is provenance (where rows came from, under what terms, labelled by whom, with what agreement) because a licence tag cannot grant rights the compiler never held, and a dataset without recorded provenance can never be assessed against whatever the law turns out to be.","hero":{"kind":"plate","image":null,"alt":null,"caption":null},"blocks":[{"t":"h2","id":"what-a-dataset-card-has-to-answer","runs":[{"text":"What a dataset card has to answer"}]},{"t":"p","runs":[{"text":"A model card answers “what will this do”. A dataset card answers something harder: “where did this come from, and what am I allowed and likely to get wrong with it”. Four questions carry most of the weight."}]},{"t":"p","runs":[{"text":"Where did the rows come from?","b":true},{"text":" Scraped, licensed, generated by a model, written by annotators, donated by users. This single sentence determines legality, bias and whether a benchmark is contaminated. A card that will not say is telling you something."}]},{"t":"p","runs":[{"text":"What is the licence, and does it match the source?","b":true},{"text":" A dataset scraped from a site with restrictive terms does not become permissive because its uploader ticked Apache 2.0. The rights a dataset can grant are bounded by the rights its compiler held. Where a card’s licence and its described origin disagree, the disagreement is the finding."}]},{"t":"p","runs":[{"text":"Who or what labelled it?","b":true},{"text":" Crowd workers paid per item, domain experts, automatic rules, or another model. Each produces a different error profile. Labels from a model carry that model’s biases into anything you train, and if the labelling model is the one you later benchmark against, your evaluation is circular."}]},{"t":"p","runs":[{"text":"What is in it that you would not expect?","b":true},{"text":" Duplicates, a dominant language, a date range, a skewed source mix, offensive content. The best cards state this plainly; most do not state it at all."}]},{"t":"h2","id":"the-structured-part","runs":[{"text":"The structured part"}]},{"t":"p","runs":[{"text":"The front matter is YAML, and it is what the Hub indexes:"}]},{"t":"code","lang":"yaml","label":"YAML","text":"---\nlicense: cc-by-4.0\nlanguage:\n  - hi\n  - en\ntask_categories:\n  - text-classification\nsize_categories:\n  - 10K<n<100K\nannotations_creators:\n  - expert-generated\nsource_datasets:\n  - original\nconfigs:\n  - config_name: default\n    data_files:\n      - split: train\n        path: data/train-*.parquet\n---"},{"t":"p","runs":[{"text":"configs","code":true},{"text":" is the functional part: it tells "},{"text":"load_dataset","code":true},{"text":" which files belong to which split, which is why a well-configured repository loads with no arguments."}]},{"t":"h2","id":"writing-the-prose-half","runs":[{"text":"Writing the prose half"}]},{"t":"p","runs":[{"text":"A usable card, in order:"}]},{"t":"ol","start":1,"items":[[{"text":"One sentence","b":true},{"text":" saying what a row is. “Each row is a customer support message in Hindi or English with an intent label from a fixed set of nine.”"}],[{"text":"Collection.","b":true},{"text":" When, from where, by what method, over what period."}],[{"text":"Labelling.","b":true},{"text":" Who, with what instructions, and (the number almost nobody publishes) the "},{"text":"inter-annotator agreement","b":true},{"text":". If two labellers agreed on 78% of items, no model trained on it should be expected to exceed that by much, and knowing 78% before you start saves you weeks of chasing a ceiling."}],[{"text":"Splits","b":true},{"text":", with counts and how they were made. Say if the split is random, and say if it is by time or by document, because that choice decides whether your evaluation is honest."}],[{"text":"Known problems.","b":true},{"text":" Duplicates left in, a class that is mostly one source, text that is machine-translated, a date range that stops."}],[{"text":"Personal data","b":true},{"text":", and what was done about it."}],[{"text":"What it should not be used for.","b":true},{"text":" The most useful section and the rarest."}]]},{"t":"h2","id":"the-contamination-note","runs":[{"text":"The contamination note"}]},{"t":"p","runs":[{"text":"If your dataset contains text that appears in common web crawls, and almost anything published before 2023 does, then models trained on the web may have seen it. Say so. A benchmark that has leaked into pretraining corpora still has uses, and reporting a number on it as though it were held out is misleading. This is unresolved across the field, not a solved problem with a checkbox, and the honest position is disclosure rather than a claim of cleanliness."}]},{"t":"h2","id":"the-legal-shape-stated-honestly","runs":[{"text":"The legal shape, stated honestly"}]},{"t":"p","runs":[{"text":"Whether training a model on copyrighted material is permitted differs by country and is actively contested. Several jurisdictions have text-and-data-mining exceptions with conditions attached; others do not; litigation is ongoing in more than one. Nothing here is legal advice and nobody writing a dataset card can resolve it."}]},{"t":"p","runs":[{"text":"What you can do is make the question answerable by somebody qualified: record the source of every row, record the terms under which you obtained it, keep a "},{"text":"source","code":true},{"text":" column, and keep the date. A dataset whose provenance is documented can be assessed later under whatever the law turns out to be. A dataset whose provenance was never recorded cannot be, and that is the failure that closes doors."}]},{"t":"h2","id":"do-this-now","runs":[{"text":"Do this now"}],"role":"try"},{"t":"p","runs":[{"text":"Open the card of a dataset you have used and try to answer the four questions at the top of this lesson. If you cannot answer two of them, you do not know what you trained on, and that is a finding worth writing down before the next run."}]}],"check":{"question":[{"text":"A dataset card declares Apache 2.0 while describing rows scraped from a site whose terms forbid redistribution. How should this be read?"}],"options":[{"text":[{"text":"The declared licence governs, since the uploader assumed the legal risk by publishing under it."}],"correct":false,"tempting":[{"text":"Treats a declaration as a transfer of risk to the publisher, which does not protect a downstream user."}]},{"text":[{"text":"Scraping publicly accessible pages places the content outside the original terms, so the tag is consistent."}],"correct":false,"tempting":[{"text":"Assumes public accessibility settles the question, which is exactly what is contested across jurisdictions."}]},{"text":[{"text":"The tag cannot grant rights the compiler did not hold, so the licence and the stated origin conflict."}],"correct":true,"tempting":null},{"text":[{"text":"Only the source site can raise an objection, so the licence is valid for anyone who is not that site."}],"correct":false,"tempting":[{"text":"Confuses who is likely to complain with what permissions actually exist."}]}],"order":[1,2,0,3],"why":null},"prev":{"slug":"building-your-own-dataset","title":"Turning your files into a dataset","minutes":9},"next":{"slug":"audio-and-image-datasets","title":"Media columns decode when you touch them","minutes":8}}}