HPSS: Heuristic Prompting Strategy Search for LLM Evaluators

Bosi Wen, Pei Ke, Yufei Sun, Cunxiang Wang, Xiaotao Gu, Jinfeng Zhou, Jie Tang, Hongning Wang, Minlie Huang · DOI

Abstract

Large Language Models (LLMs) have emerged as powerful tools for evaluating natural language generation (NLG). However, their performance as evaluators is highly sensitive to the specific "prompting strategy" employed—a complex combination of factors including scoring scales, evaluation criteria, and the structural order of instructions. This paper introduces Heuristic Prompting Strategy Search (HPSS), an automated framework designed to navigate the massive combinatorial space of prompting factors. By utilizing a heuristic-guided search inspired by genetic algorithms, HPSS identifies optimal strategies that significantly outperform human-designed prompts. Experimental results across diverse NLG tasks show that HPSS achieves a 29.4% relative improvement in Spearman correlation with human judgments compared to standard baselines, while remaining 20x more computationally efficient than existing state-of-the-art methods like G-Eval.

Introduction

As natural language generation tasks grow in complexity, traditional automated metrics (like ROUGE or BLEU) often fail to capture the nuances of coherence, factuality, and creativity. Consequently, "LLM-as-a-judge" has become the standard for meta-evaluation. Despite their utility, these LLM judges are notoriously brittle; a minor change in the prompt can lead to vastly different evaluation outcomes.

Existing research into prompt optimization typically focuses on isolated variables, such as the wording of a criterion or the inclusion of few-shot examples. However, these factors do not operate in isolation. The interaction between a scoring scale and the placement of a reference text, for instance, creates a combinatorial explosion. The authors identify a strategy space of nearly 13,000 possible configurations, making manual engineering impossible. HPSS addresses this by treating prompt engineering as a strategic search problem.

HPSS optimizes the evaluation process by systematically exploring the Strategy Space, which consists of eight key factors:

  1. Scoring Scale: (e.g., 1-5, 1-10, 1-100)
  2. In-Context Examples: Presence and type of few-shot demonstrations.
  3. Evaluation Criteria: Specific definitions of what constitutes quality.
  4. Reference Text: Whether to include a gold-standard comparison.
  5. Chain-of-Thought (CoT) Style: The reasoning format required of the LLM.
  6. AutoCoT: Self-generated reasoning steps.
  7. Metrics: The specific aspect being measured (e.g., fluency vs. relevance).
  8. Order: The sequence of components (e.g., Task Description, Input Content, and Instructions).

The Search Algorithm

The framework operates in three primary phases:

  • Initialization and Perturbation: The search begins with a baseline prompt (derived from MT-Bench). The algorithm performs initial "perturbations"—changing one factor at a time—to estimate the "advantage" or marginal gain provided by specific values (e.g., determining if a 1-10 scale generally performs better than a 1-5 scale).
  • Heuristic-Guided Search: Inspired by Genetic Algorithms, HPSS evolves a population of high-performing strategies. It uses a custom heuristic function based on the previously estimated advantages to guide the mutation process, prioritizing changes likely to yield the highest gains.
  • Exploration vs. Exploitation: To avoid local optima, the algorithm balances exploration (trying adjacent strategies using a softmax probability) and exploitation (jumping to unexplored strategies with the highest predicted overall advantage).

Experimental Setup

HPSS was evaluated across four distinct NLG domains using established meta-evaluation benchmarks:

  • Summarization: Summeval
  • Dialogue: Topical-Chat
  • Data-to-Text: SFHOT and SFRES (restaurant descriptions)
  • Story Generation: HANNA

The researchers utilized a 50/50 split for validation and testing. Half of the data was used to search for the optimal strategy, while the remaining half served as the hold-out set to measure final performance against human gold-standard judgments.

Key Results and Analysis

Performance Gains

HPSS achieved a 29.4% relative improvement in Spearman correlation with human judgments over the MT-Bench baseline. Furthermore, it consistently outperformed other automated prompt optimization techniques, such as APE and OPRO, across both closed-source (GPT-4o-mini) and open-source (Qwen2.5-14B) models.

The Importance of Component Order

A significant finding was the impact of component Order. The sequence in which information is presented to the LLM (e.g., placing the task description after the input content) proved to be one of the most influential factors in evaluator accuracy. HPSS frequently discovered non-intuitive ordering strategies that human experts rarely employ.

Efficiency and Generalizability

While state-of-the-art evaluators like G-Eval rely on "self-consistency" (averaging scores from 20 different iterations), HPSS found strategies that outperformed G-Eval using only a single greedy decoding pass. This results in a 20x increase in inference efficiency. Additionally, strategies optimized for one dataset often generalized well to others, suggesting that the underlying logic of a "good" evaluation strategy is somewhat universal.

Conclusion

HPSS demonstrates that the bottleneck in LLM-based evaluation is often not the model's capability, but the strategy used to prompt it. By automating the search for optimal combinations of prompt factors, HPSS provides a path toward more accurate, efficient, and robust automated evaluation. Future work may expand this search space to include multi-agent debate and more complex persona-based prompting.

Summary updated

BibTeX
@inproceedings{wen2025hpss,
  author = {Bosi Wen and Pei Ke and Yufei Sun and Cunxiang Wang and Xiaotao Gu and Jinfeng Zhou and Jie Tang and Hongning Wang and Minlie Huang},
  title = {{HPSS: Heuristic Prompting Strategy Search for LLM Evaluators}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2025},
}
Figure