Chandra PrakashCo-Founder & CTO
Writing / consent-based-training-data-llm-ops
Article
published November 27, 2026

Consent-based training data: a working spec

Dataset manifests, per-app guardrails, scope-leak tests and a release register — the paperwork that makes a fine-tuned LLM defensible, not just functional.


Most of what gets called "our own AI model" is a system prompt and a vendor API key. Some of it is a genuine fine-tune. Almost none of it can answer the question that matters when a client's procurement team, an auditor, or a regulator asks it:

Where did the rows come from, and what gave you the right to train on them?

That is not a model-quality question, and you cannot answer it retroactively. If you fine-tuned on a folder of .jsonl files whose contents came from "the export we did in March," the answer does not exist, and no amount of eval score recovers it. The useful work is almost entirely in the record-keeping that surrounds the training run — which is unglamorous, cheap to do at the start, and effectively impossible to backfill.

This is the spec I settled on while building ZedLLM, the shared AI core behind a staffing platform, an HRMS, a careers site, a legal practice tool and a marketing engine. Five applications, one gateway, one set of rules. Nothing here requires a research team; it requires deciding that provenance is part of the build rather than a document you write later.

What a dataset manifest actually contains

Start here, because everything else hangs off it. One file per dataset, versioned in git, and it does not contain any training rows:

{
  "dataset": "verified-answers-hr-2026-10",
  "rows": 4812,
  "content_sha256": "9f2c…",
  "source_system": "hrms.internal / verified-answer capture",
  "collected_between": ["2026-09-01", "2026-10-31"],
  "basis": "employee-consent-v3",
  "basis_document": "consent/employee-ai-assist-v3.md",
  "subjects": "employees of a single tenant",
  "redaction": "names, employee IDs, salary figures, phone numbers removed pre-write",
  "split": { "train": 0.9, "validation": 0.1, "seed": 11 },
  "retention": "24 months from collected_between[1]",
  "deletion_hook": "subject_id index in object store, per-row delete supported",
  "storage": "s3://…/verified-answers-hr-2026-10.jsonl.zst"
}

Nine of those fields are boring. Four of them are the entire point:

basis is the field everybody skips. It names why you may use these rows, and it has to resolve to something a human wrote and someone agreed to — a consent notice version, a contract clause, a legitimate-interest assessment. "It was in our database" is not a basis. If the field cannot be filled honestly, the dataset is not a dataset yet.

deletion_hook is the field that decides whether you can honour an erasure request a year from now. If rows carry no stable subject reference, you cannot delete one person's data without rebuilding the whole corpus — which means in practice you will not do it. Decide this before the first write, not after the first request.

content_sha256 is what makes a training run reproducible and a claim checkable. Without it, "we trained on the October dataset" names nothing in particular, because the file on the bucket has been appended to twice since.

retention forces the question of when the dataset stops existing. A corpus with no expiry is a corpus you will still be holding when the lawful basis for holding it has lapsed.

The rows do not live in the repository

This is the one rule I would keep if I had to throw out everything else.

Git is append-only in the way that matters here. A personal-data row committed once stays in the object database, in every clone, in every fork, and in the CI cache — and it survives the commit that "removed" it. Repository access is also coarse: a read token for the code is a read token for everything in the tree. And a merged 16 GB checkpoint makes every clone a punishment.

So the split is: manifests, schemas, guardrail policies, eval sets, training scripts and release records go in the repo. Raw rows, merged checkpoints, base weights and anything with a subjects field go in object storage with their own access policy, referenced by hash.

Base weights are a special case worth stating explicitly: do not commit them, and do not name them loosely either. "Fine-tuned Llama" is not a version. Pin the exact upstream revision — on Hugging Face, the commit hash of the model repo, not the branch — in a release register alongside the adapter, the dataset manifests used, the eval results and the date. A year later that register is the only thing that can reconstruct what you shipped.

One guardrail policy per application

The instinct is a single global policy, because four policies sound like four times the work. In practice the single policy converges on the loosest requirement any one application has, because every tightening breaks somebody else's feature, and the person whose feature broke is in the room.

The applications genuinely differ:

  • A careers assistant talks to candidates about roles and process. It must never discuss an individual candidate's status with anyone but that candidate, and it has no business touching payroll.
  • A legal case assistant answers from one matter's documents and must cite the page. A plausible answer with no citation is worse than a refusal, because the whole point is that a human can check it.
  • An HR assistant sits on the most sensitive corpus in the company and answers questions from employees about their own records — which means identity resolution is part of the guardrail, not a layer above it.
  • An outbound marketing assistant writes to strangers. Its constraints are about claims: no invented figures, no invented case studies, no client names that are not on the approved list.

Four policies, one schema, each one a file under review. The schema matters more than the contents: when a policy is a structured document rather than a paragraph of prose inside a prompt, you can diff it, test it, and point at the version that was live on a given date.

Two things go in front of anything consequential, regardless of application. A cross-origin verifier — the request's claimed application and tenant are checked against the credential it arrived with, not against what the payload says it is. And a human approval gate bound to the exact payload: the approval signs the specific bytes that will be sent, so an approved action cannot be swapped for a different one between approval and execution. An approval gate that approves "a response of this kind" is decoration.

Tenant scoping is a test, not an instruction

Scoped retrieval is where multi-tenant AI quietly goes wrong, and it goes wrong in a way that no user ever reports, because the user who received someone else's data has no idea it was someone else's.

If the scoping lives in the prompt — "only answer from documents belonging to tenant X" — you do not have scoping. You have a request, made to a system that is statistically inclined to be helpful. The scope has to be in the query: a predicate in SQL, a filter in the vector search, enforced by the row-level security policy of the database rather than by the layer calling it.

And then it has to be tested as adversarially as you would test an authorisation boundary, because that is what it is:

seed tenant A with a document containing a unique sentinel string
seed tenant B with a different sentinel
query as B for A's sentinel, directly and obliquely
query as B with an instruction to ignore previous instructions
query as B for an aggregate that would require A's rows to compute
assert: zero rows, in every case

Run it in CI. It will pass for months and then fail the day someone adds a convenience join to a reporting query, which is precisely the day you want to hear about it.

Evaluation: golden sets, judge passes, and what they cannot tell you

A fixed, versioned golden set per application — a few hundred questions with known-good answers and known-bad traps — is the difference between "the new model feels better" and a decision you can defend. Run it against each candidate model, store the results by date and model, and keep the old results. Model bakeoffs are only meaningful against a set that did not change between the runs.

A second model as a judge over every answer is genuinely useful, with two caveats that are easy to miss.

First, the judge is a model, so its failures correlate with the one it is judging. Both will accept a fluent, confident, wrong answer in the same way. A judge catches sloppiness; it does not catch a shared blind spot.

Second, a judge that sees only the answer cannot check it. Give it the retrieved context and have it verify support — does this sentence follow from the passages, and does each cited page actually say what the citation claims — rather than asking "is this good?" Support checking is mechanical enough to be reliable. Quality judgement is not.

A pattern worth the complexity: let the local model rate its own confidence first, and send only the low-confidence answers — plus anything touching citations, dates, figures or statutory references — to the stronger checker. The economics change completely once you are not paying frontier prices for every token, and the answers that get escalated are the ones that would have embarrassed you.

The honest limitation: none of this measures whether the system is useful. It measures whether it is wrong in ways you have already thought of. The failures that matter most are usually in the third category — right, well-cited, and answering a question nobody asked.

The regulatory floor, briefly

I am not a lawyer and this is not legal advice. But two things are now concrete enough that engineers building this should know they exist.

EU AI Act, Article 53(1)(d). Providers of general-purpose AI models placed on the Union market must publish a sufficiently detailed summary of the content used for training, using the template the Commission provides — and using the template is mandatory, not one option among several. The obligation applies from 2 August 2025; the Commission's FAQ states that enforcement by the AI Office begins 2 August 2026, with non-compliance exposed to fines of up to 3% of worldwide annual turnover or €15,000,000, whichever is higher. Models already on the market before August 2025 have until 2 August 2027. Summaries are to be updated at six-month intervals, or sooner if new training data makes a materially significant difference. (Article 53 · Commission template FAQ)

The part that catches fine-tuners: the Commission's FAQ addresses what happens when a downstream entity modifies a model already on the market such that it becomes the provider of the resulting model. In that case the summary covers the content used for the modification, with a clear reference to the original model and its summary. Whether a given fine-tune crosses that threshold is a question for the scope guidelines and your counsel — but "we only fine-tuned" is not, on its own, an exemption. A dataset manifest per adapter is most of what such a summary would need anyway, which is a decent argument for keeping them from day one.

India's DPDP framework. The Digital Personal Data Protection Act was enacted on 11 August 2023, and the DPDP Rules were notified in the Gazette on 13 November 2025, with the substantive obligations in Rules 3 and 5–16 commencing eighteen months after publication. The framework's seven principles include purpose limitation, data minimisation, storage limitation and accountability — all of which read, from an engineering seat, as requirements on exactly the manifest fields above. Consent notices must be standalone, in plain language, and must state the specific purpose. Rule 8 requires erasure once the specified purpose is no longer served, with notice to the person beforehand. Significant Data Fiduciaries carry annual impact assessments and audits plus due diligence on deployed technologies. (MeitY / PIB release)

Read together, the practical consequence for an Indian services company training on operational data is unremarkable and inconvenient: a corpus assembled under a generic "improve our services" notice is probably not a corpus you can train a model on and keep. The eighteen-month clock is the window to fix the collection side, not the window to keep collecting the old way.

What this costs

Worth being straight about the trade-offs, because articles like this usually are not.

It slows the first useful demo down. A prototype on scraped internal data ships in a week. The same thing with a basis field you can defend takes a month, because the month is mostly conversations about what you actually told people you would do with their data.

Some data turns out to be unusable. This is the real cost. Occasionally the honest answer to basis is "nothing gave us the right," and the corpus goes in the bin. That is a feature, in the sense that finding out at manifest-writing time is enormously cheaper than finding out during a client security review — but it does not feel like one.

It is one more surface that can go stale. A manifest nobody updates is worse than no manifest, because it asserts something false with the authority of a checked-in file. Generate what you can from the data itself — row counts, hashes, date ranges — and keep the hand-written fields down to the ones that genuinely require a human decision.

Self-hosting the inference is a separate decision. Running your own embeddings, OCR and speech on owned hardware removes a class of data-residency problem entirely and makes the per-query cost near zero after the box is paid for. It also means you now operate a GPU box, with the patching, capacity planning and 3 a.m. pages that implies. Both answers are defensible; pretending the second cost does not exist is not.

The checklist

If you take one thing from this, take the list:

  1. Every dataset has a manifest in git. No manifest, no training run.
  2. The manifest names a lawful basis that resolves to a document a human wrote.
  3. Rows live in object storage, never in the repo. Base weights pinned by revision hash.
  4. Every row is deletable by subject, and that path has been exercised at least once.
  5. One guardrail policy per application, in a schema, under review.
  6. Tenant scoping is a database predicate and a CI test, not a prompt instruction.
  7. Approval gates sign the exact payload.
  8. A versioned golden set per application; keep every result; never edit the set mid-comparison.
  9. The judge sees the retrieved context and checks support, not vibes.
  10. A release register: adapter, base revision, datasets, eval results, date.

None of it is research. All of it is the difference between a system you can point an auditor at and a system you can only demo.

Common questions

What is a dataset manifest for LLM training?
A small versioned file that describes a training dataset without containing it: the row count, a content hash, the source system, the date range, the consent or lawful basis for using those rows, the redaction applied, the train/validation split, and the retention and deletion rule. The rows themselves live in object storage and are referenced by hash. The manifest is what goes in git; the data never does.
Does fine-tuning a model make me the provider under the EU AI Act?
It can. The European Commission's guidance on the general-purpose AI model rules states that when a downstream entity modifies a model already on the Union market such that it becomes the provider of the resulting model, it must publish a training-content summary covering the content used for its own modification, with a clear reference to the original model. Fine-tuning is not automatically that threshold, but it is not automatically outside it either, and the scope guidelines are the document to read before assuming either way.
Why keep training rows out of the git repository?
Three reasons. Git keeps everything forever, so a personal-data row committed once survives every later deletion request in the object database and in every clone. Repository access is coarse, so anyone who can read the code can read the data. And a merged checkpoint or raw corpus bloats the repo for every contributor. Keeping rows in object storage, referenced by a manifest hash, means a deletion request is executed in one place and the repo keeps only provenance.
What is a scope-leak test?
A test that asks the retrieval layer, as one tenant, for content that belongs to a different tenant or a different division, and fails the build if anything comes back. It is written as a normal test suite over seeded fixtures and run in CI, because tenant scoping that lives only in a prompt instruction is not scoping — it is a request.
Do I need per-application guardrail policies, or is one global policy enough?
Per application. A careers assistant, a legal case assistant, an HR assistant and an outbound-marketing assistant have genuinely different rules about what they may discuss, what they may retrieve, and what requires a human. One global policy written to satisfy all four ends up being the loosest of the four, because every tightening breaks somebody.