Skip to content

More agents is all you need

Posted on:April 9, 2024 at 10:00 AM

More Agents Is All You Need

I read this fascinating paper titled “More Agents Is All You Need” and, it’s in line with the ensembling techniques from the classical machine learning techniques.

Key observations

So, what’s the big deal with adding more agents to LLM inference? According to the paper, it can improve the accuracy of the output in comparison to single instance of the LLM. For instance, An ensemble size of 20 Llama2-13B reached the accuracy of Llama2-70B and 15 Llama2-70B reached that of GPT-3.5. More Agents Is All You Need

The logic applied by the authors is pretty simple, they improved the LLM performance by brute-force increasing the number of agents, without requiring complicated prompting techniques or complex collaboration frameworks.

Proposed Method

The method these researchers used is pretty straightforward. There are 2 phase to the solution:

  1. Input to LLM is iteratively fed into a single LLM or multiple LLM agents are fed in the same input to generate multiple output.
  2. The majority vote determines the final output.

Comparison to Contemporary Techniques

I found the comparison with other ensembling techniques particularly interesting:

Understanding the Efficacy

To understand the efficacy of the solution, 3 orthogonal dimensions of task difficulty were considered:

  1. Inherent Difficulty: The complexity of the task itself.
  2. Number of Steps: More steps implies a more difficult task.
  3. Prior Probability: Result space partitioned into K equal probability intervals, then 1/K is is the Prior probability of the correct answer. Less prior probability implies more difficult task.

The relative performance increase of more agents with respect to single LLM query was defined as the Gain, and following observations were made.

  1. Gains increase then decrease by rising the inherent difficulty, owing to the limitations in the reasoning capabilities of the LLMs. Gain vs Inherent Difficulty
    • Gains increase with the number of steps.
    • Sampling-and-voting increases the performance for each step; applying sampling and voting compensates for the accumulation of errors from each step. Gain vs Number of Steps
  2. The performance increases with the prior probability. Thus decomposing low-probability tasks into multiple high-probability subtasks and addressing them hierarchically can boost performance Gain vs Prior Probability

Conclusion

More agents is all you need, simple sampling-and-voting method for instantiating agents can generally improve the performance of LLMs by increasing the ensemble size, this can be combined with other existing techniques to further improve performance.

Here is my tweet thread.