Skip to content
mentoor

Topic 1 of 6 · 4 min read

Collecting data with consent and coverage

Goal: Audit a proposed training dataset for consent, licence and coverage gaps before it is used.

Before any data reaches a training script, answer two questions: are you allowed to use it, and does it look like what the model will meet in production? A model can only learn from what it was shown, and it inherits every legal and practical problem in the data.

Check yourself · 1 of 3

A team wants to train on a public dataset. What must they check first about its contents?

Choose one answer

Why it matters

A licence or consent problem found after training means retraining, or deleting a model that cost weeks. A coverage gap shows up later and more quietly: the model works in the demo and fails on the users nobody collected data from.

How to audit a dataset

  1. Name the source of every slice. Scraped pages, a vendor, your own product logs, a public benchmark, user uploads. Write one line per slice.
  2. Check the right to use it. Public is not the same as free to use. Read the licence (see Creative Commons for what each one permits), the site's terms and any vendor contract. "Non-commercial" blocks a commercial model.
  3. Check consent for personal data. Did people agree to this use, or only to the original service? Under rules such as the GDPR, a purpose given at collection does not stretch to anything you like. Find names, emails, faces, voices and free-text fields that contain them, and decide whether to remove, mask or drop them.
  4. Map coverage against deployment. List the conditions the model will face: languages, devices, regions, age groups, lighting, accents, product categories. Count examples per condition. Empty or thin cells are gaps.
  5. Record the decision. Keep the audit next to the data, so the next person does not repeat it.

Before and after

Weak plan: "We will train the support classifier on 200,000 scraped forum posts." Nobody checked the forum's terms, posts contain usernames and email addresses, and 90 percent are from one English-speaking country while the product ships in six.

Fixed plan: the forum's terms are read and one board with a permissive licence is kept, usernames and emails are masked, and a coverage table shows per-language counts. French and Arabic are thin, so collection for those is planned before launch, and the model is not marketed there until then.

What goes wrong

  • Convenience sampling. You use the data that was easy to get, such as one app version, one country or the heaviest users, and the model learns only them.
  • Licence laundering. A dataset on a public hub is trusted without checking where its contents came from.
  • Personal data left in free text. Structured columns are cleaned, but support tickets still hold phone numbers.
  • Coverage measured by total size. Two million rows can still hold ten examples of the case that matters.

Examples

A coverage table

A defect-detection model for phone screens is trained on photos from one factory line. The audit table has rows for lighting (bright, dim), phone model (4 models) and defect type (5 types). Dim lighting has 3 photos in total, and two defect types have none on the newest model. Those cells become collection tasks before launch.

Personal data in free text

A churn model uses support tickets. The customer_id column was hashed, but ticket bodies contain names and phone numbers. The audit adds a masking step on the text and a check that samples 200 tickets after masking to confirm nothing leaks through.

Key points

  • Write down the source and the right to use for every slice of data before training.
  • Public availability is not permission: read the licence, the site terms and the vendor contract.
  • Consent given for one purpose does not automatically cover training a model.
  • Compare counts per condition in the data with the conditions in deployment to find gaps.
  • Total size says little about coverage; thin cells hide the cases that fail.

Common mistakes

  • Treating anything found online as free to use for training.
  • Auditing the columns that look personal and ignoring free text and images.
  • Judging coverage by row count instead of by count per condition the model will face.
  • Leaving the source and licence decisions in someone's head instead of next to the data.

Check yourself · 2 of 3

A dataset has two million rows but only ten examples of a case the model must handle. What does this show?

Choose one answer

Check yourself · 3 of 3

Support tickets will train a classifier. The ID column is hashed, but ticket text holds phone numbers. What is the best next step?

Choose one answer

Practice items, not counted towards your mastery.

Start here

More for this topic

Where to go in your country