Licensing, Consent, and Data-Use Signals
Build auditable data-use pipelines: model licences as obligations, apply SPDX and RFC 9309, and record why each document was allowed, reviewed, or excluded.
Language AI HandbookAll chapters Licensing, Consent, and Data Use Signals
Your crawler has already fetched 900 million pages. One page comes from a site whose robots.txt welcomes crawlers, whose footer declares CC BY-NC 4.0, and whose terms prohibit commercial exploitation. The author lives in Germany and the domain appears on a do-not-train registry. Those signals leave open several questions. Who controls the rights, which law governs the use, and did the rightsholder make an effective reservation for text and data mining?
What do you do with those bytes?
This chapter is about answering that question at scale, repeatably, and in a way you can defend eighteen months later when someone asks why a particular document was in the training set. The legal reasoning matters, but the engineering problem is different and harder in its own way: the signals are heterogeneous, partial, frequently contradictory, and they change after you have already acted on them. A document that was unambiguously free to train on in 2021 may be covered by a reservation of rights in 2024, and the reservation will arrive without any mechanism for undoing the copies you already made. A page whose footer declares a permissive licence may sit on a host whose terms of service forbid scraping, so that the licence and the contract point in opposite directions. A single sentence of German statutory text may permit the exact re-use that a footer three lines down purports to exclude. Handling this well is less about knowing the statute than about building a record that can survive scrutiny from the lawyers, from a regulator, and from your own future self.
Any machine-readable or human-readable artifact that bears on whether you may use a specific item for a particular purpose. A licence statement, a crawler rule, a contract clause, a statute, a registry entry and a signed credential can all be signals. Seeing one tells you what to check. An operative grant or an applicable statutory exception may supply the legal basis for the use.
Start by recording who asserted a licence. A CC BY 4.0 string in an HTML footer tells you that someone made the assertion. It is not proof that the person had the right to grant it, that the grant covers your use, or that the assertion is still in force. A pipeline that treats signal strings as permissions will produce a dataset that is confidently wrong. Consider what "confidently wrong" means in practice. You store license="CC-BY-4.0" for a document, the corpus builder admits the document without further inquiry, the model trains on it, the manifest says the document is attributed under a Creative Commons licence, and then a lawyer discovers that the footer string was placed there by a scraper that re-hosted the original without permission. Everything downstream of the wrong flag inherits the error, and unwinding it is expensive because the corpus has already been mixed, deduplicated, and trained on. The only defence is to treat every string as a claim whose truth you are trying to estimate, and to record enough context that a reviewer can tell the reliable claims from the doubtful ones.
The legal examples are dated to late 2025, with any later case developments marked separately. The code implements a deliberately simplified screening policy. Its output records the policy’s decision and the checks that produced it.
For general-purpose AI model providers, Article 53(1)(c) of the EU AI Act requires a policy to comply with EU copyright and related rights, including identifying and complying with reservations under Article 4(3) of the DSM Directive. Article 53(1)(d) calls for a sufficiently detailed public summary of training content using the AI Office’s template, published in 2025. In California, AB 2013 generally requires developers to post training-data documentation on their websites by January 1, 2026, and before later qualifying systems, services or substantial modifications are made publicly available to Californians. The law covers qualifying releases from January 1, 2022, and specifies exemptions. The record for each document gives you evidence for later disclosure.
As we discussed in Web Crawling, robots.txt determines what your crawler fetches. This chapter asks a different question: what does a fetch permit you to do with the bytes afterwards? That distinction is easy to state and easy to forget. Fetching is a mechanical act governed by a protocol; permission is a legal question governed by instruments that may not have been consulted at all during the fetch. A crawler can be perfectly compliant with robots.txt and still produce a corpus that is unusable for training, and a crawler can ignore robots.txt while collecting material that happens to be freely licensed. The two questions have to be asked separately, by different parts of your system, at different times.
Five permissions hiding inside "can I use this?"
We often collapse a handful of distinct questions into one. That collapse is the origin of most bad data decisions, because the answers differ, the instruments differ, and a document can be on the right side of one answer and the wrong side of another.
The five permissions are:
- Crawl. May I send an HTTP request and store the response? Governed by
robots.txt, terms of service, rate limits, and in some jurisdictions computer-misuse law. - Index. Should a search engine include a page or show a snippet? Robots meta directives and
X-Robots-Tagcan control how supporting engines index or serve a resource. Sitemaps help search engines discover it. - Train. May I compute gradients from the bytes? This is where licences, statutory text-and-data-mining exceptions, and contracts collide.
- Output. May I emit text that resembles the training data? Check whether the output reproduces or adapts protected expression and what the applicable rights and licence terms permit. A memorisation test can tell you about model behaviour.
- Release. May I ship weights or a service built on those weights? Governed by the model licence, export controls, and any obligations that flow through from the data.
A page can be crawlable but not trainable. It can be trainable but not releasable, if the licence carries a share-alike clause whose reach into model weights nobody has litigated. It can be releasable but not output-permissive, if the corpus contains code that the model reproduces verbatim.
A crawl can be subject to a host's crawler rules, site terms, and applicable law. The host file records rules for the crawler to follow, and its contents can change between visits. An index may take cues from meta tags and response headers. Training can depend on licences, statutes, and contracts. Outputs depend in part on model behaviour, such as whether the model reproduces a passage. Release can have separate conditions under the model licence. A single license field loses who supplied each signal, which use it covered, and when it was recorded.
An instrument can cover several of these actions. Record which ones it covers and where it is silent. A reviewer needs to reconstruct what the pipeline decided at each stage and what evidence it used.
What copyright does and does not give you
You cannot read licences without a working model of what copyright protects, because a licence can only grant what the licensor holds. That sentence deserves unpacking, because it is the single most common source of over-confidence in a licensing pipeline. Every licence is a grant made by a party with whatever rights that party actually possesses. If the party possesses nothing, the licence grants nothing, no matter how permissive its text. A CC0-dedicated file whose contents are a scan of a copyrighted book is still copyrighted in its contents, because the person who applied CC0 did not hold the rights to the book. The licence was a signal about the licensor's beliefs, and the beliefs were wrong.
Originality, facts, and the thin copyright in compilations
Copyright protects original expression. In the United States, Feist Publications v. Rural Telephone Service (1991) held that originality requires independent creation and a minimal degree of creativity. Effort alone was insufficient. Measurements, prices, coordinates, dates and counts can be unprotected facts even when the way someone selected or arranged them is protected.
Three consequences shape everything downstream:
- Copyright protection depends on the applicable originality threshold. An article or a short excerpt can contain original expression. A phone book's facts are free to use as facts, while its original selection and arrangement may attract a thin compilation copyright.
- For a training corpus, this means the interesting unit of analysis is often neither the document nor the token but the compilation: who selected these documents, in this order, with these annotations.
- Civil-law jurisdictions apply a different threshold. The EU asks whether the work is the "author's own intellectual creation" (Infopaq, C-5/08), which is close in effect. But the EU also has a sui generis database right that protects substantial investment in obtaining, verifying, or presenting a database's contents, independent of copyright in any individual item. That right can block bulk extraction from a catalogue even when every item inside it is public domain. If your corpus includes scraped product catalogues, directories, or curated lists, database right is a live constraint that no licence string will tell you about.
Imagine a directory of 200 artisanal bakeries. In the US example, the names, addresses and opening hours are facts. An original selection or arrangement may have its own thin compilation copyright. In the EU, obtaining and verifying the directory’s contents may also support a separate database right if the investment meets the legal threshold. Check protection of the compilation and potential restrictions on extraction alongside the status of individual facts.
The rights bundle and where training touches it
The rights bundle can include reproduction, adaptation, distribution, and communication to the public. Start with the copies the pipeline actually makes. A downloaded source file and a stored training corpus call for a reproduction analysis. Whether any particular model artefact qualifies as an adaptation depends on the applicable law and what the artefact contains. We return to that question for no-derivatives and share-alike terms.
Inventory what you store at each step, starting with source files, temporary copies and tokenised records. Inspect the checkpoint format too. Gradients and ordinary parameter checkpoints store numerical training state. Their presence alone gives you no evidence that a specific expression was copied into them. If a checkpoint also serializes source examples, include those copies in the review. Identify each relevant act before assessing whether a grant or exception covers it.
Moral rights
Attribution and integrity rights exist separately from the economic bundle. They are inalienable in France, waivable but durable in the United Kingdom, and mostly absent in the United States outside the narrow visual-art statute.
CC0 can waive an affirmer’s moral rights only where the applicable law permits waiver. Keep a source list so you can meet any attribution requirements you identify during review.
Term and orphan works
For literary and artistic works, the general EU term is the author's life plus seventy years. The general US rule for works created from 1978 likewise uses life plus seventy. US works made for hire use a different calculation: ninety-five years from first publication or one hundred and twenty years from creation, whichever expires first. Check the applicable term, work category, and dates for each source. An unlocated rightsholder does not establish that protection has expired. Give orphan works a review status and record which basis, if any, can cover the contemplated use.
The orphan-works case is worth thinking about, because it is where a naive "we tried to find the owner, so it is fine" position collapses. Someone scrapes a blog post from a long-dead domain whose author cannot be traced, and reasons that the lack of a complainant means the lack of a problem. The reasoning fails on three counts. First, an inactive website and an unlocated owner leave both expiry and surrender of rights unestablished. For example, the Ninth Circuit's copyright-abandonment discussion calls for evidence of intent and an overt act. The owner may be an estate, heir, or assignee. Second, the fact that you cannot identify the owner today does not mean the owner cannot identify you; a later acquisition of the rights can reveal a claimant. Third, a corpus builder cannot make an orphan-work investigation at the scale of hundreds of millions of documents. What it can do is classify orphan works into a bucket, apply the same review policy it would apply to "all rights reserved", and let the risk decision be explicit rather than implied by neglect.
Licences as machine-readable obligations
A licence is a conditional grant. Read it as a set of obligations and restrictions attached to a permission, because that is the form your pipeline needs. This is a small reframing with a large payoff. If you read a licence as a permission, the natural question is "may I use this?" and the natural representation is a boolean field. If you read a licence as a set of obligations and restrictions, the natural question is "under what conditions may I use this, and what must I do afterwards?" and the natural representation is a structured record that can drive downstream work. The second reading matches what licences actually say.
The Creative Commons family
Creative Commons licences use short names for combinations of conditions. Read the legal text for the named version and check which terms apply to the proposed use.
- CC0 1.0 dedicates the affirmer’s copyright and related rights to the public domain to the extent the law permits, with a fallback licence. Those rights can include the affirmer’s publicity or privacy rights in a depicted likeness where waiver is permitted. CC0 excludes patent and trademark rights. Check other parties’ rights and any data-protection duties separately.
- CC BY 4.0. When you share licensed material, retain the required attribution and licence information and indicate modifications. Apply the attribution conditions in a manner reasonable for the medium and context.
- CC BY-SA 4.0. If you share adapted material, use a Creative Commons licence with the same elements, in this version or a later one, or a BY-SA Compatible License.
- CC BY-ND adds a prohibition on distributing adapted material.
- CC BY-NC adds a non-commercial restriction, defined in version 4.0 as "not primarily intended for or directed towards commercial advantage or monetary compensation".
Two textual details matter more than that summary. First, CC BY 4.0 section 6 automatically terminates rights under the licence when its terms are violated. The rights automatically reinstate on the date the violation is cured if the cure is within 30 days of discovery. The licensor can also expressly reinstate them. Reinstatement leaves the licensor’s remedies for the earlier violation intact. Second, CC licences only cover what the licensor holds. A CC BY photograph of a person does not license that person's likeness; a CC BY article may contain a quoted third-party photograph that is not CC BY at all. The attribution chain is only as good as its weakest link.
The CC BY-NC 4.0 definition turns on whether the use is primarily directed toward commercial advantage or monetary compensation. A no-charge release tells you the download price of the model. Assess the proposed training use itself. The example policy below treats its commercial-training purpose as incompatible with the NC flag. Keep NC-only material in a separate shard, so a mixture that requires commercial-use eligibility can omit it without another crawl.
Software licenses in code corpora
For code corpora, keep the original software licence and check the licence’s trigger for each obligation. Compare what happens when you copy a source file, modify covered code, or distribute the modified work.
- Permissive licences such as MIT, BSD and Apache-2.0 have notice conditions. Apache-2.0 includes a patent grant. If the upstream licensed Work came with a NOTICE file, §4(d) requires you to include the relevant attribution notices in a permitted location when distributing a derivative.
- Copyleft terms depend on the covered work and what you do with it. Under AGPLv3 §13, when your modified version supports remote network interaction, it must prominently offer Corresponding Source to users who interact with it remotely.
The GPLv3 terms set conditions for conveying covered modified works. Identify the artefact to be distributed and any covered code it contains. The fixture records a generation-time verbatim filtering task for copyleft. A separate attribution flag adds a data-card task. In a real release review, inspect provenance and outputs and check the applicable conditions.
Repository and file-level licence statements can conflict. An audit of GitHub repositories found mismatches between top-level licence declarations and in-code notices. BigCode’s dataset documentation describes per-file licence metadata and a repository opt-out. Record the file-level assertion and the repository-level provenance separately so the reviewer can see a conflict.
SPDX: naming obligations so software can read them
SPDX is the interoperable naming layer, standardised as ISO/IEC 5962:2021 and maintained by the Linux Foundation. It gives you:
- Identifiers for well-known licences:
CC-BY-NC-4.0,MIT,Apache-2.0,GPL-3.0-only,GPL-3.0-or-later. - Expressions built from
AND,OR,WITH(for exceptions), and parentheses:Apache-2.0 WITH LLVM-exception,MIT AND GPL-3.0-only,CC-BY-NC-4.0 OR CC-BY-4.0. LicenseRef-identifiers for anything not on the list, including your own negotiated agreements.
Record the normalized SPDX expression alongside the original licence statement and its source. For example, “CC BY 4.0” can map to CC-BY-4.0, while “see footer” needs investigation. An SPDX expression records which licences and exceptions are asserted and how the branches combine. Checking that a grant applies and that its conditions can be met takes the source terms and the intended use. Other standards serve different needs. ODRL expresses permissions, prohibitions, and duties in machine-readable policies.
Composing licenses and policy restrictions
An SPDX expression tells you how the licence branches fit together:
- With
A AND B, both branches apply. Collect the obligations from both and check that you can satisfy them together. - With
A OR B, choose one branch that covers the intended use and whose conditions you can meet.
Once you have evaluated the licence branches and scoped the other signals, the policy can combine its decisions. For a given document and purpose, gather the actions covered by any available basis. Then remove actions blocked by any restriction the policy has found to apply.
Here is the document and is the intended purpose:
- indexes the applicable bases for permitting an action for that document and purpose. is the set of actions covered by basis , subject to its conditions.
- indexes the independent restrictions the policy has determined apply in that scope. is the set of actions blocked by restriction .
- is the set of actions still eligible under the policy. A union over an empty index set is empty.
Suppose an applicable basis covers copying and sharing a source, while an independent access agreement blocks sharing. The policy keeps copying and drops sharing. A condition on an unchosen OR branch stays with that branch. The set calculation assumes that questions of scope and precedence have already been resolved. Carry the obligations for the basis you rely on and send unresolved conflicts to review.
A mixture built under this policy must satisfy the applicable obligations for each included document. If your policy excludes material available only on non-commercial terms from commercial training, keep those sources in separate shards. You can then rebuild the commercial mixture from eligible shards without re-crawling.
The unresolved question: is a model a derivative work?
For ShareAlike or NoDerivatives terms, check what material you adapted or shared and which licence conditions apply to that act. The cases below help separate questions about source copies from questions about the released model.
The 2025 US decisions below concern fair use for particular copies. In Kadrey v. Meta (N.D. Cal., June 2025), the court granted Meta partial summary judgment on the named plaintiffs’ reproduction claims. It considered the downloads in light of their training purpose and left a separate alleged distribution claim outside that ruling. In Bartz v. Anthropic (N.D. Cal., June 2025), the court found fair use for training copies and for replacement scans of purchased print books. It denied summary judgment for Anthropic on the pirated copies retained in its central library. In Thomson Reuters v. Ross Intelligence (D. Del., February 2025), the court rejected fair use for copying Westlaw headnotes to build a competing legal research tool. In a later development outside the chapter’s 2025 snapshot, the Third Circuit affirmed the partial summary judgment on interlocutory appeal in an opinion docketed September 30, 2026.
In Kneschke v. LAION, the Hamburg Regional Court dismissed the photographer's claim in September 2024. It held that LAION’s download of the photograph while building a dataset qualified for the scientific research exception under §60d UrhG. The public dataset contained links and image descriptions. The Hanseatic Higher Regional Court dismissed the appeal in December 2025, relying on both the general TDM provision in §44b and the research exception in §60d. The dispute concerns the copy made during dataset preparation. A further appeal under I ZR 281/25 reached Germany’s Federal Court of Justice.
These cases turn on particular uses of particular copies. Record how you acquired the material, what you copied during dataset preparation, and what you release. If an applicable licence includes no-derivatives or share-alike terms, keep those terms available for release review, including review of any source material you redistribute.
Contract terms
Review whether platform terms form an enforceable agreement and what acts they cover. A permissive copyright licence can address the author's rights and still leave a question about contractual access terms. Enforceability depends on the applicable contract rules and any statutory limits.
Enforceability
A click asking the user to agree can provide evidence of assent when the terms are reasonably conspicuous. A passive link raises a separate notice question. In Specht v. Netscape (2d Cir. 2002), clicking the download button did not show assent to terms displayed below it on the page.
Capture the terms in force when you access a source. Record separately whether they address automated collection or training. If they are silent about the intended use, preserve that observation and route the unresolved question to review with any other evidence of permission.
The conflict with copyright
A contract can restrict a particular use subject to applicable law, formation and limits on enforceability. In the EU, Article 7 of the DSM Directive makes contractual provisions contrary to Article 3 unenforceable. Article 4 is a general TDM provision and does not appear in Article 7’s list.
In Van Buren v. United States (2021), the Supreme Court construed the CFAA’s exceeds-authorized-access provision in terms of entitlement to the computer area accessed. In hiQ Labs v. LinkedIn (9th Cir. 2022), the court affirmed a preliminary injunction and found serious questions about applying the CFAA to access to publicly visible LinkedIn profiles. The later district court contract decision addressed conduct under LinkedIn’s User Agreement. Record the access facts and check any agreement separately.
Capture the terms in effect at access
Terms can change, and a public version history may omit the version you need. At ingest, archive the text you received, hash and timestamp the capture, and record its reference alongside the document. Keep the available notice and assent evidence so a later reviewer can investigate which terms applied.
Keep the terms URL, any displayed version or effective date, and the retrieval context, including relevant redirect, locale, and account information. The hash lets a reviewer check the archived bytes. Use the other evidence to identify the operative terms for the relevant access or use.
robots.txt and the Robots Exclusion Protocol
robots.txt was introduced in 1994 and standardised as RFC 9309 in September 2022. The standard sets out path matching, user-agent groups and fetch handling. A parser can depart from those rules, as the CPython comparison below illustrates. Record which parser and version processed each check.
What RFC 9309 specifies
RFC 9309 defines how a crawler interprets a fetched rules file and what it should do when the fetch fails.
- Groups. Consecutive
User-agentlines can name several agents in one group. Matching is case-insensitive. Combine groups that match the crawler's product token and use the wildcard group when there is no explicit match. - Patterns.
*matches zero or more characters, and$anchors the end of the match. Matching accounts for percent encoding. - Precedence. Use the matching rule with the most octets. Prefer
Allowwhen an allow and a disallow rule are equivalent. - Size. If the crawler imposes a parsing limit, the limit must be at least 500 KiB.
- Status handling. A 4xx response can indicate an unavailable file, in which case crawling is allowed under the protocol. A server or network error makes the file unreachable, so the crawler initially assumes complete disallow.
- Caching. The standard recommends a cache lifetime of at most 24 hours unless the file is unreachable.
The CPython 3.11 implementation uses the first matching rule in file order within the chosen group. The example below compares that implementation with the RFC's longest-match rule on a few ASCII paths.
PythonIn [3]Expand
import hashlib
import json
import re
from dataclasses import dataclass, field, fields, replace
from enum import Enum
from typing import Optional
from urllib.robotparser import RobotFileParser
import numpy as np
import pandas as pdThis demonstration takes ASCII paths and one crawler product token. It handles basic groups, wildcards and simple allow/disallow patterns. It skips URL normalization, percent-encoding, status handling and caching. Equivalent tied patterns favor Allow; for distinct equal-length patterns the demonstration keeps the first.
PythonIn [4]Expand
def parse_robots(text):
"""Split a robots.txt file into groups of user agents and rules."""
groups = []
current = None
saw_rule = False
for raw_line in text.splitlines():
line = raw_line.split("#", 1)[0].strip()
if not line or ":" not in line:
continue
field, _, value = line.partition(":")
field = field.strip().lower()
value = value.strip()
if field == "user-agent":
# An empty rule still ends the user-agent block.
if current is None or saw_rule:
current = {"agents": [], "rules": []}
groups.append(current)
saw_rule = False
current["agents"].append(value.lower())
elif field in {"allow", "disallow"} and current is not None:
saw_rule = True
if value:
current["rules"].append((field == "allow", value))
return groupsThe second function turns a pattern into a regular expression and applies the longest-match rule.
PythonIn [5]Expand
def pattern_to_regex(pattern):
anchored = pattern.endswith("$")
body = pattern[:-1] if anchored else pattern
regex = re.escape(body).replace(r"\*", ".*")
return regex + ("$" if anchored else ".*")
def rule_matches(pattern, path):
return re.fullmatch(pattern_to_regex(pattern), path) is not None
def robots_allowed(groups, user_agent, path):
"""Return (allowed, winning_pattern) for the ASCII examples below."""
ua = user_agent.split("/")[0].lower()
specific = [g for g in groups if ua in g["agents"]]
wildcard = [g for g in groups if "*" in g["agents"]]
chosen = specific or wildcard # a specific group outranks the wildcard
if not chosen:
return True, None
rules = [rule for group in chosen for rule in group["rules"]]
matches = [
(len(pattern), allow, pattern)
for allow, pattern in rules
if rule_matches(pattern, path)
]
if not matches:
return True, None
longest = max(length for length, _, _ in matches)
tied = [
(allow, pattern)
for length, allow, pattern in matches
if length == longest
]
first_allow, first_pattern = tied[0]
for allow, pattern in tied:
if allow and pattern == first_pattern:
return True, pattern
return first_allow, first_patternNow compare CPython’s standard library against the longest-match demonstration on six crawler-path pairs.
PythonIn [6]Expand
demo_robots = """
# A publisher that allows almost everything, except one section.
User-agent: *
Allow: /
Disallow: /news/
User-agent: GPTBot
User-agent: ClaudeBot
Disallow: /
"""
groups = parse_robots(demo_robots)
stdlib = RobotFileParser()
stdlib.parse(demo_robots.strip().splitlines())
stdlib.modified() # record that the file was just fetchedPythonIn [7]Expand
comparison = []
for agent in ["MyResearchBot/0.1", "GPTBot/1.2"]:
for path in ["/", "/about", "/news/2025/story.html"]:
comparison.append(
{
"crawler": agent,
"path": path,
"stdlib": stdlib.can_fetch(
agent, "https://publisher.example" + path
),
"rfc9309": robots_allowed(groups, agent, path)[0],
}
)
comparison = pd.DataFrame(comparison)| crawler | path | stdlib | rfc9309 | |
|---|---|---|---|---|
| 0 | MyResearchBot/0.1 | / | True | True |
| 1 | MyResearchBot/0.1 | /about | True | True |
| 2 | MyResearchBot/0.1 | /news/2025/story.html | True | False |
| 3 | GPTBot/1.2 | / | False | False |
| 4 | GPTBot/1.2 | /about | False | False |
| 5 | GPTBot/1.2 | /news/2025/story.html | False | False |
The implementations agree on five of the six cases. For MyResearchBot requesting /news/2025/story.html, CPython 3.11 allows the request because Allow: / is the first matching rule. The RFC's matching rule disallows it because Disallow: /news/ is the longer match. If you reverse the two directives in the wildcard group, both deny the request in this example.
PythonIn [9]Expand
robot_cases = comparison.assign(
case=comparison["crawler"].str.split("/").str[0]
+ " @ "
+ comparison["path"]
).set_index("case")[["stdlib", "rfc9309"]]VisualizationOut [10]Expand

Record which parser and matching rules the crawler uses. For the research-crawler example above, changing parser changes the decision on the same file. Keeping the raw file and parser version gives a reviewer a way to reproduce the decision.
Crawling is not training
The Robots Exclusion Protocol describes how a crawler obtains the origin's rules and checks them for its product token and request path. It does not establish permission to use a retained copy for training. Record the basis for that use separately.
If your dataset policy considers changes to robots.txt, give it two observations to compare:
- At crawl time, apply the rules for the crawler and path. Archive the result, the fetched rules and the observation time.
- At dataset construction time, check the same origin, crawler and path again. Archive the second observation and compare it with the first.
- If the rule now disallows the path, preserve both observations. Route the source for review of the use basis and any applicable reservation, and use the lineage record to locate the affected copies.
Record the origin that served robots.txt and the user agent you checked. In a hosted-newsletter example, the platform may publish the file for a domain where a writer contributes content. Keep a separate record of what the platform controls and what the writer has authorized. Use a separate licence or use-specific signal to record conditions such as research-only use.
AI-specific user agents
Operators document product-specific controls for crawling and downstream use. Record the named token and the operation it covers:
| Token | Operator | What it controls |
|---|---|---|
GPTBot | OpenAI | Collection for OpenAI model training |
Google-Extended | Use of crawled content for covered generative AI training and grounding outside Google Search | |
CCBot | Common Crawl | Inclusion in the Common Crawl corpus |
ClaudeBot | Anthropic | Collection for Anthropic model training |
Applebot-Extended | Apple | Use of content in Apple foundation model training |
Meta-ExternalAgent | Meta | Collection for uses including foundation-model training and direct content indexing |
Google documents Google-Extended as a product token that controls downstream training and grounding for covered products. The token leaves inclusion and ranking in Google Search unaffected. Common Crawl documents CCBot as its collection crawler. Its collection rules do not settle a downstream user's training permission. Meta lists both training and direct indexing as uses for data collected by Meta-ExternalAgent. Store the token and purpose with the observation so you can distinguish those cases.
Longpre and colleagues' 2024 study Consent in Crisis: The Rapid Decline of the AI Data Commons measured a rise in restrictions between 2023 and 2024. The authors report that their fully restricted category reached more than 5% of all C4 tokens and more than 28% of tokens from a selected subset of actively maintained, critical C4 sources. Those percentages describe their corpus and restriction criteria. For your own mixture, compare the tokens that pass Quality Filtering with the tokens that also pass the data-use policy. Break out the difference by source and language before estimating how much data you would need to replace.
Text and data mining exceptions
Text and data mining exceptions differ by jurisdiction. Article 4 of the EU Digital Single Market Directive addresses reproductions and extractions of lawfully accessible material for text and data mining. An appropriate express reservation by the rightsholder can take those acts outside the exception. A pipeline needs evidence for the basis it invokes, including any conditions on access and reservations.
The EU's two-tier exception and the opt-out
Articles 3 and 4 of Directive (EU) 2019/790 establish separate exceptions or limitations for text and data mining.
Article 3 covers reproductions and extractions for scientific text and data mining by qualifying research organisations and cultural heritage institutions that have lawful access. Article 7 makes contractual provisions contrary to Article 3 unenforceable.
Article 4 provides an exception or limitation for specified reproductions and extractions of lawfully accessible material for text and data mining. Its scope can include commercial mining, subject to the applicable implementation. Article 4(3) conditions the exception on the absence of an appropriate express reservation by the rightsholder. For material made publicly available online it gives machine-readable means as an example.
For material made publicly available online, Recital 18 points to machine-readable means, including metadata and website or service terms. It also notes that contractual agreements or unilateral declarations can be appropriate in other cases.
Check the actor and purpose before selecting a basis. A qualifying institution carrying out scientific research can assess Article 3. A commercial developer assessing Article 4 must check lawful access and whether a rightsholder made an appropriate reservation. The applicability of national implementing law also needs to be established.
For Article 4, a reservation is a rightsholder’s express statement reserving the relevant use in an appropriate manner. For publicly available online content, the directive gives machine-readable means as an example.
Keep dated snapshots of the evidence available at collection and record further checks when the contemplated use or the signals change. A later fetch cannot establish what a page showed at an earlier time. Record which artifact you checked, when you checked it, and which use the check covered.
Machine-readable reservations and their carriers
There is no single universal carrier. A production pipeline meets several:
robots.txtcan carry product-specific signals. Keep the applicable token and the snapshot. Assess separately whether the signal qualifies as a reservation for the intended act under the applicable law.- TDMRep, a W3C Community Group protocol, carries the
tdm-reservationflag in an HTTP response header, HTML metadata or an origin-level TDM file. A separatetdm-policyURL can link to more information or terms. - Content credentials can bind a signed provenance claim to an asset. C2PA 1.x included a native Training & Data Mining assertion, which version 2.0 removed. Record the schema and version if a legacy or separately defined field expresses a data-use preference. Verify the applicable authority separately.
- Proposed conventions include Spawning’s
ai.txt. Record the particular convention, the party that supplies it and whether your collection policy recognizes it.
The practical problem is that none of these is universal, several are ambiguous about which use they reserve, and adoption is uneven. A pipeline must support multiple carriers, record which ones it checked and found absent, and default to restrictive when a carrier is present but unparseable. Silence is a default, not consent. The absent-carrier recording is a detail worth emphasizing, because it distinguishes a manifest that says "we checked and found no reservation" from one that says "we did not check". Those are very different audit statements. The first is a positive claim about the document's state; the second is an admission of ignorance. A pipeline that records the positive claim without performing the check is worse than one that records ignorance, because the first creates false confidence while the second invites follow-up.
The United States: fair use, factor by factor
For a US fair-use analysis, 17 U.S.C. §107 gives four nonexclusive factors. Evaluate the particular challenged use. A licence or another applicable permission may provide a separate basis.
- Purpose and character of the use, including commerciality and transformativeness.
- Nature of the copyrighted work, including whether it is primarily factual or creative.
- Amount and substantiality of the portion used.
- Effect on the market for the work, including markets for derivative works.
Andy Warhol Foundation v. Goldsmith (2023) assessed purpose and character with reference to the specific challenged use. Keep the same distinction when reading the training cases above. A court's analysis depends on which particular act was challenged and the record before it.
Keep a record of how the material was acquired, copied, used and shared. Bartz evaluated separate library and training copies. Kadrey considered the challenged downloads together with their training purpose and left a separate distribution claim outside that ruling. Identify the conduct at issue before drawing conclusions from either case.
For a US-facing pipeline, record the grant or other basis you rely on and the act it covers. If the policy routes a source to fair-use review, keep the acquisition evidence and the factor-by-factor assessment with the decision.
Other jurisdictions
Japan. Article 30-4 of the Copyright Act covers certain uses for purposes other than enjoying the thoughts or sentiments expressed in a work, including information analysis. The provision limits use to the extent necessary for the purpose and excludes uses that unreasonably prejudice the rightsholder's interests.
United Kingdom. Section 29A of the Copyright, Designs and Patents Act 1988 covers copying for computational analysis where the person has lawful access and the sole purpose is non-commercial research. It requires sufficient acknowledgement where possible and separately limits transfer and reuse.
Other jurisdictions. Check the law that applies to the act, then record the actor, purpose, conditions and evidence for any exception. The example policy below sends unresolved cases to review.
Which conditions to check when there is no licence
For a proposed mining operation, start with the applicable law and the actual use:
| Applicable law | Provision to check | Questions for the review |
|---|---|---|
| EU | Article 4 may cover qualifying reproductions and extractions | Was access lawful, and did the rightsholder appropriately reserve the use? |
| Japan | Article 30-4 | Does the use meet the non-enjoyment and necessity limits while avoiding unreasonable prejudice? |
| UK | Section 29A | Is this solely non-commercial research with lawful access, and are the acknowledgement and handling conditions satisfied? |
| US | Section 107 | What precise use is at issue, how was the material acquired, and what does the factor analysis show? |
Start the record with the applicable law, the act, and the proposed basis. If the review relies on EU Article 4, check lawful access and any appropriate express reservation. The UK, Japanese, and US examples ask different questions even when a publisher's signals are identical. Log whether you checked each relevant signal and what you found.
PythonIn [11]Expand
@dataclass(frozen=True)
class Profile:
"""The obligations and restrictions a licence imposes."""
name: str = ""
attribution: bool = False
share_alike: bool = False
no_derivatives: bool = False
non_commercial: bool = False
copyleft: bool = False
public_domain: bool = False
unknown: bool = False
LICENSES = {
"CC0-1.0": Profile(name="CC0 1.0", public_domain=True),
"CC-BY-4.0": Profile(name="CC BY 4.0", attribution=True),
"CC-BY-SA-4.0": Profile(
name="CC BY-SA 4.0", attribution=True, share_alike=True
),
"CC-BY-ND-4.0": Profile(
name="CC BY-ND 4.0", attribution=True, no_derivatives=True
),
"CC-BY-NC-4.0": Profile(
name="CC BY-NC 4.0", attribution=True, non_commercial=True
),
"CC-BY-NC-SA-4.0": Profile(
name="CC BY-NC-SA 4.0",
attribution=True,
non_commercial=True,
share_alike=True,
),
"MIT": Profile(name="MIT", attribution=True),
"Apache-2.0": Profile(name="Apache 2.0", attribution=True),
"GPL-3.0-only": Profile(name="GPL-3.0", attribution=True, copyleft=True),
"AGPL-3.0-only": Profile(name="AGPL-3.0", attribution=True, copyleft=True),
"LicenseRef-negotiated-commercial": Profile(
name="negotiated commercial licence"
),
}The example retains each known OR alternative. The score breaks ties between alternatives that produce the same screening outcome for the requested purpose.
The matrix below renders the profile map from the preceding cell. Each row is a toy licence profile and each column is one tracked flag.
PythonIn [12]Expand
license_columns = [
"attribution",
"share_alike",
"no_derivatives",
"non_commercial",
"copyleft",
"public_domain",
"unknown",
]
license_ids = [
"CC0-1.0",
"CC-BY-4.0",
"CC-BY-SA-4.0",
"CC-BY-ND-4.0",
"CC-BY-NC-4.0",
"CC-BY-NC-SA-4.0",
"MIT",
"Apache-2.0",
"GPL-3.0-only",
"AGPL-3.0-only",
"LicenseRef-negotiated-commercial",
]
license_labels = [LICENSES[identifier].name for identifier in license_ids]
license_matrix = np.array(
[
[
int(getattr(LICENSES[identifier], column))
for column in license_columns
]
for identifier in license_ids
]
)VisualizationOut [13]Expand

PythonIn [14]Expand
def restrictiveness(profile):
"""Higher means more onerous. Used only to pick between OR branches."""
score = 0
score += 64 if profile.unknown else 0
score += 8 if profile.non_commercial else 0
score += 4 if profile.no_derivatives else 0
score += 2 if profile.share_alike else 0
score += 2 if profile.copyleft else 0
score += 1 if profile.attribution else 0
return score
def merge_and(left, right):
return Profile(
name=f"{left.name} AND {right.name}",
attribution=left.attribution or right.attribution,
share_alike=left.share_alike or right.share_alike,
no_derivatives=left.no_derivatives or right.no_derivatives,
non_commercial=left.non_commercial or right.non_commercial,
copyleft=left.copyleft or right.copyleft,
public_domain=left.public_domain and right.public_domain,
unknown=left.unknown or right.unknown,
)
def profile_rank(profile, purpose):
if purpose is None:
return restrictiveness(profile), profile.name
if profile.non_commercial and purpose == "commercial_training":
outcome = 2
elif profile.no_derivatives:
outcome = 1
else:
outcome = 0
return outcome, restrictiveness(profile), profile.nameThis example uses recursive descent. In the supported subset, AND binds more tightly than OR.
PythonIn [15]Expand
TOKEN_RE = re.compile(r"\(|\)|[A-Za-z0-9.\-+]+")
class ExpressionParser:
"""Recursive-descent parser for the subset of SPDX we care about."""
def __init__(self, tokens):
self.tokens = tokens
self.pos = 0
def peek(self):
return self.tokens[self.pos] if self.pos < len(self.tokens) else None
def take(self):
token = self.peek()
self.pos += 1
return token
def parse(self):
node = self.parse_or()
if self.peek() is not None:
raise ValueError(f"unexpected token {self.peek()!r}")
return node
def parse_or(self):
node = self.parse_and()
while self.peek() == "OR":
self.take()
node = ("OR", node, self.parse_and())
return node
def parse_and(self):
node = self.parse_atom()
while self.peek() == "AND":
self.take()
node = ("AND", node, self.parse_atom())
return node
def parse_atom(self):
token = self.take()
if token == "(":
node = self.parse_or()
if self.take() != ")":
raise ValueError("unbalanced parentheses")
return node
if token is None or token in {"AND", "OR", "WITH", ")"}:
raise ValueError(f"unexpected token {token!r}")
return ("LIC", token)The evaluator keeps alternatives until it knows the purpose. The GNU later-version forms share the example’s flags while preserving the supplied identifier. Any unsupported or malformed branch sends the expression to review, including an unmapped branch alongside a recognized licence. This conservative fixture does not implement WITH expressions.
PythonIn [16]Expand
LATER_VERSION_PROFILES = {
"GPL-3.0-or-later": "GPL-3.0-only",
"GPL-3.0+": "GPL-3.0-only",
"AGPL-3.0-or-later": "AGPL-3.0-only",
"AGPL-3.0+": "AGPL-3.0-only",
}
def evaluate_expression(expression, purpose=None):
if len(expression) > 1024 or TOKEN_RE.sub("", expression).strip():
return Profile(name=expression, unknown=True)
try:
tree = ExpressionParser(TOKEN_RE.findall(expression)).parse()
except (ValueError, RecursionError):
return Profile(name=expression, unknown=True)
def walk(node):
if node[0] == "LIC":
identifier = node[1]
mapped = LATER_VERSION_PROFILES.get(identifier, identifier)
if mapped not in LICENSES:
raise ValueError(f"unmapped licence {identifier!r}")
if mapped != identifier:
return [replace(LICENSES[mapped], name=identifier)]
return [LICENSES[mapped]]
left, right = walk(node[1]), walk(node[2])
if node[0] == "OR":
if len(left) + len(right) > 64:
raise ValueError("too many alternatives")
return left + right
if len(left) * len(right) > 64:
raise ValueError("too many alternatives")
return [merge_and(a, b) for a in left for b in right]
try:
return min(
walk(tree), key=lambda profile: profile_rank(profile, purpose)
)
except (ValueError, RecursionError):
return Profile(name=expression, unknown=True)ConsoleOut [17]Expand
CC-BY-SA-4.0 -> CC BY-SA 4.0 nc=False sa=True attr=True unknown=False CC-BY-NC-4.0 OR CC-BY-4.0 -> CC BY 4.0 nc=False sa=False attr=True unknown=False MIT AND GPL-3.0-only -> MIT AND GPL-3.0 nc=False sa=False attr=True unknown=False GPL-3.0-or-later -> GPL-3.0-or-later nc=False sa=False attr=True unknown=False CC-BY-4.0 AND (CC0-1.0 OR CC-BY-NC-4.0) -> CC BY 4.0 AND CC0 1.0 nc=False sa=False attr=True unknown=False LicenseRef-mystery-terms -> LicenseRef-mystery-terms nc=False sa=False attr=False unknown=True
The profile display shows how AND combines flags and how the fixed score ranks known alternatives when no purpose is supplied. The resolver first ranks known alternatives by the fixture’s outcome for the requested purpose. For research, CC-BY-NC-4.0 OR CC-BY-ND-4.0 selects NC and allows with obligations. For commercial training, the same expression selects ND and sends the record to review. The toy ranking does not determine the legal scope of either branch.
Consent: creator-side signals
A creator’s preference, a licence from the rightsholder and consent required by a separate legal regime answer different questions.
A photographer may hold the copyright without the depicted person’s permission. A journalist can express a preference about training even after assigning copyright, while the assignment may leave the publisher with the authority to grant use. A forum contract may separately address what the platform can sublicense. Record both the preference and the instrument or authority behind it.
Record whether a rights grant is available for the act you plan. Record a creator’s training preference separately. Where applicable law requires consent for an activity, such as certain processing of personal data, verify that condition through the relevant legal and privacy review.
Registries and do-not-train lists
Spawning launched Have I Been Trained in 2022 and introduced an opt-out mechanism that December. The registry operator reported a commitment from Stability AI to respect registry opt-outs for Stable Diffusion 3 training.
This chapter's example policy can honour a registry preference as a data inclusion decision. Whether a listing also serves as an effective reservation requires a separate check of the applicable instrument, the person who made it, and the use it addresses.
- Granularity: some registries let creators identify particular works. Record the identifier, who asserted the preference, and whether it maps to the item in your corpus.
- Coverage: measure how many records and tokens your chosen registry matches. Source- or language-level counts can show where those matches change the mixture.
- Verification: check the authority behind the entry and whether it identifies the work, domain, or version you collected.
- Timing: record whether a listing was present at collection or surfaced later. Review the operational response against the existing data and model releases. We take up the mechanisms in Knowledge, Memory, Editing, and Unlearning.
Keep the preference, its verification status, and the decision that followed as separate fields. An unmatched record tells you about the limits of your lookup, so retain the registry version and date of the check.
Content credentials and signed provenance
A C2PA credential carries a signed claim bound to an asset. A validator can check the signature and asset binding under its trust configuration. That verification leaves the rightsholder's identity and any authority to permit training open. Version 1.x defined a native Training & Data Mining assertion. Version 2.0 removed it. If another field carries a preference, record the schema, its issuer, and the exact claim before deciding what it means for the use.
Check for the credential on the collected asset and record where you found it. Some manifests are embedded and can be lost when you re-encode the asset or extract text. Keep the original verification record and record failed or missing lookups so that later reviewers can tell what the parser actually saw.
Negotiated and collective licensing
Public announcements give examples of negotiated access. OpenAI announced partnerships with the Associated Press, Axel Springer, Le Monde, the Financial Times and News Corp. The announced terms vary. News Corp described access to current and archived articles and permission to display content. Reddit announced access to its Data API. Stack Overflow described API access and work to improve its models. For a training inventory, record the agreement and the uses its actual terms cover.
This changes the provenance schema. Licensed inventory arrives with a contract identifier, a scope, an expiry, and often a warranty and indemnity. Your document record needs a contract_ref field and a notion of scope that a license_expr alone cannot express. It also changes the politics: a world in which the highest-value text is exclusively licensed is a world in which the open crawl is the low-value remainder, which has downstream quality implications we discussed in Data Mixing.
Personal data is a separate regime
A copyright licence on a document does not supply the lawful basis for processing personal data. A CC BY licence also leaves other parties’ separate publicity and privacy rights to be assessed.
The relevant obligations are familiar from PII Removal but they are legal rather than technical:
- Lawful basis. GDPR Article 6 lists several possible bases for processing. Article 6(1)(f) can apply where processing is necessary for an identified legitimate interest and the data subject’s interests or fundamental rights and freedoms do not override it. Record the interest, the necessity assessment and the balance in the specific case.
- Transparency. GDPR Article 14 generally requires information when personal data come from somewhere other than the data subject. Article 14(5)(b) can apply if providing that information is impossible or would involve disproportionate effort. Where the provision applies to scientific or historical research, check the relevant Article 89(1) safeguards. The controller must take appropriate protective measures, including making the information publicly available.
- Erasure. Article 17 creates a right to erasure that interacts badly with a model that has memorised the data.
- Impact assessment. Under GDPR Article 35, the controller generally carries out a data protection impact assessment before processing that is likely to pose a high risk to people's rights and freedoms. Article 35(3)(b) specifically names large-scale processing of special-category data under Article 9(1) or data on criminal convictions and offences under Article 10.
In California, the CCPA as amended by the CPRA provides rights relating to sale, sharing and certain uses of sensitive personal information. In the fixture, a personal-data flag creates a separate before-use privacy hold even if the licence-and-access screen would allow the record. A real pipeline must establish its applicable privacy basis before processing. A fixture without a flag supplies no assurance of compliance.
Non-copyright restrictions you will also meet
Check these separately for the material and operation in your review:
- EU database right, as above, which can reach scraped catalogues and directories.
- Publicity and likeness rights. A photograph’s copyright licence alone does not clear the depicted person’s separate rights. Verify any separate permission and who can grant it.
- Indigenous data sovereignty. CARE includes authority to control data, and First Nations’ OCAP principles describe ownership, control, access and possession in their specific Canadian First Nations context. Check which community authority or governance process applies to the collection and intended use.
- Export controls and sanctions, which can restrict the transfer of certain technical data across borders.
- Trade secrecy. In the US example, the owner must take reasonable measures to preserve secrecy and the information must have actual or potential independent economic value from being secret. A leak or a confidentiality label alone is insufficient.
- National security classification, in the small number of cases where it applies.
None of these is visible in an SPDX string. All of them belong in the review path rather than the automated resolver, which is one reason the resolver has a review outcome at all.
Making the decision: precedence and composition
First identify an applicable basis for the intended action. Then check for any independent condition that blocks it. The example that follows evaluates those checks under one corpus policy.
Evidence to check
Collect the evidence for each applicable decision:
- A negotiated licence or contract with the rightsholder, which can both widen and narrow.
- A statutory permission or exception. Record the jurisdiction, the acts you plan and the conditions you checked.
- Platform terms, including whether they cover the actor, access method and planned use.
- Crawler rules and TDM reservations, tracked separately because one can address fetching and another can address a downstream use.
- The applicable default when no grant or exception has been established.
Use the list to organize evidence. Check each applicable instrument against the contemplated act. The order of checks in the fixture is an implementation choice, and a restriction can apply even when a separate source grants a copyright permission.
The rules that survive contact with real corpora
- Access permission does not imply use permission. A page served without authentication is accessible, not licensed.
- Use permission does not imply access permission. A licensed dataset delivered through a portal whose terms forbid automated download is still a contract problem; get a delivery mechanism, not an argument.
- Combine the scoped decisions. An action needs an applicable basis and must clear every independent block that applies to it. Record the conditions on the basis you rely on.
- Absence of a signal is not permission. It is a default, and the default depends on jurisdiction.
- Send unresolved conflicts to review. If a captured signal triggers an explicit exclusion rule, record the rule and exclude the document. In the sample policy, an active registry flag or a recorded TDM reservation can exclude a document even when it has a recorded licence.
The four outcomes
The fixture’s licence-and-access screen produces one of four outcomes. A separate privacy hold can still prevent covered processing.
- Allow. No obligations, no reservations, no unresolved questions.
- Allow with obligations. This screen finds no exclusion or unresolved licensing issue. The record carries tasks due before use, before redistribution or release, or at generation time, as applicable.
- Review. Hold the record out of this mixture while someone checks the remaining questions. Assign an owner and record when you expect a decision.
- Exclude. A hard stop. Either a restriction applies or a policy override does.
Under a policy that holds pending records out of the mixture, a backlog can change which sources are represented. Track the pending, approved and excluded token counts by source or language. Use those counts to see whether slow review is affecting the mixture you can build.
Worked example: eleven documents, three purposes
Before writing the resolver, apply the example policy to a few documents by hand. The corpus is deliberately small and the signals deliberately varied.
| Document | Licence | Terms | robots.txt | TDM reserved | Registry | Source | Outcome |
|---|---|---|---|---|---|---|---|
wiki-eu | CC-BY-SA-4.0 | allowed | allow | no | no | EU | allow with obligations |
gov-us | CC0-1.0 | allowed | allow | no | no | US | allow |
blog-eu | none | unknown | allow | no | no | EU | review |
news-us | none | prohibited | disallow | no | no | US | exclude |
code-mit | MIT | allowed | allow | no | no | US | allow with obligations |
art-eu | none | unknown | allow | no | yes | EU | exclude |
news-eu | none | unknown | allow | yes | no | EU | exclude |
For blog-eu, the example records no licence or known reservation. It identifies Article 4 as a possible basis and sends the record to review. Clearing the unknown terms would leave the record in review because the resolver has no evidence of lawful access or the other conditions of the exception.
For news-eu, the example policy treats the reservation header as an exclusion signal. With that flag removed, the record would go to review like blog-eu.
For art-eu, the example excludes the record before evaluating the other signals. The honor_registries parameter controls that early registry check in this policy.
The resolver applies the same policy to the other eight fixtures. The licence-and-access screen checks the registry first. A matching registry entry ends that screen. Otherwise it checks crawl rules, reservations, licences, possible statutory bases, and platform terms in that order. The before-use privacy hold is initialized independently.
PythonIn [18]Expand
class Purpose(Enum):
RESEARCH = "research"
EVALUATION = "evaluation"
COMMERCIAL_TRAINING = "commercial_training"
class Jurisdiction(Enum):
EU = "EU"
US = "US"
UK = "UK"
JP = "JP"
OTHER = "other"
class Decision(Enum):
ALLOW = "allow"
ALLOW_WITH_OBLIGATIONS = "allow_with_obligations"
REVIEW = "review"
EXCLUDE = "exclude"
LEVELS = {
Decision.ALLOW: 0,
Decision.ALLOW_WITH_OBLIGATIONS: 1,
Decision.REVIEW: 2,
Decision.EXCLUDE: 3,
}
DECISION_ORDER = ["allow", "allow_with_obligations", "review", "exclude"]
PURPOSE_ORDER = ["research", "evaluation", "commercial_training"]PythonIn [19]Expand
@dataclass
class Document:
doc_id: str
host: str
license_expr: Optional[str]
tos_training: str # "allowed" | "prohibited" | "unknown"
robots_allowed: bool
tdm_reserved: bool
registry_optout: bool
personal_data: bool
jurisdiction: Jurisdiction
excerpt: str = field(metadata={"signal": False})
@dataclass
class Resolution:
doc_id: str
purpose: str
jurisdiction: str
decision: str
reasons: list
obligations: list
triggers: list
privacy_gate: strThe licence-and-access screen keeps the highest severity reached during a run. At each bump, the decision advances only if the new finding is more restrictive. A later permissive finding leaves an earlier restriction in place. The before-use privacy hold is a separate field.
PythonIn [20]Expand
def resolve(doc, purpose, honor_registries=True):
status = Decision.ALLOW
reasons, obligations, triggers = [], [], []
privacy_gate = "hold_before_use" if doc.personal_data else "not_flagged"
def task(stage, action):
obligations.append({"stage": stage, "task": action})
def bump(level, reason, trigger):
nonlocal status
if LEVELS[level] > LEVELS[status]:
status = level
reasons.append(reason)
triggers.append(trigger)
# 1. This policy gives a registry exclusion precedence.
if doc.registry_optout and honor_registries:
bump(
Decision.EXCLUDE,
"listed in a do-not-train registry",
"registry_opt_out",
)
return Resolution(
doc.doc_id,
purpose.value,
doc.jurisdiction.value,
status.value,
reasons,
obligations,
triggers,
privacy_gate,
)
# 2. Crawl directives govern fetching, not training, so a violation
# here is a governance flag rather than a licence term.
if not doc.robots_allowed:
bump(
Decision.REVIEW,
"robots.txt disallows this crawler",
"robots_disallow",
)
# 3. This policy excludes flagged reservations, even if a licence is recorded.
if doc.tdm_reserved:
bump(
Decision.EXCLUDE,
"machine-readable TDM reservation",
"tdm_reservation",
)
# 4. The licence, if one exists.
if doc.license_expr is None:
bump(
Decision.REVIEW,
"no licence recorded: verify an applicable basis",
"no_licence",
)
else:
profile = evaluate_expression(doc.license_expr, purpose.value)
if profile.unknown:
bump(
Decision.REVIEW,
f"licence {doc.license_expr!r} is not mapped",
"unknown_licence",
)
if profile.non_commercial and purpose is Purpose.COMMERCIAL_TRAINING:
bump(
Decision.EXCLUDE,
f"{profile.name}: non-commercial clause",
"non_commercial",
)
if profile.no_derivatives:
bump(
Decision.REVIEW,
f"{profile.name}: no-derivatives clause",
"no_derivatives",
)
if profile.share_alike:
bump(
Decision.ALLOW_WITH_OBLIGATIONS,
f"{profile.name}: share-alike",
"share_alike",
)
task(
"before_release", "track share-alike sources for release review"
)
if profile.copyleft:
bump(
Decision.ALLOW_WITH_OBLIGATIONS,
f"{profile.name}: copyleft",
"copyleft",
)
task("at_generation", "filter verbatim code reproduction")
if profile.attribution:
bump(
Decision.ALLOW_WITH_OBLIGATIONS,
f"{profile.name}: attribution",
"attribution",
)
task("before_release", "list the source in the data card")
# 5. Record possible statutory bases for review when no licence is recorded.
if doc.license_expr is None and not doc.tdm_reserved:
if doc.jurisdiction is Jurisdiction.EU:
bump(
Decision.REVIEW,
"EU Art. 4 may apply: verify its conditions",
"statute_eu_tdm",
)
task(
"before_use",
"verify the Art. 4 basis and record the reservation check date",
)
elif doc.jurisdiction is Jurisdiction.JP:
bump(
Decision.REVIEW,
"JP Art. 30-4 may apply; scope is contested",
"statute_jp",
)
elif doc.jurisdiction is Jurisdiction.US:
bump(
Decision.REVIEW,
"US: fair use for training is unresolved",
"statute_us_fair_use",
)
else:
bump(
Decision.REVIEW,
"no established exception in source jurisdiction",
"statute_other",
)
# 6. Apply the hypothetical terms outcomes independently.
if doc.tos_training == "prohibited":
bump(
Decision.EXCLUDE, "terms of use prohibit this use", "tos_prohibited"
)
elif doc.tos_training == "unknown":
bump(Decision.REVIEW, "terms of use not captured", "tos_unknown")
# 7. Keep the privacy hold separate from the screening decision.
if doc.personal_data:
reasons.append("contains personal data")
triggers.append("personal_data")
task(
"before_use",
"privacy review: lawful basis, minimisation, erasure path",
)
return Resolution(
doc.doc_id,
purpose.value,
doc.jurisdiction.value,
status.value,
reasons,
obligations,
triggers,
privacy_gate,
)Each row is a synthetic summary. In production, keep the dated source observations and their evidence references, including any sources consulted after the original fetch.
PythonIn [21]Expand
corpus = [
Document(
"wiki-eu",
"en.wikipedia.org",
"CC-BY-SA-4.0",
"allowed",
True,
False,
False,
False,
Jurisdiction.EU,
"An encyclopaedia paragraph on subword tokenisation.",
),
Document(
"gov-us",
"nist.gov",
"CC0-1.0",
"allowed",
True,
False,
False,
False,
Jurisdiction.US,
"A public-domain US government technical report.",
),
Document(
"blog-eu",
"personal-blog.example",
None,
"unknown",
True,
False,
False,
False,
Jurisdiction.EU,
"A practitioner's blog post with no licence statement.",
),
Document(
"news-us",
"news.example",
None,
"prohibited",
False,
False,
False,
False,
Jurisdiction.US,
"A news article behind a restrictive terms-of-use page.",
),
Document(
"forum-us",
"forum.example",
"CC-BY-NC-4.0",
"allowed",
True,
False,
False,
True,
Jurisdiction.US,
"A forum thread whose footer declares CC BY-NC 4.0.",
),
Document(
"code-mit",
"github.com",
"MIT",
"allowed",
True,
False,
False,
False,
Jurisdiction.US,
"A permissively licensed source file.",
),
Document(
"code-gpl",
"github.com",
"GPL-3.0-only",
"allowed",
True,
False,
False,
False,
Jurisdiction.US,
"A copyleft source file with a licence header.",
),
Document(
"wire-us",
"wire.example",
"LicenseRef-negotiated-commercial",
"allowed",
True,
False,
False,
False,
Jurisdiction.US,
"A news wire item delivered under a signed agreement.",
),
Document(
"art-eu",
"artist.example",
None,
"unknown",
True,
False,
True,
False,
Jurisdiction.EU,
"An artist's portfolio page listed on a do-not-train registry.",
),
Document(
"news-eu",
"eu-news.example",
None,
"unknown",
True,
True,
False,
False,
Jurisdiction.EU,
"An EU news page that returns a TDM reservation header.",
),
Document(
"blog-eu-robots",
"eu-blog.example",
None,
"unknown",
False,
False,
False,
False,
Jurisdiction.EU,
"An EU blog post already in the corpus whose robots.txt now blocks AI crawlers.",
),
]PythonIn [22]Expand
records = []
for purpose in Purpose:
for doc in corpus:
res = resolve(doc, purpose)
records.append(
{
"doc_id": res.doc_id,
"purpose": res.purpose,
"jurisdiction": res.jurisdiction,
"decision": res.decision,
"reasons": res.reasons,
"obligations": res.obligations,
"triggers": res.triggers,
"privacy_gate": res.privacy_gate,
}
)
results = pd.DataFrame(records)| jurisdiction | screening_decision | privacy_gate | reasons | |
|---|---|---|---|---|
| doc_id | ||||
| wiki-eu | EU | allow_with_obligations | not_flagged | CC BY-SA 4.0: share-alike; CC BY-SA 4.0: attri... |
| gov-us | US | allow | not_flagged | |
| blog-eu | EU | review | not_flagged | no licence recorded: verify an applicable basi... |
| news-us | US | exclude | not_flagged | robots.txt disallows this crawler; no licence ... |
| forum-us | US | exclude | hold_before_use | CC BY-NC 4.0: non-commercial clause; CC BY-NC ... |
| code-mit | US | allow_with_obligations | not_flagged | MIT: attribution |
| code-gpl | US | allow_with_obligations | not_flagged | GPL-3.0: copyleft; GPL-3.0: attribution |
| wire-us | US | allow | not_flagged | |
| art-eu | EU | exclude | not_flagged | listed in a do-not-train registry |
| news-eu | EU | exclude | not_flagged | machine-readable TDM reservation; no licence r... |
| blog-eu-robots | EU | review | not_flagged | robots.txt disallows this crawler; no licence ... |
The GPL example is allowed with tasks under this screen. The EU blog record contains one crawler decision, a disallow. Its use basis is unresolved, so the screen sends it to review. To determine whether the rule changed after the fetch, compare the two dated observations described above.
ConsoleOut [24]Expand
decision allow 2 allow_with_obligations 3 review 2 exclude 4 research allow=2 obligations=4 review=2 exclude=3 evaluation allow=2 obligations=4 review=2 exclude=3 commercial_training allow=2 obligations=3 review=2 exclude=4
The policy treats research and evaluation as non-commercial. The licence-and-access screen allows forum-us with obligations for those purposes and excludes it for commercial training. The separate before-use privacy hold applies in all three cases. The other ten records keep the same screening decision across the three purposes. The manifest preserves the purpose, jurisdiction, screening decision and privacy gate.
Building an auditable manifest
Keep the example manifest deterministic for fixed inputs and policy version. Store the reasons beside the decision, so a later reviewer can reproduce the result and see which checks led to it.
PythonIn [25]Expand
def fingerprint(record):
payload = json.dumps(
record, sort_keys=True, separators=(",", ":"), ensure_ascii=False
)
return hashlib.sha256(payload.encode("utf-8")).hexdigest()
def captured_signals(doc):
signals = {
spec.name: getattr(doc, spec.name)
for spec in fields(doc)
if spec.metadata.get("signal", True)
}
signals["jurisdiction"] = doc.jurisdiction.value
return signals
manifest = {
"manifest_version": "2.0",
"policy": "handbook-2025-11-v2",
"config": {"honor_registries": True},
"purpose": "commercial_training",
"checked_at": "2025-11-01T00:00:00Z", # fixed so the output is reproducible
"documents": [],
}
for doc in corpus:
signals = captured_signals(doc)
res = resolve(doc, Purpose(manifest["purpose"]), **manifest["config"])
manifest["documents"].append(
{
"doc_id": doc.doc_id,
"host": doc.host,
"text_sha256": hashlib.sha256(
doc.excerpt.encode("utf-8")
).hexdigest(),
"signals": signals,
"signal_sha256": fingerprint(signals),
"jurisdiction": res.jurisdiction,
"decision": res.decision,
"privacy_gate": res.privacy_gate,
"obligations": res.obligations,
"reasons": res.reasons,
"triggers": res.triggers,
}
)ConsoleOut [26]Expand
{
"doc_id": "forum-us",
"host": "forum.example",
"text_sha256": "6f69fe65e690f6a774d05948d5d9cb8f0ce13253260a2f6cb6d30585c52e03fe",
"signals": {
"doc_id": "forum-us",
"host": "forum.example",
"license_expr": "CC-BY-NC-4.0",
"tos_training": "allowed",
"robots_allowed": true,
"tdm_reserved": false,
"registry_optout": false,
"personal_data": true,
"jurisdiction": "US"
},
"signal_sha256": "15b7efd2c7c14aed720f32812b7540c6bcc360ea36c188ae1f3c07f74b10b2de",
"jurisdiction": "US",
"decision": "exclude",
"privacy_gate": "hold_before_use",
"obligations": [
{
"stage": "before_release",
"task": "list the source in the data card"
},
{
"stage": "before_use",
"task": "privacy review: lawful basis, minimisation, erasure path"
}
],
"reasons": [
"CC BY-NC 4.0: non-commercial clause",
"CC BY-NC 4.0: attribution",
"contains personal data"
],
"triggers": [
"non_commercial",
"attribution",
"personal_data"
]
}The manifest preserves typed signal values, the jurisdiction, the purpose, configuration and reason codes. The SHA-256 values fingerprint the UTF-8 excerpt and the canonical JSON signals separately. The excerpt is absent from the signal record and the resolver never reads it. Replay this fixture with the saved policy version, configuration, purpose and typed signals. A production manifest also needs references to the archived body, timestamped observations and underlying legal instruments. Privacy holds and obligations include the stage at which work is due.
ConsoleOut [27]Expand
allow 2 allow_with_obligations 3 review 2 exclude 4 - [at_generation] filter verbatim code reproduction - [before_release] list the source in the data card - [before_release] track share-alike sources for release review - [before_use] privacy review: lawful basis, minimisation, erasure path - [before_use] verify the Art. 4 basis and record the reservation check date
The list above pools tasks across all screening decisions, including review and exclusion. Assign work from each included record’s own stage and task, and keep review or exclusion tasks alongside their recorded decision. In the commercial fixture, the excluded forum record contributes the privacy-review item.
Visualizing where the decisions come from
The first figure compares licence-and-access screening decisions across three purposes. The privacy gate is recorded separately in the manifest. The second counts how often each trigger fired for the commercial corpus. To identify the checks that fired for one document, use that record’s trigger list.
PythonIn [28]Expand
purpose_counts = (
results.groupby(["purpose", "decision"])
.size()
.unstack(fill_value=0)
.reindex(index=PURPOSE_ORDER, columns=DECISION_ORDER, fill_value=0)
)
trigger_counts = (
results[results.purpose == "commercial_training"]["triggers"]
.explode()
.dropna()
.value_counts()
.sort_values()
)VisualizationOut [29]Expand

The screen reports four exclusions for commercial training and three each for research and evaluation. forum-us accounts for the difference. Its separate privacy hold stays in effect before use.
VisualizationOut [30]Expand

In the eleven-document fixture, no_licence and attribution each fire for four documents, and tos_unknown fires for three. These counts reflect both the inputs and the checks the resolver reached. For example, art-eu has no licence in the fixture, but its registry exclusion returns before the licence check.
Trigger counts show how often reached conditions evaluated true. Keep a separate check-execution record if you need to distinguish a false condition from a skipped check. Compare a controlled rerun to assess the effect of a policy change.
Limitations and impact
The resolver applies the choices defined for this fixture, including an early exclusion when its registry flag is enabled and review when terms are unknown. For a real source, log the legal regime and the rule or grant you intend to rely on. The two German TDM provisions discussed above, §§44b and 60d UrhG, have different conditions. A versioned policy lets someone revisit the decision if the inputs or applicable conditions change.
Coverage limits what a pipeline can infer from licence data. The Data Provenance Initiative's 2024 journal audit traced 1,858 fine-tuning datasets and reported sparse, ambiguous or incorrect licence documentation. In your own corpus, measure how many records have a licence statement and how many also have retrievable underlying terms. The difference gives you a concrete review queue.
The third is that assertions can be false. A CC BY banner on a scraped page may be placed by someone who does not hold the rights, may refer to a different version of the page, or may be inherited from a template. This is sometimes called copyright laundering: a permissive licence asserted over material that was never the licensor's to license. The only defences are preferring first-party sources, recording who asserted what and when, and treating a licence assertion as a claim rather than a fact.
The fourth limitation is timing. A rightsholder can contact you after training, when you may already have published a model. Keep the earlier record and the later notice so reviewers can assess their dates, scopes and consequences. Retraining, unlearning and inference-time filtering affect different artefacts and carry different costs and guarantees. We take them up in Knowledge, Memory, Editing, and Unlearning.
The fifth limitation is scale and its consequences for fairness. A policy that requires a machine-readable licence can reject material even when you have a different way to establish permission. Measure which sources and languages move into review or exclusion, and audit a sample of both groups. Record any collective governance terms alongside the licence expression so reviewers can see who authorizes use and how they do it.
The sixth is contractual capture. Model licences such as the RAIL family and the various community licences impose use restrictions on the model, independent of the data, so a model can be open-weight and still not open for your use. Data obligations, meanwhile, may not survive into the model at all: a share-alike obligation that attaches to documents has no clear counterpart in weights, and the question of whether it should is unresolved. A release review therefore has to check two things that live in different places, the data manifest and the model licence, and the tools for doing that are still immature.
A retained manifest can help rebuild a mixture from eligible shards, answer questions about the source of an item, and support the disclosures discussed in the next chapter where the applicable regime requires them.
Ask what you can do with each document and what evidence supports that use. Record public access, any licence, and any basis for a public-domain determination separately.
Summary
- A data-use signal is a recorded input to a permission decision. Store what the source asserted, who supplied it, which use it covers, and when you checked.
- The pipeline makes five decisions about crawling, indexing, training, outputs, and release. Record which actions each instrument covers.
- In US copyright law, facts remain available and an original selection, coordination or arrangement can receive compilation protection. The EU’s separate database right can restrict extraction from a qualifying database independently of copyright in the individual items.
- Licences can be modelled as profiles of obligations and restrictions.
ANDrequires meeting both branches, andORlets you choose an applicable branch. Once scope and precedence are resolved, the policy takes the union of covered actions and removes any independently blocked actions. - Normalize licence identifiers with SPDX and preserve the original source terms. A
LicenseRef-can point to locally identified terms, such as a negotiated agreement. - Assess each act separately. The case examples distinguish building a dataset, acquiring copies, and using those copies in training. Apply the relevant adaptation or release conditions to the specific artefact and conduct under review.
- Terms of service require a separate review of notice, assent and the terms in effect. Save a dated snapshot and hash at ingest.
robots.txtis governed by RFC 9309, which specifies longest-match precedence, group merging, and a 500 KiB floor. The CPython 3.11 example shows how first-match precedence can give a different answer.- Record what the crawler token covers. Some tokens regulate fetching and others specify downstream use. Record when and where you checked each one.
- Check the conditions of any exception. EU Article 4 requires lawful access and an appropriate-reservation check. The US example directs uncertain uses to a case-specific fair-use review. The UK’s section 29A exception is limited to non-commercial research and has separate conditions.
- Record consent and authority separately. A registry entry can express a preference. A content credential can support verification of a signed claim. Check who can grant the contemplated use and whether the assertion satisfies the applicable conditions.
- Check personal-data requirements separately. A copyright grant alone supplies neither a lawful basis for processing nor third-party personality-rights clearance.
- Check each applicable source of permission and restriction. Route unresolved conflicts to review and enforce explicit exclusion rules. The fixture, for example, excludes a record with a TDM reservation even when a licence is present.
- The licence-and-access screen reports allow, allow with obligations, review, or exclude. Record any before-use privacy hold separately. Give each review item an owner and a decision deadline.
- Shard by obligation, not only by domain or quality, so that a mixture can be re-derived when the policy or the law changes.
- Keep the reason codes and exact policy version beside the decision. Freeze the dated manifest so a reviewer can cite it and compare it with a later run.
The next chapter takes the manifest and asks what you owe the outside world: attribution, training-data disclosure, and the transparency regimes that turn all of this bookkeeping into a published artifact.
Quiz
Ready to test your understanding? Take this quick quiz to reinforce what you've learned about licensing, consent, and data-use signals.
Licensing, Consent, and Data-Use Signals
Join the discussionAsk a question or share what you learned.
Keep exploring
Reference
Citation details
Cite or share this article.


Comments
Add to the conversation
A question, a correction, or an example from your own work.
No comments yet. Be the first to share your thoughts!