Mixture-of-Agents Enhances Large Language Model Capabilities

## Abstract

Abstract Recent advances in large language models (LLMs) demonstrate substantial capabilities in natural language understanding and generation tasks.
With the growing number of LLMs, how to harness the collective expertise of multiple LLMs is an exciting open direction.
Toward this goal, we propose a new approach that leverages the collective strengths of multiple LLMs through a Mixture-of-Agents (MoA) methodology.
In our approach, we construct a layered MoA architecture wherein each layer comprises multiple LLM agents.
Each agent takes all the outputs from agents in the previous layer as auxiliary information in generating its response.
MoA models achieves state-of-art performance on AlpacaEval 2.0, MT-Bench and FLASK, surpassing GPT-4 Omni. For example, our MoA using only open-source LLMs is the leader of AlpacaEval 2.0 by a substantial gap, achieving a score of 65.1% compared to 57.5% by GPT-4 Omni. 1 1 1 Our code can be found in: https://github.com/togethercomputer/moa .

## 1 Introduction

Large language models (LLMs) (Zhang et al., ; Chowdhery et al., ; Touvron et al., ; Team et al., ; Brown et al., ; OpenAI, )
have significantly advanced the field of natural language understanding and generation in recent years.
These models are pretrained on vast amounts of data and subsequently aligned with human preferences to generate helpful and coherent outputs (Ouyang et al., ).
However, despite the plethora of LLMs and their impressive achievements,
they still face inherent constraints on model size and training data.
Further scaling up these models is exceptionally costly, often requiring extensive retraining on several trillion tokens.

At the same time, different LLMs possess unique strengths and specialize in various tasks aspects.
For instance, some models excel at complex instruction following (Xu et al., )
while others may be better suited for code generation (Roziere et al., ; Guo et al., ).
This diversity in skill sets among different LLMs presents an intriguing question:
Can we harness the collective expertise of multiple LLMs to create a more capable and robust model?

Our answer to this question is Yes.
We identify an inherent phenomenon we term the collaborativeness of LLMs
— wherein an LLM tends to generate better responses when presented with outputs from other models, even if these other models are less capable by itself.
Figure˜1 showcases the LC win rate on the AlpacaEval 2.0
benchmark (Dubois et al., ) for 6 popular LLMs.

Figure: Figure 1: AlpacaEval 2.0 LC win rates improve when provided with responses from other models.
Refer to caption: x1.png

When these models are provided with answers generated independently by these models,
their LC win rates significantly improve.
This indicates that the collaborativeness phenomenon is widespread among LLMs.
Remarkably, this improvement occurs even when the auxiliary responses provided by the other models are of lower quality than what an individual LLM could generate independently.

Based on this finding, this paper introduces a Mixture-of-Agents (MoA) methodology
that leverages multiple LLMs to iteratively enhance the generation quality.
The structure of MoA is illustrated in Figure˜2.
Initially, LLMs in the first layer, denoted as agents $A_{1,1},...A_{1,n}$ independently generate responses to a given prompt.
These responses are then presented to agents in the next layer $A_{2,1},...A_{2,n}$
(which may reuse a model from the first layer) for further refinement.
This iterative refinement process continues for several cycles until obtaining a more robust and comprehensive response.

Figure: Figure 2: Illustration of the Mixture-of-Agents Structure. This example showcases 4 MoA layers with 3 agents in each layer. The agents here can share the same model.
Refer to caption: x2.png

To ensure effective collaboration among models and improve overall response quality,
careful selection of LLMs for each MoA layer is crucial.
This selection process is guided by two primary criteria:
(a) Performance Metrics: The average win rate of models in layer $i$ plays a significant role in determining their suitability for inclusion in layer $i+1$. Therefore, selecting models based on their demonstrated performance metrics ensures higher-quality outputs.
(b) Diversity Considerations: The diversity of model outputs is also crucial.
Responses generated by heterogeneous models contribute significantly more than those produced by the same model as we show later in section˜3.3.
By leveraging these criteria — performance and diversity
— MoA aims to mitigate individual model deficiencies and enhance overall response quality through collaborative synthesis.

We conduct comprehensive evaluations using AlpacaEval 2.0, MT-Bench (Zheng et al., ), FLASK (Ye et al., ) benchmarks for assessing the response quality across various dimensions. The results demonstrate substantial improvements with our proposed method, achieving a new SOTA win rate of 65.8% on AlpacaEval 2.0 compared to the previous best of 57.5% achieved by GPT-4 Omni.

The contributions of this work are summarized as follows:
(1) Novel framework: we propose a Mixture-of-Agents framework designed to leverage the strengths of multiple LLMs, thereby improving their reasoning and language generation capabilities.
(2) Finding of collaborativeness of language models: we highlight the inherit collaborativeness among LLMs, where models tend to generate better quality responses when they have access to outputs from other models, even if those outputs are of lower quality.
(3) State-of-the-art LLM performance: we conducted extensive experiments using multiple highly-competitive benchmarks such as AlpacaEval 2.0, MT-Bench, and FLASK; our MoA framework achieves state-of-the-art performance on these benchmarks.

## 2 Mixture-of-Agents Methodology

In this section, we present our proposed methodology for leveraging multiple models to achieve boosted performance.
We begin by demonstrating that LLMs possess collaborativeness and thus can improve their responses based on the outputs of other models.
Following this, we introduce the Mixture-of-Agents methodology and discuss its design implications.

### 2.1 Collaborativeness of LLMs

We begin by demonstrating the collaborativeness of LLMs,
specifically their ability to generate higher quality responses
when they can reference outputs from other models.
As we have shown in the introduction and Figure˜1,
many of today’s available LLMs exhibit this collaborative capability.

An important pathway to extract maximum benefits from collaboration of multiple LLMs is to characterize how different models are good at in various aspects of collaboration.
During the collaboration process, we can categorize LLMs into two distinct roles:

Proposers excel at generating useful reference responses for use by other models.
While a good proposer may not necessarily produce responses with high scores by itself,
it should offer more context and diverse perspectives, ultimately contributing to better final responses when used by an aggregator.

Aggregators are models proficient in synthesizing responses from other models into a single, high-quality output.
An effective aggregator should maintain or enhance output quality even when integrating inputs that are of lesser quality than its own.

Section˜3.3 empirically validate the roles of aggregators and proposers.
Specifically, we show that many LLMs possess capabilities both as aggregators and proposers,
while certain models displayed specialized proficiencies in distinct roles.
GPT-4o, Qwen1.5, LLaMA-3 emerged as a versatile model effective in both assisting and aggregating tasks.
In contrast, WizardLM demonstrated excellent performance as an proposer model
but struggled to maintain its effectiveness in aggregating responses from other models.

Given that an aggregator can generate higher-quality responses by building upon outputs from other models,
we propose further enhancing this collaborative potential by introducing additional aggregators.
One intuitive idea is to replicate the exercise with multiple aggregators
— initially using several to aggregate better answers and then re-aggregating these aggregated answers.
By incorporating more aggregators into the process, we can iteratively synthesize and refine the responses,
leveraging the strengths of multiple models to produce superior outcomes.
This leads to the design of our proposed Mixture-of-Agents.

### 2.2 Mixture-of-Agents

The structure of MoA is illustrated in Figure˜2.
It has $l$ layers and each layer-$i$ consists of $n$ LLMs, denoted by $A_{i,1}$, $A_{i,2}$, …, $A_{i,n}$.
It is important to note that LLMs can be reused either within the same layer or across different layers.
When many LLMs in a layer are identical,
this configuration leads to a special structure that corresponds to a model generating multiple possibly different outputs (due to the stochasticity of temperature sampling).
We refer to this setting as single-proposer, where only a sparse subset of models are activated.

Here, each LLM $A_{i,j}$ processes an input text and generates its continuation.
Our method does not require any fine-tuning and only utilizes the interface of prompting and generation of LLMs.
Formally, given an input prompt $x_{1}$, the output of $i$-th MoA layer $y_{i}$ can be expressed as follows:

$$ $\displaystyle y_{i}$ $\displaystyle=\oplus_{j=1}^{n}[A_{i,j}(x_{i})]\,\,+x_{1},x_{i+1}=y_{i}$ (1) $$

where $+$ here means concatenation of texts; $\oplus$ means application of the Aggregate-and-Synthesize prompt shown in Table˜1 to these model outputs.

**Table 1: Aggregate-and-Synthesize Prompt to integrate responses from other models.**
| You have been provided with a set of responses from various open-source models to the latest user query. Your task is to synthesize these responses into a single, high-quality response. It is crucial to critically evaluate the information provided in these responses, recognizing that some of it may be biased or incorrect. Your response should not simply replicate the given answers but should offer a refined, accurate, and comprehensive reply to the instruction. Ensure your response is well-structured, coherent, and adheres to the highest standards of accuracy and reliability. |
| --- |
| Responses from models: |
| 1. [Model Response from $A_{i,1}$] |
| 2. [Model Response from $A_{i,2}$] |
| … |
| $n$. [Model Response from $A_{i,n}$] |

In practice, we do not need to concatenate prompt and all model responses so only one LLM is needed to be used in the last layer.
Therefore, we use the output of an LLM from the $l$-th layer ($A_{l,1}(x_{l})$)
as the final output and evaluate the metrics based on it.

### 2.3 Analogy to Mixture-of-Experts

Mixture-of-Experts (MoE) (Shazeer et al., ) is a prominent and well-established technique in machine learning where multiple expert networks specialize in different skill sets.
The MoE approach has shown significant success across various applications due to its ability to leverage diverse model capabilities for complex problem-solving tasks.
Our MoA method draws inspiration from this methodology.

A typical MoE design consists of a stack of layers known as MoE layers.
Each layer comprises a set of $n$ expert networks alongside a gating network and includes residual connections for improved gradient flow.
Formally, for layer $i$, this design can be expressed as follows:

$$ $\displaystyle y_{i}$ $\displaystyle=\sum_{j=1}^{n}{G_{i,j}(x_{i})E_{i,j}(x_{i})}+x_{i}$ (2) $$

where $G_{i,j}$ represents the output from the gating network corresponding to expert $j$, and $E_{i,j}$ denotes the function computed by expert network $j$.
The leverage of multiple experts allows the model to learn different skill sets and focus on various aspects of the task at hand.

From a high-level perspective, our proposed MoA framework extends the MoE concept to the model level by operating at the model level rather than at the activation level.
Specifically, our MoA approach leverages LLMs and operates entirely through the prompt interface rather than requiring modifications to internal activations or weights.
This means that instead of having specialized sub-networks within a single model like in MoE,
we utilize multiple full-fledged LLMs across different layers.
Note that in our approach, we consolidate the roles of the gating network and expert networks using a LLM,
as the intrinsic capacity of LLMs allows them to effectively regularize inputs by interpreting prompts and generating coherent outputs without needing external mechanisms for coordination.

Moreover, since this method relies solely on prompting capabilities inherent within off-the-shelf models:
(1) It eliminates computational overhead associated with fine-tuning;
(2) It provides flexibility and scalability: our method can be applied to the latest LLMs regardless of their size or architecture.

## 3 Evaluation

This section presents a comprehensive evaluation of our proposed MoA.
Our findings show that:

- 1.
We achieve significant improvements on AlpacaEval 2.0, MT-Bench, and FLASK benchmarks.
Notably, with open-source models only, our approach outperforms GPT-4o on AlpacaEval 2.0 and FLASK.
- 2.
We conduct extensive experiments to provide better understandings of the internal mechanism of MoA.
- 3.
Through a detailed budget analysis, several implementations of MoA can deliver performance comparable to GPT-4 Turbo while being 2$\times$ more cost-effective.

### 3.1 Setup

#### Benchmarks

We mainly evaluate models on AlpacaEval 2.0 (Dubois et al., ),
a leading benchmark for assessing the alignment of LLMs with human preferences.
It contains 805 instructions representative of real use cases.
Each model’s response is directly compared against that of the GPT-4 (gpt-4-1106-preview),
with a GPT-4-based evaluator determining the likelihood of preferring the evaluated model’s response.
To ensure fairness, the evaluation employs length-controlled (LC) win rates, effectively neutralizing length bias.(^2^22This metric tracks closely with human preferences, achieving a Spearman correlation of 0.98 with actual human evaluations (Dubois et al., ).)

Additionally, we also evaluate on MT-Bench (Zheng et al., ) and FLASK (Ye et al., ).
MT-Bench uses GPT-4 to grade and give a score to model’s answer.
FLASK, on the other hand, offers a more granular evaluation with 12 skill-specific scores.

#### Models

In our study, we constructed our default MoA by using only open-source models to achieve competitive performance.
The models included are:
Qwen1.5-110B-Chat (Bai et al., ), Qwen1.5-72B-Chat,
WizardLM-8x22B (Xu et al., ),
LLaMA-3-70B-Instruct (Touvron et al., ),
Mixtral-8x22B-v0.1 (Jiang et al., ),
dbrx-instruct (The Mosaic Research Team, ).
We construct 3 MoA layers and use the same set of models in each MoA layer.
We use Qwen1.5-110B-Chat as the aggregator in the last layer.
We also developed a variant called MoA w/ GPT-4o,
which prioritizes high-quality outputs
by using GPT-4o as the aggregator in the final MoA layer.
Another variant, MoA-Lite, emphasizes cost-effectiveness.
It uses the same set of models as proposers
but includes only 2 MoA layers and employs Qwen1.5-72B-Chat as the aggregator.
This makes it more cost-effective than GPT-4o
while achieving a $1.8\%$ improvement in quality on AlpacaEval 2.0.
We ensure strict adherence to the licensing terms of all models utilized in this research.
For open-source models, all inferences were ran through
Together Inference Endpoint.(^3^33[h](h)ttps://api.together.ai/playground/chat)

### 3.2 Benchmark Results

In this subsection, we present our evaluation results on three standard benchmarks:
AlpacaEval 2.0, MT-Bench, and FLASK.
These benchmarks were chosen to comprehensively assess the performance of our approach and
compare with the state-of-the-art LLMs.

**Table 2: Results on AlpacaEval 2.0 and MT-Bench. For AlpacaEval 2.0, MoA and MoA-Lite correspond to the 6 proposer with 3 layers and with 2 layer respectively. MoA w/ GPT-4o corresponds to using GPT-4o as the final aggregator in MoA. We ran our experiments three times and reported the average scores along with the standard deviation. ^† denotes our replication of the AlpacaEval results. We ran all the MT-Bench scores ourselves to get turn-based scores.**
| Model | LC win. | win. |
| --- | --- | --- |
| MoA w/ GPT-4o | 65.7${}_{\pm\text{0.7}}$% | 78.7${}_{\pm\text{0.2}}$% |
| MoA | 65.1${}_{\pm\text{0.6}}$% | 59.8${}_{\pm\text{0.3}}$% |
| MoA-Lite | 59.3${}_{\pm\text{0.2}}$% | 57.0${}_{\pm\text{0.7}}$% |
| GPT-4 Omni (05/13) | 57.5% | 51.3% |
| GPT-4 Turbo (04/09) | 55.0% | 46.1% |
| WizardLM 8x22B^† | 51.3% | 62.3% |
| GPT-4 Preview (11/06) | 50.0% | 50.0% |
| Qwen1.5 110B Chat | 43.9% | 33.8% |
| Qwen1.5 72B Chat | 36.6% | 26.5% |
| GPT-4 (03/14) | 35.3% | 22.1% |
| Llama 3 70B Instruct | 34.4% | 33.2% |
| Mixtral 8x22B v0.1 | 30.9% | 22.2% |

#### AlpacaEval 2.0

We conducted comparisons against leading models such as GPT-4 and other state-of-the-art open-source models.
The detailed results are presented in Table˜2(a) where our MoA methodology achieved top positions on the AlpacaEval 2.0 leaderboard,
demonstrating a remarkable $8.2\%$ absolute improvement over the previous top model, GPT-4o.
Moreover, it is particularly noteworthy that our model outperformed GPT-4o using solely open-source models,
achieving a margin of $7.6\%$ absolute improvement from $57.5\%$ (GPT-4o) to $65.1\%$ (MoA).
Our MoA-Lite setup uses less layers and being more cost-effective.
Even with this lighter approach, we still outperform the best model by $1.8\%$, improving from $57.5\%$ (GPT-4o) to $59.3\%$ (MoA-Lite).
This further highlights the effectiveness of our method
in leveraging open-source models capabilities with varying compute budget to their fullest potential.

Figure: Figure 3: Results on FLASK where we use the 6 proposer MoA setup and Qwen1.5-110B-Chat is the aggregator.
Refer to caption: x3.png

#### MT-Bench

Though improvements over individual models on the MT-Bench are relatively incremental,
this is understandable given that current models already perform exceptionally well on this benchmark,
as a single model alone can achieve scores greater than 9 out of 10.
Despite the marginal enhancements, our approach still secures the top position on the leaderboard.
This demonstrates that even with already highly optimized benchmarks,
our method can push the boundaries further, maintaining the leadership.

#### FLASK

FLASK provides fine-grained evaluation of models.
Among those metrics, MoA excels in several key aspects.
Specifically, our methodology shows significant improvement in
robustness, correctness, efficiency, factuality, commonsense,
insightfulness, completeness,
compared to the single model score of the aggregator, Qwen-110B-Chat.
Additionally, MoA also outperforms GPT-4 Omni in terms of correctness, factuality, insightfulness, completeness, and metacognition.
One metric where MoA did not do as well was conciseness;
the model produced outputs that were marginally more verbose.

### 3.3 What Makes Mixture-of-Agents Work Well?

In this subsection, we conduct experiments that provide us better understandings of the internal mechanism of Mixture-of-Agents. We summarize key insights below.

#### Mixture-of-Agents significantly outperforms LLM rankers.

First, we compare Mixture-of-Agents with an LLM-based ranker which uses the aggregator model to select one of the answers that are generated by the proposers, instead of generating a new output. The results are shown in Figure˜4, where we can observe that the MoA approach significantly outperforms an LLM-ranker baseline. The fact that MoA outperforms the ranking approach suggests that the aggregator does not simply select one of the generated answers by the proposers, but potentially performs sophisticated aggregation over all proposed generations.

#### MoA tends to incorporate the best proposed answers.

We also compare the aggregator’s response with the proposers’ responses via similarity scores such as BLEU (Papineni et al., ) which reflects n-gram overlaps. Within each sample, given $n$ proposed answers by the proposers, we calculate the the Spearman’s rank correlation coefficient between $n$ similar scores and $n$ preference scores determined by the GPT-4 based evaluator.
The results in Figure˜4 indeed confirms a positive correlation between the win rate and the BLEU score.
We also provide results with Levenshtein similarity (RapidFuzz, ) or TF-IDF as opposed to BLEU scores in Appendix˜A.
where both alternative approaches for textual similarities also yield positive correlation with the preference scores.

Figure: Figure 4: (a) LC win rate on AlpacaEval 2.0 with different aggregators in the 6-model Mixture-of-Agents setup. All the curves use the same 6 proposer agents; they only differ in the choice of the final aggregator. The LLM ranker uses Qwen1.5-110B-Chat model with a prompt format in Appendix Table˜5. The GPT-4o model is only used to aggregate the output for the purpose of evaluation and does not participate as a proposer towards the next layer. (b) Spearman correlation between BLEU scores (calculated using 3-gram, 4-gram, and 5-gram metrics) and win rate of the proposed outputs.
Refer to caption: x4.png

#### Effect of model diversity and the number of proposers.

We analyze how the number of proposals affect the final output quality by varying $n$, the number of proposers in each layer.
We show the results in Table˜4 where we find that scores increases monotonically with $n$, reflecting the benefits of having more auxiliary information. In addition, we also quantify the impact of using a diverse set of LLMs as proposers. For each $n$, we compare two settings: “single-proposer” where the $n$ responses are generated by the same LLM with
a temperature of 0.7;
and “multiple-proposer” where each response is generated by a different LLMs. Overall, using multiple different LLMs consistently yielded better results. Both results suggest that having a larger number of diverse LLM agents in each MoA layer can improve performance. Further scaling the width of MoA is a promising direction of future investigation.

#### Specialization of models in the Mixture-of-Agent ecosystem.

We also conducted experiments to determine which models excel in specific roles.
Specifically, Table˜4 shows that GPT-4o, Qwen, LLaMA-3 emerged as a versatile model effective in both assisting and aggregating tasks.
In contrast, WizardLM demonstrated excellent performance as an proposer model
but struggled to maintain its effectiveness in aggregating responses from other models.

**Table 3: Effects of the number of proposer models on AlpacaEval 2.0. We denote $n$ as either the number of agents in an MoA layer or the number of proposed outputs in the single-proposer setting. We use Qwen1.5-110B-Chat as the aggregator and use 2 MoA layers for all settings in this table.**
| Setting | Multiple-Proposer | Single-Proposer |
| --- | --- | --- |
| $n=6$ | 61.3% | 56.7% |
| $n=3$ | 58.0% | 56.1% |
| $n=2$ | 58.8% | 54.5% |
| $n=1$ | 47.8% | 47.8% |

### 3.4 Budget and Token Analysis

Figure: (a) LC win rate vs. cost
Refer to caption: x6.png

To understand the relationship between budget, token usage, and LC win rates,
we conducted a budget and token analysis.
Figure˜5(a) and Figure˜5(b) illustrate these relationships.

#### Cost Effectiveness

In Figure˜5(a), we plot the LC win rate against
the average inference cost for each instance in the AplacaEval 2.0 benchmark.
The cost is calculated based on pricing information available from API provider websites.(^4^44For open-source models, we calculate the price using data from [https://api.together.ai/models](https://api.together.ai/models); for OpenAI models, we use pricing details from [https://openai.com/api/pricing/](https://openai.com/api/pricing/). Pricing data was retrieved as of May 22, 2024.)
This helps identify cost-effective models that achieve high performance without incurring excessive expenses.
The chart reveals a Pareto front where certain models strike an optimal balance between cost and performance.
Models closer to this Pareto front are more desirable as they provide better monetary value by delivering high LC win rates at lower costs.
Specifically, if we prioritize the quality, MoA is the best configuration.
However, if we want to strike a good balance between quality and cost, MoA-Lite can match GPT-4o’s cost while achieving higher level of quality.
Notably, it outperforms GPT-4 Turbo by approximately $4\%$ while being more than twice as cost-effective.

#### Tflops Consumption

Figure˜5(b) depicts the relationship between LC win rate and the number of tflops.
Here we use the number of tflops as a proxy for latency since latency can vary depending on the inference systems.
This analysis is crucial for understanding how different models manage their budgets
while maintaining or improving performance levels.
Similar to the cost efficiency analysis, a Pareto front can be observed here as well.
Models on this front effectively utilize their computational resource to maximize their LC win rate.

## 4 Related Work

### 4.1 LLM Reasoning

In order to improve generation quality of LLMs,
recent researches have experienced great progresses in optimizing LLMs to various downstream tasks through prompt engineering.
Chain of Thought (CoT) (Wei et al., ; Kojima et al., ) prompting techniques represent a linear problem-solving approach where each step builds upon the previous one.
Fu et al. () applied CoT to multi-step reasoning tasks.
To automate CoT prompting, Auto-CoT (Zhang et al., ) constructs demonstrations by sampling diverse questions and generating reasoning chains.
Active-Prompt (Diao et al., ) focuses on selecting the most uncertain questions for task-specific annotations.
PS Prompt (Wang et al., ) decomposes tasks into subtasks.
Tree-of-Thought (ToT) (Yao et al., ) expands on the reasoning process by considering multiple paths of reasoning and self-evaluating choices.
Effective Graph-of-Thought (Yao et al., ) frames thoughts as graphs.
Natural Program prompting (Ling et al., ) is proposed for better solving deductive reasoning tasks.
And re-reading prompt (Xu et al., ) revisits question information embedded within input prompts.

### 4.2 Model Ensemble

A straightforward solution to leverage the strengths of multiple models is reranking outputs from different models.
For instance, Jiang et al. () introduce PairRanker,
which performs pairwise comparisons on candidate outputs to select the best one, showing improvements on a self-constructed instruction dataset.
To address the substantial computational costs associated with multi-LLM inference,
other studies have explored training a router that predicts the best-performing model from a fixed set of LLMs for a given input (Wang et al., ; Shnitzer et al., ; Lu et al., ).
Additionally, FrugalGPT (Chen et al., ) proposed reducing the cost of using LLMs by employing different models in a cascading manner.
In order to better leverage the responses of multiple models,
Jiang et al. () trained a GenFuser,
a model that was trained to generate an improved response to capitalize on the strengths of multiple candidates.
Huang et al. () proposed to fuse the outputs of different models by averaging their output probability distributions.

Another line of work is multi-agent collaboration.
Several studies explore using multiple large language models as agents that collectively discuss and reason through given problems interactively.
Du et al. () establishes a mechanism for symmetric discussions among agents.
Around the same time, MAD (Liang et al., ) introduces an asymmetric mechanism design, with different roles, i.e., debater and judge. Other similar works include (Chan et al., ).
Moreover, ReConcile (Chen et al., ) exemplifies an asymmetric discussion involving weighted voting.
To understand discussion more deeply, Zhang et al. () aim to explain such collaboration mechanism in a social psychology view.
Wang et al. () systematically compared multi-agent approaches and found a single agent with a strong prompt including detailed demonstrations can achieve comparable response quality to multi-agent approaches.

## 5 Conclusion

This paper introduces a Mixture-of-Agents approach aimed at leveraging the capabilities of multiple LLMs via successive stages for iterative collaboration. Our method harnesses the collective strengths of agents in the Mixture-of-Agents family, and can significantly improve upon the output quality of each individual model.
Empirical evaluations conducted on AlpacaEval 2.0, MT-Bench, and FLASK demonstrated substantial improvements in response quality, with our approach achieving the LC win rate up to $65\%$.
These findings validate our hypothesis that integrating diverse perspectives from various models can lead to superior performance compared to relying on a single model alone. In addition, we provide insights into improving the design of MoA; systematic optimization of MoA architecture is an interesting direction for future work.

#### Limitations.

Our proposed method requires iterative aggregation of model responses,
which means the model cannot decide the first token until the last MoA layer is reached.
This potentially results in a high Time to First Token (TTFT), which can negatively impact user experience.
To mitigate this issue, we can limit the number of MoA layers,
as the first response aggregation has the most significant boost on generation quality.
Future work could explore chunk-wise aggregation instead of aggregating entire responses at once, which can reduce TTFT while maintaining response quality.

#### Broader Impact.

This study holds the potential to enhance the effectiveness of LLM-driven chat assistants, thereby making AI more accessible.
Moreover, since the intermediate outputs that are expressed in natural language, MoA presented improves the interpretability of models.
This enhanced interpretability facilitates better alignment with human reasoning.

## Supplementary Material

## Appendix A Spearman Correlation using Different Similarity Functions

We present results using TF-IDF-based similarity and Levenshtein similarity when calculating the Spearman correlation.
Specifically, within each sample of $n$ proposed answers,
we calculate Spearman correlation coefficient between the $n$ similarity scores and the $n$ preference scores determined by the GPT-4-based evaluator.
As shown in Figure˜6, there is indeed a positive correlation between win rate and both TF-IDF similarity and Levenshtein similarity.

Figure: Figure 6: (a) Spearman Correlation using TF-IDF similarity; (b) Spearman Correlation using Levenshtein similarity.

## Appendix B LLM Ranker

This section introduces the setup of the LLM-Ranker used in this paper.
The LLM-Ranker is designed to evaluate and rank the best output generated by some LLMs.
Table˜5 presents the template for prompting the model during these evaluations.
We use this LLM-Ranker to pick the best answer among and use AlpacaEval evaluator
to evaluate the best ranked answer.

**Table 5: Prompt for ranking with LLMs**
| You are a highly efficient assistant, who evaluates and selects the best large language model (LLMs) based on the quality of their responses to a given instruction. This process will be used to create a leaderboard reflecting the most accurate and human-preferred answers. |
| --- |
| I require a leaderboard for various large language models. I’ll provide you with prompts given to these models and their corresponding outputs. Your task is to assess these responses, and select the model that produces the best output from a human perspective. |
| ## Instruction |
| {<br>"instruction": """{instruction}""",<br>} |
| ## Model Outputs |
| Here are the unordered outputs from the models. Each output is associated with a specific model, identified by a unique model identifier.<br>{<br>{<br>"model_identifier": "{identifier_1}",<br>"output": """{output_1}"""<br>},<br>{<br>"model_identifier": "{identifier_2}",<br>"output": """{output_2}"""<br>},<br>{<br>"model_identifier": "{identifier_3}",<br>"output": """{output_3}"""<br>},<br>{<br>"model_identifier": "{identifier_4}",<br>"output": """{output_4}"""<br>},<br>{<br>"model_identifier": "{identifier_5}",<br>"output": """{output_5}"""<br>},<br>{<br>"model_identifier": "{identifier_6}",<br>"output": """{output_6}"""<br>}<br>} |
| ## Task |
| Evaluate the models based on the quality and relevance of their outputs, and select the model that generated the best output. Answer by providing the model identifier of the best model. We will use your output as the name of the best model, so make sure your output only contains one of the following model identifiers and nothing else (no quotes, no spaces, no new lines, …). |
| ## Best Model Identifier |

## Appendix C Case Study

**Table 6: Case: Some models produce high quality answers.**
| Role | Preference | Content |
| --- | --- | --- |
| User | - | I want to talk about "Smooth", a song by Rob Thomas. |
| Qwen1.5-110B-Chat | 0.35 | … It’s a perfect blend of rock, pop, and Latin music, showcasing Santana’s signature guitar work and Rob Thomas’s soulful vocals … |
| Qwen1.5-72B-Chat | 0.00 | … |
| Llama-3-70B-Instruct | 0.00 | … it’s a collaboration between Rob Thomas, the lead vocalist of Matchbox Twenty, and Santana, the legendary guitarist … |
| WizardLM-2-8x22B | 0.99 | … It spent 12 weeks at the top of the Billboard Hot 100 chart in the United States …<br>capturing the song’s sultry and energetic vibe … |
| Mixtral-8x22B-Instruct-v0.1 | 0.00 | … |
| dbrx-instruc | 0.00 | … |
| Aggregated<br>(Qwen1.5-110B-Chat) | 0.99 | "Smooth" is actually a collaboration between Rob Thomas, who is the lead singer of the band Matchbox Twenty, and the renowned Latin rock guitarist Carlos Santana … This iconic song blends rock, pop, and Latin music elements, showcasing Santana’s signature guitar work and Rob Thomas’s distinctive vocals … The song was a colossal success, spending 12 weeks at the top of the Billboard Hot 100 … The music video, set in a vibrant club scene, complements the song’s sultry vibe … |

**Table 7: Case: all proposed responses are not good enough.**
| Role | Preference | Content |
| --- | --- | --- |
| User | - | How do you become an author? |
| Qwen1.5-110B-Chat | 0.00 | Becoming an author involves several steps and …<br>3. **Choose your niche**:…<br>8. **Understand the publishing industry**:…<br>10. **Self-publishing options**:… |
| Qwen1.5-72B-Chat | 0.00 | … |
| Llama-3-70B-Instruct | 0.16 | Becoming an author can be a rewarding and fulfilling career…<br>1. **Develop a love for reading and writing**:…<br>10. **Market and promote your work**:…<br>11. **Continuously improve**:… |
| WizardLM-2-8x22B | 0.03 | 1. …<br>4. Finish your work:… |
| Mixtral-8x22B-Instruct-v0.1 | 0.00 | … |
| dbrx-instruc | 0.00 | … |
| Aggregated<br>(Qwen1.5-110B-Chat) | 0.33 | Becoming an author involves a dedicated journey…<br>1. **Cultivate a Love for Writing and Reading**:…<br>4. **Choose Your Niche**:…<br>5. **Finish Your Work**:…<br>10. **Self-Publishing**:…<br>11. **Marketing and Promotion**:…<br>12. **Continuous Learning and Writing**:… |

We present a case study in this section.
Due to the length of the responses generated by all models, we will only show selected fragments for brevity.
To illustrate how the aggregator synthesizes the response,
we underlined similar expressions between the proposed responses and the aggregated response in different colors.
We omit the content that all proposed responses have mentioned.

Table˜6 showcases the responses generated by different proposers.
The aggregated response generated by Qwen1.5-110B-Chat
reflects a high preference for its own content but also incorporates key points
from Llama-3-70B-Instruct and WizardLM 8x22B.
Notably, GPT-4’s preference score for WizardLM 8x22B’s response is 0.99,
and the final aggregated answer also achieves a preference score of 0.99.

Meanwhile, Table˜7 presents another case
where none of the proposed responses achieve a high GPT-4 preference score.
Despite this, the aggregator successfully identifies and
incorporates the strong points from these responses,
achieving a preference score of 0.33.

## Appendix D MATH Task

Here, we demonstrate that our approach is applicable to reasoning tasks,
such as those in the MATH dataset Hendrycks et al. ().
The results are presented in Table˜8, where we show that our method consistently enhances accuracy by a significant margin.
This indicates that our approach is also effective for this type of task.
Notably, our method is complementary to existing reasoning techniques such as Chain of Thought Wei et al. () and Self-consistency Wang et al. ().

**Table 8: Results on the MATH task. We evaluate different aggregators, with all six models serving as proposers in each MoA layer.**
| Aggregator | Layer 1 | Layer 2 | Layer 3 |
| --- | --- | --- | --- |
| Qwen1.5-72B-Chat | 0.428 | 0.526 | 0.552 |
| Qwen1.5-110B-Chat | 0.500 | 0.570 | 0.576 |
| Wizard 8x22b | 0.544 | 0.574 | 0.580 |
| Mixtral-8x22B-Instruct-v0.1 | 0.282 | 0.534 | 0.556 |
| Llama-3-70B-Instruct | 0.456 | 0.584 | 0.578 |
| dbrx-instruct | 0.314 | 0.456 | 0.522 |

## Peer Reviews

confidence: 4
contribution: 2
initial_rating: 5
presentation: 2
questions: 1.  Why do you call your method as mixture of agents instead of mixture of LLMs.   I did not see any behaviours of agents. 

2.  Are there any lines missing in Figure 6 (a) and (b)?
soundness: 2
strengths: 1. To the best of my knowledge, the proposed framework is both novel and reasonable. MoA can be viewed as a specific method for combining multiple weaker models to create a stronger model.

2. The model's performance is competitive, showing improvements over GPT-4 Omni on three benchmarks.
summary: This paper proposes a mixture-of-agents (MoA) framework that leverages the collective insights of multiple large language models (LLMs).

The core process involves several iterative steps: (1) multiple LLMs generate initial draft proposals; (2) these proposals are shared with all LLMs in the following iterations to generate refined proposals; (3) this second step is repeated multiple times, with an aggregator ultimately producing the final response.

Experimental results on four benchmarks (AlpacaEval 2.0, MT-Bench, Arean Hard, and FLASK) demonstrate that MoA can outperform GPT-4 Omni.
weaknesses: 1.  The proposed model is more resource-intensive than single LLM-based models.  
2.  Most evaluations use LC metrics, with only a limited evaluation on MATH tasks included in the appendix. Further evaluations on diverse tasks are necessary to illustrate the general advantages of the proposed method.  

3. An important question is how to select the set of proposal LLMs. Currently, the paper demonstrates two setups: one with relatively large models and one with smaller models. However, there is no guideline or formal strategy for choosing LLM sets. Additionally, it would be interesting to see the performance of a mixed set containing a small number of large LLMs and a majority of small LLMs.  Combining models with different language data is also a very interesting topic. Another crucial question is determining the number of layers. Aside from treating it as a hyperparameter, is there a way to determine an optimal layer count for a given set of proposal LLMs?  

4. GPT-4o is only used as the aggregator. It would be informative to evaluate its performance if it were included as one of the proposal LLMs.

---

confidence: 4
contribution: 3
initial_rating: 5
presentation: 3
questions: See the weaknesses above.
soundness: 3
strengths: + Proposal of a new effective framework to employ the collective intelligence of multiple LLMs.
+ Empirical evaluation on AlpacaEval 2.0, Arena-Hard, and MT-Bench verifies the effectiveness of the proposed solution.
summary: The paper proposes Mixture-of-Agents (MoA) as a possible pathway to leverage the collective strengths of multiple LLMs.  By stacking LLMs into multiple layers and employing the output of LLM in previous layers, the frameworks allows a iterative refinement and strike a balance between inference cost and the performance.
weaknesses: + Stacking LLMs into layers and revising the output obtained from previous layers seems like another form of model ensemble and I would suggest including model ensemble as one of the comparative methods.
+ In Figure 6, the max number of tflops among proposers in each MoA layer is used as an approximation of the total tflops of the entire layers since different proposers can run in a parallel way. However, the approximation is only reasonable when considering the inference latency for a single query. Otherwise, if we have a batch of data, with the same computation resources MoA can introduce extra latency since the parallel of proposers limits the data parallel size. 
+ The evaluation of MoA is only performed on instruction-following benchmarks. More evaluation of reasoning and commonsense knowledge benchmarks such as MMLU and BBH is necessary for a comprehensive understanding of the efficacy of MoA.   
+ Detailed ability on the specific role of each proposer is missing. How does each proposer contribute to the final output? Is it possible for a proposer to simply repeat the output from previous layers? Will the models in later layers revise the mistakes made in previous layers?

---

confidence: 4
contribution: 3
initial_rating: 5
presentation: 3
questions: 1] What is the point of the tflops consumption analysis? And where are the numbers for these obtained from? Gpt-4o and Gpt-4-turbo are closed-source models, so it is unclear where those numbers are obtained.

2] In a similar vein, can tflops really be a proxy for latency where one is used to perhaps look at real-time serving of models while the other looks at consumption? Especially when the system in question is not locally run but uses an inference endpoint (as mentioned in section 3.1)

3] While you analyzed a model's propensity to be an aggregator or a proposer, did you consider combining models that might be good at different kinds of tasks (for example, math or science)?

4] Was there any reason to include LLM reasoning in the related work when the work does not explicitly show gains on any reasoning dataset and the evaluation is mostly on instruction following/preference benchmarks?

Last but not least, just a suggestion for the paper's readability: it would significantly enhance the analogy to MoE if there was an explicit mention that MoE uses routing/gating networks to sometimes choose between routing between single or multiple experts. They specialize in different aspects vs traditional networks where all input data is processed through every layer. There is a mention in the work that the MoA, from the specification of the architecture, consolidates the role of the gating network and expert network using a LLM. Still, it is not the case on some level because it is not choosing which experts it will route its output from, and the input does pass through all layers, the aggregator picks and chooses information from the proposer LLMs but it does not necessarily always just drop some inputs.
soundness: 4
strengths: - While collaborativeness has been harnessed in various ways, a layered funnel architecture in which earlier layers add information for later layers to consume and interplay to summarize these outputs efficiently to yield a final output has not been explored. 

- The authors also thoroughly conducted their experiments to establish collaborativeness and benchmark various datasets. The usage of open-source models to showcase the results helps to make replicating these results possible. 

- They also analyze the cost-effectiveness of these models compared to some base models, showing the effectiveness of applying this architecture to obtain better results at a cheaper rate.
summary: This work presents a Mixture of Agents (MoA) Architecture. This multi-layer architecture harnesses the collaborativeness of LLMs, where agents (models) in later layers aggregate and combine auxiliary information from previous layers with the user task to yield the final output. They evaluate this proposed architecture on AlpacaEval 2.0, Arena-Hard, MT-bench, and Flask and show that their architecture performance surpasses GPT-4o. 

The "collaborativeness" of LLMs is defined as the phenomenon where the LLM generates better responses when presented with outputs from other models, even if these models are less capable. 

The architecture presented has two types of models: "proposer models," which generate useful references for use by other models; these models offer "perspective" or might even act as auxiliary/additional information providers to the aggregator. The other type of models present are "aggregator models," which are proficient in combining responses from other models into a single high-quality output. 

They not only show an MoA architecture but also a MoA-Lite architecture that outperforms GPT-4o and is both better and more cost-effective. They conduct various empirical experiments showcasing the effectiveness of their approach to MoA outperforming LLM-Ranking, the ability to incorporate best answers, and the effects of model diversity and different proposers.
weaknesses: - The idea of collaborativeness or hierarchical processing in LLMs is not exactly novel [1][2]; if you think of different layers in the architecture using the same model, this reduces to some form of iterative refinement of outputs as shown in [2]. 

- Some of the analysis in the paper to support budget analysis is unclear.



#### *References*
1] [2308.10848] AgentVerse: Facilitating Multi-Agent Collaboration and Exploring Emergent Behaviors 

2] LEGO: A Multi-agent Collaborative Framework with Role-playing and Iterative Feedback for Causality Explanation Generation - ACL Anthology

---

confidence: 3
contribution: 3
initial_rating: 8
presentation: 4
questions: - Do you use humans in your evaluation in any part of your paper? It seems that all your tests use (language) models for evaluation. Did you conduct any (manual/human) analysis of the outputs generated by the models at any stage?
- An experiment that could be more prominently contextualised is the case where there is one aggregator/proposer agent in each layer (numbers in Table 3, discussion in **Effect of model diversity and the number of proposers**. This is kind of a middle-case between the LLM-as-reranker baseline (which you clearly outperform) and your proposed idea in full generality. In the case of a single proposer, your win rate in Table 3 is 47.8% (so not better than the baseline). I think it would be very valuable to include this setting as a baseline also in all other experiments and not only those for AlpacaEval2.0, since this really shows when the proposed method starts to show improvements to the baselines.
- The ablations are very informative and well conducted, and covers all the important points one would want to see in the main paper.
- Across the paper, there are mentions to GPT4 Preview (Figure 5a), GPT-3.5-turbo-0125 (Figure 3), GPT4-turbo (Figure 6a), GPT4-omni (in multiple places). Could you please introduce all the models from the GPT family you used across your experiments in a single place with an unambiguous description of their model name if available? The paper is in general very well organised, this is however one of the few points where this organisation could be improved.
- In Figures 6a and 6b, please include in your description why you have multiple circles of the same size/colour, and provide some context on what you mean by '1', '2', '3'. For someone who read the paper and reach the figures that is very clear, but someone looking at the figure without that context fresh may not understand it. Also, is it correct to assume that each of the large blue circles (MoA, multi-proposer, with 3 MoA layers) is an MoA model with different configurations (like different LLMs as final aggregators)? If that is the case, it may make sense to add some nuance to your discussion of the results. In practice, for someone with a new problem who want to use your paper's idea, do you assume by reusing your best-performing MoA, they will also get the best results on their new problem? In other words: should you not include also something like the average over the 6 large blue circles (or perhaps over the 3 best large blue circles)?
soundness: 3
strengths: - The idea of using multiple LLMs as agents to generate answers and to aggregate these answers in a sequence of mixture-of-agents (MoA) layers is interesting.
- Very good performance compared to many relevant baselines.
- Experiments are solid and well conducted, and the ablation studies give important insight into the most relevant aspects of the proposed method.
summary: The paper proposes a method to use multiple LLMs as agents to improve the quality of generated responses to arbitrary queries. Agents are deployed in mixture-of-agent (MoA) layers. In the first MoA layer, multiple agents generate an answer to the input query independently. In subsequent layers, each agent in layer $T$ generates an answer to the query while also seeing the answers of all agents from layer $T-1$. At the last layer, a single aggregator LLM is used to combine all answers generated by the agents in the last MoA layer into a single answer. The proposed method shows state-of-the-art performance on multiple benchmarks compared to recent models from the GPT family including GPT4-omni, GPT4-turbo.
weaknesses: - The main weakness, in my opinion, is the fact the authors did not use human evaluation at any parts of their pipeline. I understand that LLMs can perform very well (according to measures of correlation to humans) on multiple benchmarks, but at least one small-scale human evaluation could have been provided as a sanity-check.

Meta-review: The paper introduces a Mixture-of-Agents (MoA) approach that combines multiple large language models (LLMs) to improve performance. The MoA architecture is layered, with each layer containing multiple LLM agents. Each agent utilizes outputs from the previous layer's agents as auxiliary information to generate its response. The paper demonstrates comprehensive and strong results of MoA against many strong LLMs on various benchmarks. There are some comments from the reviewers, e.g. the searching efforts to select proposal LLMs, unclear budget analysis, and human evaluation results. I encourage the authors to incorporate those comments into the final paper.

Decision: Accept (Spotlight)