
Better Data for AI Agents: Data Selection & Quality | Stanford CS329Z Lecture 11 with John Yang
Keywords
Summary
327 words
Critical Evaluation
Value of the Information & Strength of the Argument
The informational value is high and unusually operational. Rather than staying at the level of principles, the lecture converts abstract quality criteria into concrete, implementable checks: a format checker for tool-call syntax, an execution checker that replays a trajectory to confirm deterministic observations, a semantic checker for task diversity and cascading errors, repeated runs of the reference solution to expose flaky tests, verification that the pre-patch state actually fails, detection of hard-coded expectations, and an LLM monitor for leakage and reward hacking. Each of these is tied to a specific failure mode, which makes the material directly transferable to a data pipeline. The argumentation is cumulative and well ordered: the funnel metaphor (valid → learnable → selected) is stated early, then each stage is substantiated by one or two papers, so the audience can see where a given technique sits in the overall workflow. The speaker is also careful about the epistemic status of his framework, repeatedly labelling the funnel as a helpful but evolving mental model to be questioned ‘healthfully’, and distinguishing environmental filtering from trajectory filtering even when the narrative runs slightly against the natural order of a training run. Two argumentative moves deserve note. First, the treatment of subjectivity in quality annotation: the SWE-bench Verified scoring aggregates three annotators by taking the maximum, so a single annotator flagging a problem is enough to downgrade a task — rigorous for benchmark construction, but a signal that quality filters encode contestable judgements and must be enforced reliably rather than proved universally correct. Second, the treatment of failure as signal: the argument that success-only filtering biases the distribution toward the teacher model’s competence is supported by a striking quantitative consequence (training on 40 of 128 repositories in SWE-smith), which is a much stronger form of evidence than a generic plea for diversity. The weaker points are matters of depth rather than soundness: several quantitative claims are delivered verbally and illustrated with dense slides that cannot be read in the transcript, some figures are described only approximately (‘about a quarter’, ‘15 to 17%’), and the lecture explicitly defers LM-as-judge calibration to a later session, leaving the automated-quality thread partly open. The discussion of RL learnability is conceptually clear but stays at a rule-of-thumb level (success rate bands, re-filtering schedules) rather than deriving thresholds from first principles.
Scientific Rigor, Source Quality, Title Accuracy
Sourcing is strong for a lecture format. Every major claim is attached to a named work: OpenAI’s SWE-bench Verified annotation study, Meta FAIR’s Code World Models for end-to-end coding-agent training, APIGen for automated verification of tool-calling trajectories, WebRL for self-evolving curricula, Code Midas from the Xiaomi MiMo team for coding environments, and LIMA for the less-is-more argument in instruction tuning. Two of these are listed as formal readings in the course material (Yang et al., SWE-smith, NeurIPS Datasets & Benchmarks 2025; Shankar et al., ‘Who Validates the Validators?’, UIST 2024), which gives the session a verifiable bibliographic anchor, and the course website and playlist are provided. The speaker distinguishes his own work from others’ clearly and flags where a result may carry a marketing incentive — notably when noting that GPT-4o’s score rose on the curated SWE-bench Verified set while stating that the reliability improvement is the trustworthy part of the claim. He also volunteers the limits of his own framing and the subjectivity of annotation-based quality scores, which is a mark of methodological honesty. Weaknesses: the transcript supplies no inline citations, author lists or venues for most of the papers discussed, the numbers quoted are largely rounded and sometimes presented without the underlying tables being legible, and the human-annotation protocol is summarised rather than examined (inter-annotator agreement is mentioned but not reported). On title-to-content fit, the match is close: the lecture is genuinely about data selection and quality for agents, and the announced topics — SWE-bench Verified, filtering, curricula, failed trajectories, more-versus-better data — are all covered in the order advertised, with only the closing evaluation topic deferred to the next session.
673 words
Title / Content Match
The title accurately announces a lecture on data selection and quality for AI agents; the content follows that thread throughout, from valid/learnable/selected filtering to SWE-bench Verified, APIGen, RL curricula and failed-trajectory training.
Quality & Reliability
8/10
Graduate-level lecture delivered by a lead creator of SWE-bench and SWE-smith, anchored in published work (SWE-smith, NeurIPS D&B 2025; Shankar et al., UIST 2024) and in well-identified papers (SWE-bench Verified, APIGen, Code World Models, LIMA, WebRL, Code Midas). Claims are consistently attributed to specific studies and framed as an evolving research landscape rather than settled fact. The main limits are the absence of a formal reference list with links in the transcript itself, the reliance on the speaker's own reading of figures, and the partial nature of the available transcript.
Chapters
- Introduction & recap
- Millions of trajectories: which to keep?
- The funnel: valid, learnable, selected
- How SWE-bench Verified was built
- Automating quality checks: APIGen
- Filtering coding tasks: flaky tests & leakage
- Learnable tasks: RL signal & curricula
- Self-evolving curricula: WebRL
- Q&A: filtering & contamination
- Selecting SFT trajectories
- Masking low-quality actions
- Learning from failed trajectories
- More data vs. better data
- Summary & what's next: evaluation
Cited Sources
- CS329Z: Engineering AI Agents — course website — Official course page for the Stanford graduate course in which this lecture was given; source for slides and syllabus.
- Stanford Online — Agentic AI courses — Institutional link provided in the description for Stanford's online agentic-AI course offering.
- CS329Z full lecture playlist — Playlist containing the complete lecture series, including the preceding lecture on data creation pipelines to which this one repeatedly refers.
- Yang et al., 'SWE-smith: Scaling Data for Software Engineering Agents', NeurIPS Datasets & Benchmarks (2025) — Listed as a course reading; the speaker is first author. Used for the claim that success-biased selection would restrict training to 40 of 128 repositories.
- Shankar et al., 'Who Validates the Validators? Aligning LLM-Assisted Evaluation with Human Preferences', UIST (2024) — Listed as a course reading; underpins the discussion of aligning automated quality checks with human judgement.
- SWE-bench Verified (OpenAI annotation study) — Discussed at length: 93 Python developers annotated ~1,700 of 2,294 SWE-bench tasks for underspecified issues and unfair unit tests; curated set of 500 tasks.
- APIGen — Presented as the automated alternative to human annotation for tool-calling trajectories, with format, execution and semantic checkers.
- Code World Models (Meta FAIR code generation team) — Cited as the end-to-end reference for coding-agent data pipelines and as the source of the 3 million trajectories / 10,000 Docker images / 3,000 repositories figures.
- LIMA: Less Is More for Alignment — Invoked as the precedent showing that ~1,000 carefully selected instruction-tuning examples can compete with 10,000.
- WebRL — Cited for self-evolving curricula in reinforcement learning for agents.
- Code Midas (Xiaomi MiMo team) — Presented as the coding analogue of APIGen, applying automated quality checking to large volumes of coding environments and trajectories.
Concurring Sources
- SWE-bench official site — Confirms the existence and structure of the SWE-bench benchmark family referenced throughout the lecture, including its curated variants used for evaluation.
- LIMA: Less Is More for Alignment (arXiv) — Supports the lecture's closing claim that a small, carefully selected fine-tuning set can rival a much larger one for instruction following.
Contribution & Novelties
The distinctive contribution of this lecture is the assembly of scattered post-training practice into a single decision procedure. Instead of asking ‘how do we generate more agent data’, it asks ‘how do we decide what survives’, and it supplies a three-stage filter — validity, learnability, selection — in which each stage has a failure mode, a diagnostic, and at least one published remedy. Several ideas here are less commonly articulated in survey material: that a verifiable task can still be worthless because it is unlearnable at a given model scale, that learnability is therefore model-relative and must be re-estimated as the model improves, that failed trajectories carry signal when labelled or corrected precisely because success-only filtering collapses the task distribution onto what the teacher already handles, and that low-quality actions can be masked inside an otherwise usable trajectory rather than discarding the whole rollout. The lecture also makes explicit a methodological point that is usually left implicit: quality filters are judgements, and what matters operationally is that a filter be enforced reliably, not that it be universally correct.
Pour aller plus loin :
- SWE-bench — The benchmark whose construction and curation are dissected here; useful for seeing the difference between the full 2,294-task set and the 500-task Verified subset.
- SWE-bench: Can Language Models Resolve Real-World GitHub Issues? — The original benchmark paper by the speaker and colleagues, giving the task-collection methodology that the lecture then critiques.
- LIMA: Less Is More for Alignment — The instruction-tuning precedent for the ’less but better data’ argument developed in the final section.
- Reinforcement learning — Background for the learnability discussion (success-rate bands, learning signal, curricula).
- Curriculum learning and self-evolving curricula (WebRL) — The mechanism by which task difficulty is scheduled as the policy improves; discussed at length but cited without a stable public link in the lecture material.
- Data pruning and core-set selection — The broader machine-learning literature on choosing informative training subsets, of which the validity/learnability/selection funnel is an agent-specific instance.
- Reward hacking and specification gaming — The failure mode behind the leakage and hard-coded-expectation checks; conceptually prior to the automated monitors proposed here.
351 words
Radar Profile
The profile is high and relatively flat on information quantity and technical depth, with reliability slightly below them — consistent with a research lecture that is dense and current but whose quantitative claims are mostly relayed verbally and rounded. The small dip on quality-information reflects the reliance on a mental model the speaker himself labels provisional, and the absence of a fully legible reference apparatus in the transcript.