TL;DR
While large language models (LLMs) excel at basic code generation, can they engineer and optimize the complex software infrastructure that powers them? This paper introduces $\Phi$-Bench, a comprehensive benchmark designed to evaluate LLMs on real-world, long-horizon AI infrastructure tasks. The findings reveal that even the most advanced frontier models, like Claude Opus 5, top out at a 36.53% success rate, highlighting a significant capability gap in autonomous systems engineering.
What Problem Does This Paper Address?
LLMs have fundamentally changed how we write code, but evaluating their capacity for systems engineering remains a challenge. Existing benchmarks (such as TritonBench or KernelBench) typically focus on isolated GPU kernels or predefined operators with explicit input-output specifications.
Real-world infrastructure engineering—like optimizing a distributed training framework or managing an inference engine's KV-cache—is far more complex. It requires developers to navigate large, unfamiliar codebases, identify performance bottlenecks, profile execution, debug runtime errors, and coordinate changes across multiple layers of the software stack. To bridge this gap, the authors introduce $\Phi$-Bench to systematically evaluate whether LLMs can handle the open-ended, long-horizon demands of modern AI infrastructure engineering.
Methods
The authors developed a systematic, automated pipeline to construct $\Phi$-Bench based on three core task formats that scale in complexity:
- Kernel Function Completion (KFC): Localized, single-file tasks focusing on implementing or optimizing efficient computational primitives.
- Long-Horizon Implementation (LHI): Repository-scale feature requests where the agent must navigate multiple files and dependencies to implement a solution.
- End-to-End Optimization (E2EO): Open-ended tasks where the agent is given a system-level objective (e.g., minimize bits per byte) and must profile, locate bottlenecks, and optimize the codebase autonomously.
Tasks were synthesized using a combination of mining real-world GitHub Pull Requests/Issues, an automated Agent-Assisted Loop that scans repositories and generates test suites based on code coverage, and expert curation from top-tier systems research papers.
To ensure rigorous evaluation, the benchmark features a Hard Validity Gate that screens for code compilation, correctness, and cheating behaviors (like hard-coding test outputs). Performance gains are measured using an AB-BA paired execution protocol to filter out hardware noise.
Datasets
The paper introduces $\Phi$-Bench, which contains 85 distinct tasks (55 KFC, 20 LHI, and 10 E2EO). The benchmark's coverage is driven by a bottom-up taxonomy built from 2,260 research papers and 1,852 repository artifacts.
The tasks span nine major infrastructure domains: Training, Inference & Serving, Compression, Kernel, I/O, Hardware & Edge, Data Infrastructure, System Optimization, and System Assurance.
Key Insights and Ideas
- Trial and Error is a Feature, Not a Bug: High-performing models like Claude Opus 5 and Kimi K3 actually generate more errors during their problem-solving trajectories. Their success is driven by their ability to persist, diagnose, and iteratively correct mistakes rather than getting the code right on the first try.
- Python Fluency Frees Up Cognitive Budget: Claude Opus 5 stands out because it makes far fewer basic Python runtime errors compared to other models. This allows it to preserve its reasoning capacity for complex, low-level CUDA execution and optimization challenges.
- The "Scientific Method" Matters: Top-tier models naturally establish lightweight local validation checks to quickly screen hypotheses before committing to full evaluations. In contrast, weaker models blindly follow a costly implement-submit-observe loop.
- The Hardware Blindspot: LLMs struggle heavily with hardware-level abstractions. Across all models, performance plummeted on tasks involving physical hardware constraints, GPU architectures, and edge topologies, exposing a major gap in current LLM training data or reasoning capabilities.
Key Results
The authors evaluated eight frontier models using $\Phi$-Bench.
- Claude Opus 5 Leads the Pack: It achieved the highest overall score of 36.53%, followed by Kimi K3 (28.12%) and Qwen3.8 Max (27.73%).
- Specialized Strengths: While Claude Opus 5 led in five categories, other models showed specialized capabilities; for instance, Kimi K3 performed best in System Optimization, and GLM 5.2 excelled in System Assurance.
- The Impact of Reasoning Budget: For models like Kimi K3, performance is heavily dependent on test-time compute—its score dropped by roughly 45% when restricted to a low reasoning setting.
Limitations and Future Work
Despite the strong showing from top models, even the best agent failed to solve nearly two-thirds of the benchmark. The authors note two primary bottlenecks:
- Multi-File Codebase Navigation: Models consistently scored lower on Long-Horizon Implementation (LHI) tasks than on isolated Kernel Completion (KFC) tasks, showing that tracking dependencies across multiple files remains highly error-prone.
- Lack of Grounded Hardware Understanding: The near-zero scores in the Hardware & Edge category indicate that LLMs cannot yet reliably co-design software with physical hardware constraints.
The authors suggest that future research should focus on enhancing LLM agents' multi-file editing coordination, improving hardware-grounded reasoning, and building more robust, autonomous profiling and debugging loops.
Summary updated