Introduction
In the field of text-based AI system optimization, Large Language Models (LLMs) are increasingly utilized to refine the outputs of other LLMs. This iterative process typically involves a feedback loop where a Generator produces an initial output, an Evaluator provides natural language feedback, and the Generator uses this feedback to improve its next iteration. However, current frameworks often rely on a single LLM evaluator, which frequently acts as a bottleneck. These "jack-of-all-trades" evaluators often suffer from a "suboptimality gap," missing subtle logical or technical flaws while focusing on broader aspects like readability.
The AIME Protocol
To address these limitations, we introduce AIME (AI system optimization via Multiple LLM Evaluators). AIME replaces the single evaluator with a panel of specialized, role-based LLM instances.
The AIME workflow consists of four primary stages:
- Role Assignment: Specific criteria—such as logic, syntax, or readability—are assigned to independent LLM instances.
- Independent Evaluation: Each specialized LLM evaluates the output based strictly on its assigned role.
- Concatenation: The individual critiques are merged into a comprehensive feedback string.
- Refinement: The combined feedback is returned to the generator LLM for the next optimization step.
Theoretical analysis suggests that while a single evaluator has a fixed suboptimality gap, a mixture of multiple independent evaluators can mathematically reduce this gap, more closely approximating an optimal evaluation policy.
Experimental Setup
AIME was evaluated on two challenging code generation benchmarks:
- LeetCodeHard: 39 competitive programming problems requiring complex algorithmic reasoning.
- HumanEval: A subset of 20 problems from the standard Python coding benchmark.
These datasets provide objective ground truth through unit tests, enabling precise measurement of the evaluators' ability to detect bugs.
Key Insights
- Specialization and Depth: Assigning specific roles (e.g., "Logic Analyst") encourages LLMs to provide more detailed and actionable feedback compared to general-purpose prompts.
- Independence and Diversity: While simply increasing the number of independent LLM samples improves error detection, the greatest performance gains come from a diversity of assigned roles.
- Resilience to Bias: AIME is robust against "lazy" or biased evaluators. If one evaluator fails to identify an error, others in the panel are likely to catch it.
- Role Prioritization: "Core" roles like Syntax, Logic, and Correctness are the most critical for task success, with their removal leading to significant performance drops.
Results
AIME demonstrates substantial improvements over single-evaluator baselines across multiple metrics.
- Error Detection Rate (EDR): AIME achieved an EDR up to 62% higher than the baseline, significantly reducing the number of missed bugs.
- Task Success Rate: On the LeetCodeHard benchmark, AIME-based optimization resulted in a 16% higher success rate in passing all unit tests.
- Robustness: Performance gains remained consistent across different LLM temperatures and outperformed "implicit evaluation" methods like Reflexion.
Conclusion and Future Work
AIME demonstrates that decomposing evaluation into specialized, independent modules significantly enhances the optimization of AI systems. While this approach increases computational cost and latency due to multiple API calls, the gains in accuracy and robustness are substantial. Future research will explore AIME's applicability in non-coding domains, such as molecule optimization or creative writing, and investigate more sophisticated methods for aggregating multi-evaluator feedback.
Summary updated