TL;DR
This paper introduces CB-Orchestrator, a novel framework that efficiently optimizes LLM agent workflows by decoupling workflow generation from adaptive selection. It achieves state-of-the-art performance across multiple benchmarks while significantly reducing training costs, making LLM agents more practical and cost-effective for complex tasks.
What Problem Does This Paper Address?
LLM agents are powerful for complex tasks, but manually designing their workflows is tedious and inflexible. Existing automated methods often incur high API costs during training and fail to reuse learned workflows effectively. This leads to a bottleneck in performance and cost-efficiency. The authors aim to address this by creating a system that can automatically discover good workflows and then intelligently select the best one for each specific query, rather than regenerating workflows from scratch for every new task.
Methods
CB-Orchestrator employs a two-stage approach:
- Workflow Pool Construction: This stage uses an "execution-guided evolutionary search" to automatically generate a diverse set of candidate workflows from a training dataset. This ensures a rich pool of potential solutions.
- Contextual Bandit Workflow Selection: The core innovation is framing workflow selection as a Contextual Bandit problem. Here, the "context" is the query's embedding, and the "arms" are the candidate workflows from the pool. A "Hybrid Neural-Linear UCB" algorithm is used to balance exploration (trying new workflows) and exploitation (using workflows known to work well), leading to sample-efficient learning. This means it requires fewer query-workflow evaluations to learn a good selection policy.
Datasets
The authors evaluated CB-Orchestrator on five diverse benchmarks:
- MATH: For math reasoning.
- GSM8K: For math reasoning.
- HumanEval: For code generation.
- MBPP: For code generation.
- GAIA: A multi-tool QA dataset for evaluating reasoning, multi-modality, and tool-use.
Key Insights and Ideas
- "Choosing is much easier than creating": The central idea is that reusing pre-existing, well-crafted workflows is more efficient than generating a new one from scratch for every query.
- Decoupling Generation and Selection: Separating the process of creating a diverse workflow pool from the process of adaptively selecting from that pool is key to efficiency.
- Contextual Bandits for Workflow Routing: Applying contextual bandits to select workflows based on query embeddings is a novel and effective way to achieve sample-efficient learning and adapt to diverse queries.
- Hybrid Neural-Linear UCB: This approach balances the expressiveness of neural networks for reward prediction with the stability and interpretability of linear UCB for exploration, leading to robust performance.
- Workflow Pool Reusability: The cost of generating the initial workflow pool is amortized over many deployments, making the overall system much more cost-effective.
Key Results
- State-of-the-Art Performance: CB-Orchestrator consistently outperformed strong baselines across all five benchmarks, achieving a leading average score of 81.37%.
- Significant Cost Reduction:
- Training-phase API token overhead was reduced by at least 40.55%.
- Total end-to-end training overhead (including workflow pool generation) was reduced by at least 29.73%.
- Rapid Convergence: The bandit training process showed rapid convergence, indicating that the system quickly learns effective selection strategies.
- Cross-Domain Transferability: The framework demonstrated strong generalizability across different domains.
Limitations and Future Work
- Computational Cost of Pool Generation: While selection is efficient, the initial workflow pool generation can still be computationally intensive. The authors suggest batching this process offline for practical deployment.
- On-Demand Workflow Generation: To handle queries that fall outside the existing pool's coverage, CB-Orchestrator supports an optional online learning mode that can adapt the model and dynamically expand the pool. This is a promising direction for further improvement.
- Theoretical Guarantees: The authors acknowledge that their Hybrid Neural-Linear UCB design sacrifices some theoretical regret guarantees for practical benefits like computational efficiency and stability. Future work could explore ways to bridge this gap.
Summary updated