Concepts / Curating Data for Specific Languages and Domains

Curating Data for Specific Languages and Domains

Large, easily collected web data such as Common Crawl is convenient but contains real quality problems, including clickbait, misinformation, and fake news.

  • Programming

The Shortcut of Feeding Everything In

Suppose you are building a language model and you need a huge amount of text to train it. The easiest move is to take whatever is already available and feed all of it in. Nothing has to be negotiated, licensed, or written by hand, and the volume looks impressive. This shortcut is the starting point for the problems in this article. Collecting data is easy. Deciding which data is worth keeping is the hard part, and that choice shapes what the finished model can and cannot do.

What do you think happens?

If a team trains a model on all the available web text it can get, which outcome is most likely?

  • The model becomes good at everything the team cares about

  • The model becomes good at the tasks represented in the data, which may differ from the tasks the team needs

  • The model cannot learn anything useful from web text

Reveal answer
Answer:

The model becomes good at the tasks represented in the data, which may differ from the tasks the team needs

The source warns that training on whatever data is available can produce models that do well on that data without doing well on the tasks you actually care about. The mismatch often stays hidden until the model is evaluated on the work it was meant to do.

Where Web-Scale Training Text Comes From

A widely used starting point for web-scale training text is Common Crawl. It is produced by a nonprofit organization that crawls websites across the internet on an irregular schedule rather than continuously. In 2022 and 2023, this organization collected roughly 2 to 3 billion web pages each month. Because the collection is so large and so freely available, it became a convenient raw material for many projects.

Google offers a cleaned version of this material called the Colossal Clean Crawled Corpus, usually shortened to C4. Cleaning helps, but the source notes that the quality of C4 is questionable to a certain extent. This tells you something important: a cleaned subset still inherits many of the problems of the collection it came from. Cleaning is not the same as curating for a purpose.

Quality Problems in Bulk Web Text

Bulk web text is not sorted by usefulness. A crawl captures whatever pages it reaches, and the open web includes clickbait, misinformation, propaganda, conspiracy theories, hateful content, and sites that most careful readers would avoid. These quality problems are the central reason curation is needed at all. A dataset does not become trustworthy simply because it is large.

The problem can be checked against outside ratings. A study by the Washington Post examined the one thousand most common websites in the dataset and found that several media outlets among them rank low on NewsGuard's scale for trustworthiness. In plain terms, a widely used source of training text contains a meaningful amount of fake news, and this is true even of its most frequently appearing sites.

If the problems are so visible, why does problematic data keep appearing in training pipelines? Part of the answer is that the same convenient source is reused. Variations of Common Crawl are used in most foundation models that disclose their training data sources, including OpenAI's GPT-3 and Google's Gemini. The source also points to a less visible effect: many companies have stopped disclosing their training data sources, partly to avoid scrutiny from the public and from competitors. The full picture of which sources were used is therefore often hidden from outside observers.

Tracing a Document Through a Popularity Filter

Some teams respond to quality problems with heuristics, which are simple rules that screen data before it reaches training. One documented example comes from OpenAI, which used only the Reddit links that received at least three upvotes to train GPT-2. The idea is that a link other people chose to endorse is more likely to be worth keeping than one nobody reacted to. Follow a single web document through this rule. It enters the filter, and the first question is whether it is a Reddit link. If it is, the filter counts its upvotes. A link with three or more upvotes is kept. A link with fewer is removed.

Raw web documentReddit link?3 or more upvotes?Kept for trainingRemovedenters filteryesyesno
What happens to a single raw web document as it moves through each filter, and at which stage is it removed or kept?
Worked example

Three Documents Through the Upvote Rule

Three documents from a crawl are passed through the rule that keeps only Reddit links with at least three upvotes. Which documents are kept for training?

  1. 1
    Document A

    A Reddit link with 1 upvote. Because it has fewer than 3 upvotes, the rule removes it.

  2. 2
    Document B

    A Reddit link with 12 upvotes that contains a false claim. It has at least 3 upvotes, so the rule keeps it. The rule counts upvotes only, so the false claim is never checked.

  3. 3
    Document C

    A news article page that is not a Reddit link. The rule as described only screens Reddit links, so this rule does not evaluate it at all.

Result

Document A is removed. Document B is kept even though it carries misinformation. Document C is outside what this rule examines. The heuristic removed the least-endorsed document but let the problematic one through.

What a Popularity Filter Cannot See

The source is candid about this trade-off. The rule does help screen out links that nobody cares about, but Reddit is not exactly a model of propriety and good taste. An upvote count measures popularity, and popularity does not guarantee accuracy or appropriateness. A heuristic removes some noise while leaving other problems in place. In the worked example, the filter could not tell a well-endorsed true claim from a well-endorsed false one, because it never looked at the content.

Why Curation Beats Collecting Everything

Definition

Curation, in this context, means choosing what goes into a dataset based on the job the model must do. Instead of asking how much text is available, the curator asks which text serves the target language and domain.

The remedy the source proposes is to curate datasets that align with your specific needs. The source describes a direction that focuses on specific languages and domains, aiming for a foundation that is broad enough to be useful but specialized enough to serve applications in those areas. The contrast is clearest when you set a collect-everything approach beside a curate-to-needs approach.

Whatever is availableChoices based on thejobClickbait andmisinformationTarget language anddomainTasks the datahappens to coverSpecializedfoundation orfinetuning
How does a curated, domain- and language-matched dataset differ in composition from a larger, unfiltered web collection?

According to the source, specialized models can be built in two ways. A language- or domain-specific foundation model can be trained from scratch, or a general-purpose model can be finetuned further on specialized material. Either route depends on having data that actually reflects the target. Curation is what makes that data available.

A natural objection is to train on everything, general and specialized data together, so the model can do everything. The source acknowledges that many people do this. It also warns that training on more data often requires more compute resources and does not always lead to better performance. More volume is not a free improvement.

Small Clean Data Against Large Noisy Data

The strongest argument for curation is that quality can matter more than quantity. The source states that a model trained with a smaller amount of high-quality data might outperform a model trained with a large amount of low-quality data. This directly challenges the assumption that more text always produces a better model.

The source gives a concrete case. Gunasekar et al. (2023) used 7B tokens of high-quality coding data to train a 1.3B-parameter model. That model outperforms much larger models on several important coding benchmarks. Trace the two training sets side by side. One is small and carefully chosen. The other is large and unfiltered. The diagram lays out the contrast the source is making.

High-quality codingdata7B tokensLarge low-qualitydatalarge amount1.3B-parameter modelModel trained on itBeats much largermodelson coding benchmarksMay underperformtrainsresulttrainsresult
How do the data volume and quality of each training set differ, and how does that difference show up in the resulting model?

Common Mistakes With Dataset Quality

  • Common mistake

    Treating dataset size as proof of quality

    What it looks like

    A team sees billions of pages in a crawl and assumes the collection is ready for training.

    Why it fails

    The source says a dataset does not become trustworthy simply because it is large. Bulk web text includes clickbait, misinformation, and propaganda.

    Do this instead

    Judge a dataset by what it contains and whether it matches the job, not by how many pages it holds.

  • Common mistake

    Assuming a popularity filter removes misinformation

    What it looks like

    A rule keeps only Reddit links with at least three upvotes, so the team concludes the kept data is accurate.

    Why it fails

    An upvote count measures popularity, and popularity does not guarantee accuracy or appropriateness.

    Do this instead

    Treat heuristics as partial filters and check the content for the qualities the model needs.

  • Common mistake

    Assuming a cleaned corpus is clean

    What it looks like

    A team chooses C4 because it is a cleaned version of Common Crawl and skips further review.

    Why it fails

    The source notes that the quality of C4 is questionable to a certain extent, since a cleaned subset still inherits many problems of its parent collection.

    Do this instead

    Cleaning reduces some problems. It does not replace checking whether the data suits the target.

  • Common mistake

    Training on whatever data is available

    What it looks like

    A team wants a medical assistant but feeds in general web text because it is the easiest source.

    Why it fails

    The model tends to become good at the tasks represented in its data, which may not be the tasks the team cares about.

    Do this instead

    Start from the target language and domain, then choose data that reflects them.

Practice Choosing a Dataset

MEDIUM

A team wants a language model that answers questions about public health in Spanish. Their first plan is to use a large general web crawl with no changes. Describe how you would curate the data instead. Name at least two kinds of content you would exclude, and explain why the rest of the dataset should match the target language and domain.

Hints
  • Recall the source's point that training on whatever is available can produce a model that does well on that data but not on the tasks you care about.
  • Think about what the source lists as quality problems in bulk web text: clickbait, misinformation, propaganda, and similar content.
  • The source frames curation around the job the model must do, so start from the target language and domain.

Key Takeaways

  • Large, easily collected web data such as Common Crawl is convenient, but it carries real quality problems, including clickbait, misinformation, and fake news.
  • Simple heuristics, such as keeping Reddit links with at least three upvotes, remove some low-quality data but cannot judge accuracy, so they do not solve curation on their own.
  • Curation means choosing data based on the job the model must do, which can matter more than collecting the most data.
  • A smaller high-quality dataset might outperform a much larger low-quality one, as the Gunasekar et al. coding example illustrates, though quality is not a guarantee in every case.

Related concepts

More concepts starting with C