Tuning LLM Judges Hyperparameters

David Salinas, Omar Swelam, Frank Hutter · DOI

Evaluating Large Language Models (LLMs) typically necessitates expensive human experts or costly proprietary "LLM judges" such as GPT-4. This research introduces a systematic framework for tuning open-weight LLM judges—optimizing model selection, prompt structure, and inference parameters—to achieve state-of-the-art accuracy at approximately 1/1000th of the cost of traditional methods.

The Evaluation Bottleneck

As LLM complexity grows, evaluation becomes a critical bottleneck. Human annotation is slow and expensive, leading to the use of LLMs as "judges" to rank outputs. However, these judges are highly sensitive to "hyperparameters" like specific prompts, model size, and temperature settings. Tuning these judges has historically been considered too expensive; a single evaluation run can cost dozens of dollars. Consequently, many researchers rely on default prompts or expensive closed-source models, leaving performance gains on the table and fostering a "black box" evaluation culture.

Methodology: Hyperparameter Optimization for Judges

The authors frame LLM judge design as a Hyperparameter Optimization (HPO) problem, exploring a search space of 4,480 configurations. This space includes:

  • Models: Seven open-weight options (Llama 3.1, Qwen 2.5, Gemma 2).
  • Inference Params: Temperature settings and result averaging to mitigate position bias.
  • Prompting Strategies: 80 variations, including JSON vs. raw text, Chain-of-Thought (CoT) reasoning, and scoring formats (Likert vs. pairwise).

To make this search feasible, two techniques were employed:

  1. Multi-Fidelity Optimization (Successive Halving): Testing all configurations on a small set of instructions and promoting only the best to larger datasets. This prevents wasting resources on poor configurations.
  2. Multi-Objective Optimization: Identifying the Pareto front of judges that offer the best accuracy for a given budget.
Spearman correlation across different benchmarks shows high variance and instability at low instruction counts, which complicates early-stage tuning using traditional metrics.

Key Insights and Ideas

  • Human Agreement is the Superior Metric: The authors found that "Human Agreement" (matching human labels) is significantly more stable and cost-effective for tuning than Spearman correlation, especially at low instruction counts. This stability is crucial for multi-fidelity optimization.
  • Prompting Over Scaling: A well-tuned 8B model can outperform a poorly prompted 70B model, suggesting that model size is not the sole determinant of judge quality.
  • The "Pair" Format Advantage: Asking a judge to score both Assistant A and Assistant B (pairwise comparison) consistently outperformed single-winner or Likert scale formats.
  • CoT Nuance: Chain-of-Thought reasoning aids large models but can actually degrade the performance of smaller ones by introducing confusion.
Human agreement remains stable across varying instruction counts, making it a more reliable and cost-effective metric for multi-fidelity optimization than Spearman correlation.

Key Results

The authors identified three specific "Ours" configurations (Small, Medium, and Large) that redefine the cost-performance tradeoff. Their tuned open-weight judges matched or exceeded the performance of GPT-4 and specialized models like PandaLM.

  • Cost Efficiency: The "Ours-small" judge costs roughly $0.21 per 1,000 annotations, compared to $50.00 for a GPT-4-based judge.
  • Search Efficiency: By using multi-fidelity tuning, they searched thousands of configurations for just $2,000—a process that would have cost over $2 million using standard evaluation protocols.

Limitations and Future Work

While the study addressed position bias, other biases like verbosity bias (favoring longer answers) or self-preference bias (favoring their own model family) require further exploration. Additionally, as models evolve, optimal prompting strategies may shift. Future work will extend the multi-objective approach to explicitly optimize for stability and explainability alongside accuracy and cost.

Code and Data: The authors have open-sourced their tuning framework and a dataset of over 4 million annotations at github.com/geoalgo/judgetuning.

Summary updated

BibTeX
@inproceedings{salinas2025tuning,
  author = {David Salinas and Omar Swelam and Frank Hutter},
  title = {{Tuning LLM Judges Hyperparameters}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=cve4NOiyVp},
}
Figure