cs.MAOct 22, 2026

Not Every Agent Needs the Strongest Model: Unified Prompt-Model Optimization for Heterogeneous LLM-based Multi-Agent Systems

Authors: Mingxiu Cai, Haoyang Xian, Xinyu Ma, Yutong Wang, Zhenxi Song, Jing Li, Xuebo Liu

Organizations: Institute of Computing and Intelligence, Harbin Institute of Technology, Shenzhen

Abstract

Large language model (LLM)-based multi-agent systems (MAS) rely on role-specific prompts and execution models to solve complex tasks collaboratively. However, prompt optimization typically keeps model assignments fixed, leaving differences in role requirements and their associated inference costs outside the search. We present UniMASO, a Unified framework for heterogeneous Multi-Agent System Optimization through the joint adaptation of prompts and model assignments. UniMASO evaluates candidate updates through local, downstream, and global feedback, using cost-aware Pareto search to retain useful quality-cost trade-offs. Topology-aware co-evolution then coordinates these updates according to agent roles and dependencies. Cross-level trajectory memory further supplies historical successes and failures to guide subsequent optimization. Experiments on five benchmarks and five execution topologies show that UniMASO achieves competitive task performance at substantially lower deployment cost than the strongest homogeneous configurations. Under centralized execution, it improves the average score from 69.79 to 70.40 while reducing token-weighted deployment cost by 85.2% relative to DeepSeek-V4-Pro with MASPO. These results support joint prompt-model adaptation as an effective approach to efficient multi-agent collaboration. The code is available at https://github.com/Achilles008/UniMASO_main.

Figures & tables

Appendix figures & tables4 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. MASPO: Joint Prompt Optimization for LLM-based Multi-Agent Systems

    May 7, 2026Zhexuan Wang, Xuebo Liu, Li Wang +4Multi-Agent LLM SystemsMulti-Agent System Optimization

  2. MAS-PromptBench: When Does Prompt Optimization Improve Multi-Agent LLM Systems?

    Jun 22, 2026Juyang Bai, Laixi ShiMulti-Agent LLM SystemsMulti-Agent System Optimization

  3. MASPOB: Bandit-Based Prompt Optimization for Multi-Agent Systems with Graph Neural Networks

    Mar 3, 2026Zhi Hong, Qian Zhang, Jiahang Sun +5Multi-Agent LLM SystemsMulti-Agent System Optimization