Part V · 2 — Data and datasets
Lever #1. "Garbage in, garbage out" is no cliché — it is the difference between model classes. In scientific domains, data is the bottleneck, not compute nor architecture.
🎨 Figure
F-V.2— The data funnel. Brief: large funnel receiving raw data (web, code, sensors) and filtering through layers (deduplication, quality, safety, license) down to a thin jet of "golden data". Compendium palette.
2.1 Ready-made datasets (examples)
- The Stack v2 — ~900B tokens of code, permissive licenses (bigcode).
- FineWeb-Edu — web filtered by educational quality (>> raw Common Crawl).
- SWE-bench Train — real issue/PR pairs.
- CommitPack / CommitChronicle — diff + commit message.
- APPS, CodeContests, LiveCodeBench — problems with tests.
2.2 Synthetic data — the real lever
- Generate problem + solution + tests; filter the ones that pass
(Phi/Qwen-Coder style).
- Generate line-by-line explanations (code → doc).
- Problem variations (Evol-Instruct).
- bug→fix and fix→bug pairs from real commits.
- Debug traces: error → investigation → fix.
2.3 Quality filtering
- License: MITApacheBSD (avoid GPL for closed models).
- Remove LLM-generated code (self-contamination).
- Deduplication near-duplicate via MinHash/LSH.
- Remove secrets, keys, personal data.
- Filter by the presence of tests and build rate.
2.4 Strategies for data scarcity (scientific domains)
A partnership with a laboratory, hospital, or office is more valuable than any GPU — because it delivers proprietary data.
- Active learning — reduces the required dataset by 10–100×.
- Simulation as proxy — generate massively; fine-tune on real data.
- Foundation models + fine-tuning — do not train from scratch; specialize.
- Synthetic data from an LLM — a large LLM generates problems + solutions; filter
the verifiable ones.
- Self-supervised — learn from unlabeled data.
2.5 The principle that runs through everything
Proprietary data is the defensible advantage. Models and compute become commodities; the data specific to your laboratory, hospital, or codebase is the competitive durability. In code, every acceptrejectedit of a suggestion is an "almost-free" RL preference signal — see 06-ai-for-code.kmd.