AI ENGVisual Encyclopedia

MODULE 2: DATA ENGINEERING & SYNTHETIC DATA · SCENE 04

Data Curation & Quality Filtering

Heuristic filters, language ID, and taxonomy design for instruction, multi-turn, and safety data trees.

QUALITY GATEKEEP ≥ 0.604/8 KEPT
clean-dialogquality 0.92 code-reviewquality 0.87 spam-gibberishquality 0.12 near-dup-7quality 0.44 multi-turn-helpquality 0.81 symbol-noisequality 0.18 reasoning-tracequality 0.90 off-topic-rantquality 0.30

Cheap heuristics + a fast classifier score every candidate; the taxonomy then budgets what gets kept per capability leaf.

TECHNICAL BREAKDOWNModule 2: Data Engineering & Synthetic Data

Curation heuristics and the data taxonomy

Post-training datasets are tiny, so every example has outsized influence. Curation combines cheap heuristics (length, symbol ratios, language ID), classifier scoring, and a deliberate taxonomy so capability coverage is designed, not accidental.

Heuristic Filters

Drop examples with degenerate repetition, broken encoding, extreme symbol ratios, or wrong language. These cheap rules remove the majority of low-quality candidates.

Taxonomy Design

Build a tree: instruction following, multi-turn dialogue, code, reasoning, safety, creative writing. Budget counts per leaf so weak leaves are filled rather than duplicated.

Quality over Quantity

LIMA showed ~1,000 excellent examples can beat 50k mediocre ones. Deduplication and per-leaf curation matter more than raw scale.

MATHEMATICAL FORMULATION · DEDUP IMPACT
dup_rate = 1 − unique_prompts / total_prompts

Near-duplicate prompts teach the model to parrot one phrasing. Keeping unique-prompt share high preserves output diversity at generation time.

REAL-WORLD PRODUCTION ENGINEERING
  • Production pipelines score every candidate with a fast quality classifier and sample the kept set per taxonomy leaf, not globally.
  • Safety leaves are budgeted separately — you cannot rely on the general distribution to include enough refusal and boundary examples.