Skip to content
ImagineWorld

The Role of Data in LLM Performance

node_idnode-book_llm-systems-engineering_module-13-the-role-of-data-in-llm-performance
node_typechapter-node
schema_profileworld.chapter_node.v1
statusactive
entropyhigh
manifoldworld
domainimagineworld.net
authorityinforms
layercorpus
chapter_num13
chapter_titleThe Role of Data in LLM Performance
governed_byCORPUS
constitutional_citationCONSTITUTION
local graph

Module 13 — The Role of Data in LLM Performance

Section titled “Module 13 — The Role of Data in LLM Performance”

Chapter III — Data Engineering

Every capability a large language model displays can be traced back to the data it was trained on. The words it produces and the behaviors it exhibits all originate in the text processed during training. This makes data engineering one of the most consequential areas of work in the entire development pipeline, yet it is often treated as preparatory labor completed before the interesting modeling work begins. Teams that treat data as a background concern tend to encounter surprising model behaviors that trace directly to choices made early in the data pipeline. Understanding why data exerts such a strong influence on model capability is a prerequisite for making informed decisions about sourcing and composition. This module establishes the foundational case for why data deserves central attention in any serious effort to build or train a language model.

Why Data Shapes Model Capability More Than Architecture Does

Section titled “Why Data Shapes Model Capability More Than Architecture Does”

For much of the early period of large language model development, architectural innovation received the bulk of research attention. New attention variants and positional encoding schemes were treated as the primary means for improving model quality, and academic conferences were filled with papers proposing small architectural modifications aimed at incremental performance gains. The empirical record of the past several years has pushed the field toward a different understanding. Given a fixed compute budget, the composition and quantity of training data influences model capability at least as strongly as any architectural choice, and in many settings more so.

Hoffmann et al. (2022) showed that models of the same parameter count can vary dramatically in performance depending on how much data they see during training. Their analysis (Module 18) indicated that investing additional compute in more data often produced better results than investing it in a larger model with the same amount of data.

Work on data quality has reinforced the same pattern at a different angle. Penedo et al. (2023) demonstrated that careful filtering and deduplication of web-scale corpora could produce models that matched or exceeded those trained on much larger quantities of unfiltered data. Their results suggested that quality, when measured through appropriate filtering pipelines, can substitute for quantity in meaningful ways, and that a well-curated smaller corpus can outperform a raw larger one. Longpre et al. (2024a) extended this line of analysis by systematically varying data mixtures across training runs, finding that composition choices produced performance differences comparable in magnitude to those produced by changes in model size. The implication is that the same compute, spent on the same architecture, can yield models of markedly different capability depending on how the training corpus is assembled.

Capability
High │ ___________________ Curated corpus
│ __/
│ _/ _ _ _ _ _ _ _ _ Moderate filter
│ _/ _ -
│ / _ -
│ / _- . . . . . Unfiltered web
│ /_- . . . '
│ /- . . '
│ /- . '
Low │___________/.'___________________________________________
Training tokens

[!visual-conversion] In print three schematic saturating curves from a common origin (no numeric axes): curated corpus solid, rising fastest to the highest plateau; moderate filter dashed, middle; unfiltered web dotted, slowest and lowest.

Figure 3-1. Model Capability vs. Training Tokens Across Data Quality Regimes

The practical implication for teams is that attention to data pays compound returns. Architectural work often yields small improvements that are difficult to reproduce and easy to erase through minor changes in training conditions. Data work, when done thoughtfully, tends to produce durable gains that persist across model scales and deployment settings. A team that invests its best engineers in data curation is making a sound allocation of talent against the empirical record of the field. The finding also carries a humbling message for research groups accustomed to pursuing capability through novel training objectives and architectural tweaks, since the highest-return activity is often the one that looks least glamorous on a publication record.

How Training Data Determines What a Model Knows and How It Behaves

Section titled “How Training Data Determines What a Model Knows and How It Behaves”

A language model is, in a practical sense, a compressed representation of the patterns in its training corpus. The knowledge it can recall and the linguistic styles it can produce are all inherited from what it read. This inheritance is not uniform across the corpus. Content that appears frequently, in many different contexts, tends to be learned more deeply than content that appears rarely or in a narrow range of phrasings. The result is a model whose competence is highly sensitive to the statistical distribution of its inputs.

Razeghi et al. (2022) provided a striking demonstration of this effect for numerical reasoning. They found that a model’s ability to perform arithmetic on specific numbers was strongly correlated with how often those numbers appeared in the training data, suggesting that what looks like general reasoning competence can sometimes be traced to pattern frequency in the corpus. Similar effects have been observed for factual knowledge, where Petroni et al. (2019) showed that pretrained language models can be probed as informal knowledge bases whose recall tracks the prominence of entities in their training sources. Well-represented facts produce more reliable recall than those mentioned only a handful of times.

Domain coverage in the training corpus determines which areas of human knowledge a model can discuss with confidence. A model trained predominantly on general web text will handle general conversation gracefully and will struggle with specialized terminology in fields it saw rarely during training. The inclusion of code in pretraining corpora has attracted particular attention in this regard, with research indicating that exposure to programming text contributes to the development of structured reasoning and instruction-following behavior well beyond the coding domain itself.

Beyond factual recall, training data shapes the behavioral tendencies of the model. Text that is polite and well-structured produces models that lean toward polite, well-structured output. Corpora dominated by combative online discussion produce models that reach for combative framings. These tendencies emerge through exposure alone and are absorbed as part of what the model learns to generate. The same principle applies to more subtle properties such as willingness to speculate and preference for particular argumentation styles, both of which are inherited from the voice of the underlying corpus. This is why data decisions made long before any fine-tuning stage end up constraining what the model can become. A team that wants a model to behave like a careful technical reviewer will struggle to produce that behavior through fine-tuning alone if the pretraining corpus was dominated by informal conversational text, since the base distribution of the model will keep pulling its outputs back toward what it learned first.

When a deployed model produces a harmful or factually unreliable output, the initial instinct is often to treat the problem as a flaw in the model. A more accurate framing places the origin of most such failures in the training data. Bender et al. (2021) argued that large language models trained on uncurated web text inherit the distributional properties of that text, including its demographic skews and its stereotyped associations. The model reproduces these patterns from what it learned during training, and the appearance of problematic output at inference time is the surfacing of patterns that were present in the corpus all along.

flowchart TD
    S1["Stage 1 — Raw web content<br/>Bias pattern present"] --> S2["Stage 2 — Filtering & corpus construction<br/>Bias pattern preserved"]
    S2 --> S3["Stage 3 — Pretraining<br/>Bias pattern encoded"]
    S3 --> S4["Stage 4 — Model output at inference<br/>Bias pattern amplified"]

Figure 3-2. Propagation of Bias from Web Content to Model Output

Dodge et al. (2021) examined the widely used C4 corpus and documented how filtering choices that appear neutral can systematically exclude content associated with certain demographic groups. Their analysis showed that the population of authors whose writing survives into the final corpus is not representative of the population of authors who produce English text on the web, which means that the model’s notion of ordinary English is already skewed before any training begins. Blodgett et al. (2020) provided a broader conceptual treatment of bias in language technology, arguing that many bias problems in language systems are best understood as downstream consequences of the corpora and annotation practices that shape the training pipeline. Language models readily produce toxic continuations when prompted with fragments drawn from everyday web text, a behavior that arises because such fragments appear in contexts where toxic completions were present in the training data (Gehman et al., 2020).

This framing changes where the work of mitigation needs to happen. Attempts to correct biased behavior purely through post-training interventions often produce surface-level improvements that collapse under adversarial probing. Interventions at the data stage, including careful sourcing and thoughtful filtering, tend to produce more durable changes in model behavior because they address the statistical patterns the model actually learned. Teams that want models to behave well in deployment are best served by treating data curation as a first-order concern during pretraining, with architectural guardrails and post-hoc filtering serving as supporting measures. A secondary implication is that debugging failures in deployed models begins most productively with a careful audit of the training corpus, since the explanation for an unexpected behavior is more often located in what the model read than in how it computes.

A choice about what to include in the pretraining corpus propagates forward through every subsequent phase of development, influencing how fine-tuning data is selected and how deployment behavior needs to be monitored. This compounding property makes early data decisions disproportionately consequential, and gives data engineering a claim to being one of the highest-return areas of work in the entire training pipeline.

Lee et al. (2022) demonstrated one version of this compounding effect in their work on training data deduplication. They found that removing near-duplicate documents from a training corpus improved evaluation performance and reduced the rate at which models regurgitated memorized text. A single decision about deduplication propagated into measurable improvements on downstream tasks that had no obvious connection to duplicate content. The other side of this compounding effect is that models memorize training examples at rates that scale with both model size and example frequency, which means that a careless inclusion of sensitive content at the pretraining stage can surface as a privacy concern long after deployment (Carlini et al., 2022). The model carries the consequences of data choices forward indefinitely, and recovering from a poor early decision can require retraining from scratch.

The compounding effect also runs in the other direction, making it difficult to fix data problems after the fact. Once a model has absorbed the statistical patterns of its training corpus, those patterns are distributed across billions of parameters in ways that are expensive to identify and harder still to surgically remove. Continued training and fine-tuning can redirect model behavior in limited ways, and the underlying tendencies the model learned during pretraining remain present and can reemerge under distribution changes at inference time. This is why evaluation surprises in deployed models so often trace back to decisions made in data preparation months or years earlier.

For teams planning a training run, the practical consequence is that decisions about sourcing and filtering made at the earliest stages of the project will continue to shape outcomes long after the last gradient step has been taken, and the investments made in data quality at the start of training become the foundation on which every subsequent capability is built. Monitoring systems deployed around production models should be designed with this awareness, since anomalous behavior observed in deployment is often a late echo of a data decision made during the earliest weeks of the project. The organizational discipline of documenting data choices as they are made, including the rationale behind inclusion criteria and the known limitations of the selected sources, repays itself many times over when questions arise about why a model is behaving in a particular way.