A Setwise Approach for Effective and Highly Efficient Zero-shot Ranking with Large Language Models
Shengyao Zhuang, Honglei Zhuang, Bevan Koopman, Guido Zuccon
TL;DR
The paper addresses the inefficiency–effectiveness trade-offs in zero-shot LLM-based document ranking by systematically comparing Pointwise, Listwise, and Pairwise prompting under a unified framework. It introduces Setwise prompting, which selects the most relevant document from a set to accelerate multi-document comparisons and can leverage model logits for improved Listwise ranking. Empirical results across TREC DL and BEIR benchmarks show Setwise often achieves strong effectiveness while significantly reducing inference and token costs, particularly when paired with efficient sorting (e.g., heap sort). The work also analyzes trade-offs controlled by the number of documents compared per step and demonstrates robustness to initial ranking variations, with practical implications for deploying efficient LLM-based rerankers in real-world systems. The authors provide open-source code for reproducibility and outline directions for future exploration across additional LLMs and prompt-learning techniques.
Abstract
We propose a novel zero-shot document ranking approach based on Large Language Models (LLMs): the Setwise prompting approach. Our approach complements existing prompting approaches for LLM-based zero-shot ranking: Pointwise, Pairwise, and Listwise. Through the first-of-its-kind comparative evaluation within a consistent experimental framework and considering factors like model size, token consumption, latency, among others, we show that existing approaches are inherently characterised by trade-offs between effectiveness and efficiency. We find that while Pointwise approaches score high on efficiency, they suffer from poor effectiveness. Conversely, Pairwise approaches demonstrate superior effectiveness but incur high computational overhead. Our Setwise approach, instead, reduces the number of LLM inferences and the amount of prompt token consumption during the ranking procedure, compared to previous methods. This significantly improves the efficiency of LLM-based zero-shot ranking, while also retaining high zero-shot ranking effectiveness. We make our code and results publicly available at \url{https://github.com/ielab/llm-rankers}.
