FlowCompile: An Optimizing Compiler for Structured LLM Workflows
Not on the map. Why?
Abstract (arXiv)
Structured LLM workflows, where specialized LLM sub-agents execute according to a predefined graph, have become a powerful abstraction for solving complex tasks. Optimizing such workflows, i.e., selecting configurations for each sub-agent to balance accuracy and latency, is challenging due to the combinatorial design space over model choices, reasoning budgets, and workflow structures. Existing cost-aware methods largely treat workflow optimization as a routing problem, selecting a configuration at inference time for each query according to the accuracy-latency objective used during training. We argue that structured LLM workflows can also be optimized from a compilation perspective: before deployment, the system can globally explore the workflow design space and construct a reusable set of workflow-level configurations spanning diverse accuracy-latency trade-offs. Drawing inspiration from machine learning compilers, we introduce FlowCompile, a structured LLM workflow compiler that performs compile-time design space exploration to identify a high-quality, reusable trade-off set. FlowCompile decomposes a workflow into sub-agents, profiles each sub-agent under diverse configurations, and composes these measurements through a structure-aware proxy to estimate workflow-level accuracy and latency. It then identifies diverse high-quality configurations in a single compile-time pass, without retraining or online adaptation. Experiments across diverse workflows and challenging benchmarks show that FlowCompile consistently outperforms heuristically optimized workflow configurations and routing-based baselines, delivering up to 6.4x speedup. The compiled configuration set further serves as a reusable optimization artifact, enabling flexible deployment under varying runtime preferences and supporting downstream selection or routing.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 21 of its 28 references that are in the map. First posted on arXiv 13 May 2026.
Builds on
21 of 28 references.
References · 21
- 2021Training Verifiers to Solve Math Word Problemscited by 10,109
- 2025Qwen3 Technical Reportcited by 8,820
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,695
- 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,944
- 2018HotpotQA: A Dataset for Diverse, Explainable Multi-hop Question Answeringcited by 3,754
- 2020Longformer: The Long-Document Transformercited by 3,413
- 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 2,004
- 2025s1: Simple test-time scalingcited by 1,341
- 2025OpenAI GPT-5 System Cardcited by 989
- 2023DSPy: Compiling Declarative Language Model Calls into Self-Improving Pipelinescited by 832
- 2024AFlow: Automating Agentic Workflow Generationcited by 432
- 2024Automated Design of Agentic Systemscited by 407
9 more
- 2021A Practical Guide to Multi-Objective Reinforcement Learning and Planningcited by 256
- 2020Ansor: Generating High-Performance Tensor Programs for Deep Learningcited by 201
- 2025Multi-agent Architecture Search via Agentic Supernetcited by 179
- 2019A Generalized Algorithm for Multi-Objective Reinforcement Learning and Policy Adaptationcited by 177
- 2018Learning to Optimize Tensor Programscited by 140
- 2025MasRouter: Learning to Route LLMs for Multi-Agent Systemscited by 88
- 2018Glow: Graph Lowering Compiler Techniques for Neural Networkscited by 75
- 2025Difficulty-Aware Agentic Orchestration for Query-Specific Multi-Agent Workflowscited by 27
- 2025Resource-efficient Inference with Foundation Model Programscited by 2
Built on by
Not cited yet.