Optimizing Pandas programs is a challenging problem. Existing systems and compiler-based approaches offer reliability but are either heavyweight or support only a limited set of optimizations. Conversely, using LLMs in a per-program optimization methodology can synthesize nontrivial optimizations, but is unreliable, expensive, and offers a low yield. In this work, we introduce a hybrid approach that works in a 3-stage manner that decouples discovery from deployment and connects them via a novel bridge. First, it discovers per-program optimizations (discovery). Second, they are converted into generalised rewrite rules (bridge). Finally, these rules are incorporated into a compiler that can automatically apply them wherever applicable, eliminating repeated reliance on LLMs (deployment). We demonstrate that RuleFlow is the new state-of-the-art (SOTA) Pandas optimization framework on PandasBench, a challenging Pandas benchmark consisting of Python notebooks. Across these notebooks, we achieve a speedup of up to 4.3x over Dias, the previous compiler-based SOTA, and 1914.9x over Modin, the previous systems-based SOTA.
Our code is available at https://github.com/ADAPT-uiuc/RuleFlow.
Beyond Prompt or Skill? Attribution-Guided Optimization of Modular LLM Programs
The Chinese University of Hong Kong, Shenzhen(香港中文大学(深圳));Shenzhen Future Network of Intelligence Institute (FNii-Shenzhen)(深圳未来智能网络研究院(深圳FNii));Sun Yat-sen University(中山大学)
Grow the Harness, Not the Context: From Strategy-Free Scaffolds to Reusable Specialist Agents
Shenzhen Institutes of Advanced Technology, Chinese Academy of Sciences(中国科学院深圳先进技术研究院);University of Chinese Academy of Sciences(中国科学院大学);Shenzhen University of Advanced Technology(深圳理工大学);University of Macau(澳门大学)
Automated Code Efficiency Optimization via Agent Skill Mining
Shanghai Jiao Tong University(上海交通大学);University of California, Berkeley(加州大学伯克利分校);Columbia University(哥伦比亚大学);King's College London(伦敦国王学院);East China Normal University(华东师范大学);Shanghai Innovation Institute(上海创新研究院)