Data Quality and Validation for Training Sets
Relevance is about distribution, not only about volume. A public dataset can be large and still describe inputs that your users rarely send, while a smaller stream of your own application records may match the task closely.
Where Training Data Really Comes From
Many people who start building a model assume the hard part is the model itself. In practice, a team often spends more effort deciding what data the model should learn from. A dataset is rarely something you find ready-made. It usually has to be assembled from several places, cleaned, extended, and labeled before a model can use it. The name for that assembly work is data acquisition, and it is planned the way an engineer plans a supply chain: you need to know which inputs you require, where they can come from, what they cost, and what condition they will be in when they arrive.
The goal is a dataset that is large enough, varied enough, and accurate enough for the task, collected in a way that respects user privacy and the rules that apply to the data. Keep one question in mind as you read the rest of this article: for each record in the eventual dataset, where did it come from, and what has happened to it since?
What do you think happens?
A team starts with 4,200 support conversation records. It removes 300 of them and then adds 400 newly generated conversations. How many records does it have at the end?
Reveal answer
4,300 records
Removing 300 leaves 3,900 records, and adding 400 brings the total to 4,300. Both steps change the count, which is why you have to track the count after every operation rather than only at the start and the end.
Four Routes to Acquiring Data
Acquisition draws on four broad routes. The first is sourcing public data, which means finding datasets that other people have released. The second is purchasing proprietary data, which means paying a provider for data it holds and you do not. The third is annotating data, where people add labels or other information to examples that already exist. The fourth is synthesizing data, where new examples are generated from existing data or from templates.
These routes are not alternatives that you choose between once. They are combined. A single dataset can contain records from several sources, and the same dataset can pass through annotation and synthesis more than once. The sourcing routes supply raw records, while annotation and synthesis change those records or add to them.
Why Your Own Application Data Comes First
Of the four routes, the one that usually matters most is the data your own application produces. The reason is distribution. Your application's records reflect the kinds of inputs your users actually send, in the proportions in which they actually send them. Public and purchased datasets were gathered for someone else's purpose, so how well they match your task is often only partial. Matching the distribution of the data you care about is difficult to achieve with other sources, which is why application data is described as ideal for the task.
Relevance is about distribution, not only about volume. A public dataset can be large and still describe inputs that your users rarely send, while a smaller stream of your own application records may match the task closely.
Application data can also feed back into the product. A useful pattern is a loop in which users generate data, that data is used to improve the product, and the improved product generates more useful data. Teams often call this a data flywheel. Application data takes three broad forms: user content that users create, system-generated data that records how the product is used, and user feedback. The design of a feedback system is a topic of its own and is covered later in the course.
Searching and Validating Public Data
Before you invest in creating data, check whether a suitable dataset already exists. Data marketplaces hold both open and proprietary datasets, and some of them may match your requirements closely. In many projects, though, the result is a combination of several partial matches rather than one perfect dataset. The useful habit is to search first, then decide which parts still have to be built.
Public data has a second requirement that is easy to forget: a public dataset is not automatically safe to use. Before using one, check its license and try to understand where its contents came from. A license that permits commercial use can still cover a dataset that includes material collected under different terms. Public data is worth using, but it has to be inspected and validated like any other input.
Ready-made data also comes from evaluation harness tools. Some of them host benchmark datasets that are large enough to use for parameter-efficient fine-tuning. One example is the lm-evaluation-harness from EleutherAI, which hosts more than 400 benchmark datasets, averaging over 2,000 examples each. Even when a source like this is well known, the same license and provenance checks still apply before its data enters your training set.
Tracing a Dataset Through Each Step
A dataset changes at every step of acquisition, and the easiest way to see how is to follow one through the process. Suppose you are building a dataset of customer support conversations, where each record pairs a customer message with a good agent reply. The example below is a generated illustration, not a figure from a real project. Watch how the count and the quality change as each step is applied.
Start from the state the dataset has reached after the rewriting step: 4,200 records, of which 1,000 have been rewritten. The team then removes 300 records that the annotators flagged as unanswerable, and generates 400 new conversations from 10 templates. The diagram traces the record count through those two changes.
Tracking the count through removal and synthesis
The dataset has 4,200 records after rewriting, 1,000 of which were rewritten. The team removes 300 unanswerable records, then generates 400 conversations from 10 templates. What is the record count at the end, and which of these two changes alters the count?
- 1Start
The dataset holds 4,200 records. The rewriting that already happened did not change this number.
- 2Remove 300
Removing the flagged unanswerable records gives 4,200 minus 300, which is 3,900 records. This change alters the count and also removes records that would have hurt quality.
- 3Generate 400
Generating 400 conversations adds 400 records, giving 3,900 plus 400, which is 4,300 records. This change alters the count, and it does so by producing 40 instances from each of the 10 templates.
- 4Compare the two changes
Both changes alter the count. The removal lowers it and the generation raises it. Neither changes quality on its own in the way that rewriting and relabeling do, so the count alone cannot tell you how good the dataset is.
The final dataset has 4,300 records. Both the removal and the generation changed the count.
Size and Quality Are Separate Measurements
The support example contains a detail that is easy to overlook. The rewrite step produced no change in size, yet it was one of the most important steps for quality. Adding, removing, rewriting, and labeling affect size and quality in different ways. Adding and removing records change the count directly. Rewriting and labeling can improve quality without changing the count at all.
Size and quality are separate measurements. An acquisition plan that tracks only the record count will hide problems in quality, and the steps that matter most for quality are often the ones that leave the count unchanged.
A practical way to apply this is to record two numbers after every operation: how many records the dataset holds, and what state its records are in. For rewriting and labeling, the second number is the one that moves. For removal and generation, both numbers move. Checking both together keeps you from celebrating a growing count while the records underneath it are getting worse.
Synthesis: Growing a Dataset From Templates
Synthesis is the route that adds data from existing material. A common pattern is to write a small number of templates by hand, then use an AI model to produce many instances from them. Synthesis is useful for increasing the size of a dataset, particularly in areas where real examples are scarce.
Annotation and Relabeling Loops
Annotation adds the labels or other information that make data usable for training. Manual annotation is central to building a high-quality dataset, and it is rarely a single pass. Once annotators start working, a team often discovers that some labels are not helpful. The response is to revise the annotation guidelines and relabel the affected records.
Some errors are factual rather than stylistic, and those may call for a second group of annotators who check the first group's work. The cost of these loops is part of the acquisition budget, not an unexpected extra. Plan for them from the beginning.
Mistakes When Planning an Acquisition Pipeline
Common mistake Trusting public data without checking it
What it looks likeDownloading a popular public dataset and adding it straight to the training set because it is well known.
Why it failsA license that permits commercial use can still cover material collected under different terms, and the origin of the contents may be unclear.
Do this insteadCheck the license, try to understand where the contents came from, and validate the quality before the data enters the training set.
Common mistake Tracking only the record count
What it looks likeReporting that the dataset grew to 4,300 records and treating the work as finished.
Why it failsRewriting and relabeling can improve quality without changing the count, so a count-only plan hides quality problems.
Do this insteadRecord size and quality together after every operation.
Common mistake Generating many instances from few templates
What it looks likeProducing 400 conversations from only 10 templates, so each template yields 40 near-identical records.
Why it failsThe output inherits the shape of its templates, which makes the dataset repetitive.
Do this insteadWrite more templates and generate fewer instances from each one.
Common mistake Treating annotation as a single pass
What it looks likeLabeling every record once and never revisiting the guidelines.
Why it failsSome labels turn out to be unhelpful, and factual errors may need a second group of annotators.
Do this insteadBudget for revision and relabeling loops as part of the acquisition cost.
Common mistake Building the model before searching marketplaces for existing datasets that might already match the task closely.
Practice: Follow the Dataset
Start from the state after rewriting: 4,200 records, 1,000 of them rewritten. The team removes 300 unanswerable records and then generates 400 conversations from 10 templates. Both of those changes alter the record count. Which step in this plan improves quality without changing the count, and what is the final record count?
Hints
- Subtract the removed records from the starting count first.
- Then add the generated records to the new total.
- Rewriting and relabeling are the steps that change quality without changing the count.
Key Takeaways
- Data acquisition assembles a dataset through four routes: sourcing public data, purchasing proprietary data, annotating data, and synthesizing data, and real datasets usually combine several of them.
- Application data is usually the most valuable starting point because its distribution matches the inputs your task actually involves, and it can feed a data flywheel that improves the product over time.
- Public datasets should be searched for first, but each one must be checked for license terms, provenance, and quality before use.
- Size and quality are separate measurements: adding and removing records change the count, while rewriting and relabeling can improve quality without changing it, so track both after every step.