Back to feed
News Story
机器之心
1 sources

LegoFlow: Letting Agents Autonomously Run the Full Code Data Construction, Training, and Evaluation Pipeline

Researchers from Huawei, CUHK, and HKUST have jointly released LegoFlow, a framework that packages the entire code data engineering pipeline—repository discovery, task validation, trajectory inference, training, and evaluation—into plugin skills callable by coding agents. The team also released the LegoFlow-SWE dataset, containing 5,000 tasks filtered from 12 million PRs and 2,780 high-quality trajectories; training Qwen3.5-35B-A3B-Base on just 1,000 trajectories achieves 70.2% and 48.8% on SWE-bench Verified and Pro, respectively. The framework also demonstrates recursive self-improvement, boosting the same model from 7.6% to 64.4% on SWE-bench Verified after two iterations.

SynthePulse Insight · AI deep readingMembers

LegoFlow Hands Code Data Pipelines to Agents: 5,000 Tasks and a 0.0417% Filter Rate

Version 1 · 1 source

Researchers from Huawei, CUHK, and HKUST jointly launched the open-source framework LegoFlow, packaging task creation, solving, filtering, training, and evaluation into plugin skills that coding agents can call, and released LegoFlow-SWE, a 5,000-task dataset filtered from 12 million candidate PRs. The team argues that task quality and trajectory reasoning depth determine training results more than data quantity, but all results and conclusions come from the team's own account.

  • LegoFlow splits code data engineering into five blocks—Root, Curator, Tracer, Trainer, and Evaluator—each packaged as a plugin skill that coding agents such as Claude Code and Codex can call directly.
  • LegoFlow-SWE starts from 12 million candidate PRs associated with over 700,000 GitHub repositories and, after multiple rounds of filtering, ultimately retains 5,000 verified tasks, or 0.0417% of the original data pool.
  • The team claims that fine-tuning Qwen3.5-35B-A3B-Base with only about 1,000 trajectories is enough to reach 70.2% and 48.8% on SWE-bench Verified and Pro, respectively.
Open section navigationA Code Data Pipeline Split into Five Blocks

A Code Data Pipeline Split into Five Blocks

Researchers from Huawei, the Chinese University of Hong Kong, and the Hong Kong University of Science and Technology jointly launched the open-source code data engineering framework LegoFlow, packaging repository and PR collection, task verification, trajectory reasoning, training, and evaluation into plugin skills for coding agents such as Claude Code and Codex to call directly. The team organizes the process into five blocks—Root, Curator, Tracer, Trainer, and Evaluator—responsible for goal transformation and coordination, task construction, trajectory generation, fine-tuning, and benchmark evaluation, respectively.

The starting point for this design is the long-standing bottleneck in code data production: high manual annotation costs, uncontrollable LLM generation, and difficult automatic verification. LegoFlow breaks the complex engineering workflow into clearly bounded stages, with each block acting like an engineer, managed by a coding agent, and carrying the repositories, scripts, dependencies, and environment needed to fulfill its responsibilities. Curator turns repositories and pull requests into verified tasks, Tracer generates training trajectories, Trainer performs fine-tuning, and Evaluator returns benchmark evaluation results.

It should be noted that the above framework description and all subsequent results come from the team's own account, and there is currently no third-party independent reproduction or verification.

From 12 Million to 5,000: The 0.0417% in the Filtering Funnel

The construction of LegoFlow-SWE begins with collecting over 700,000 GitHub repositories and their associated 12 million candidate PRs. After filtering by conditions such as valid diffs, patch size, tests, and issue evidence, only 600,000 PRs remain; further removal of simple or unverifiable tasks through an LLM reviewer and execution verification ultimately leaves 5,000 verified tasks, accounting for only 0.0417% of the original data pool.

These 5,000 tasks cover 8 programming languages and 20 task labels. On the trajectory side, GLM-5.2 generated 9,767 runs through the OpenHands SDK and OpenCode, of which 2,780 passed verification, forming the verified successful trajectories in the dataset.

Each level of the filtering funnel relies on specific judgment criteria, but the LLM reviewer and execution verification on which task filtering depends have their judgment criteria and misjudgment rates left unstated in the text. This means the 0.0417% filter rate is itself a product of the team's process, and its reproducibility depends on these undisclosed judgment details.

Free for now

Read the full analysis

5 more sections of analysis, plus the full takeaway

Loading

Credibility boundary

All facts, numbers, and conclusions in this article come from Machine Heart's report on the LegoFlow team's work and are the team's own account, lacking third-party independent reproduction or verification. The construction and training results of LegoFlow-SWE depend on the specific teacher model GLM-5.2, the coding agent frameworks OpenHands SDK and OpenCode, and fixed budget settings; task filtering depends on an LLM reviewer and execution verification, whose judgment criteria and misjudgment rates are not given in the text; evaluation anti-cheating depends on environmental controls such as restricting network access and deleting local Git information, and environmental changes may affect comparability of results. The recursive self-improvement experiment reports only a single end-to-end process and two rounds of iteration, with a limited sample size.

Primary report

机器之心

Primary source