HackerPapers

arXiv:2306.17563cs.IR

Large Language Models are Effective Text Rankers with Pairwise Ranking Prompting

Zhen Qin, Rolf Jagerman, Kai Hui, Honglei Zhuang, Junru Wu, Le Yan, Jiaming Shen, Tianqi Liu, Jialu Liu, Donald Metzler, Xuanhui Wang, Michael Bendersky

Abstract

Ranking documents using Large Language Models (LLMs) by directly feeding the query and candidate documents into the prompt is an interesting and practical problem. However, researchers have found it difficult to outperform fine-tuned baseline rankers on benchmark datasets. We analyze pointwise and listwise ranking prompts used by existing methods and argue that off-the-shelf LLMs do not fully understand these challenging ranking formulations. In this paper, we propose to significantly reduce the burden on LLMs by using a new technique called Pairwise Ranking Prompting (PRP). Our results are the first in the literature to achieve state-of-the-art ranking performance on standard benchmarks using moderate-sized open-sourced LLMs. On TREC-DL 2019&2020, PRP based on the Flan-UL2 model with 20B parameters performs favorably with the previous best approach in the literature, which is based on the blackbox commercial GPT-4 that has 50x (estimated) model size, while outperforming other LLM-based solutions, such as InstructGPT which has 175B parameters, by over 10% for all ranking metrics. By using the same prompt template on seven BEIR tasks, PRP outperforms supervised baselines and outperforms the blackbox commercial ChatGPT solution by 4.2% and pointwise LLM-based solutions by more than 10% on average NDCG@10. Furthermore, we propose several variants of PRP to improve efficiency and show that it is possible to achieve competitive results even with linear complexity.

arXiv comments
Accepted to NAACL 2024. Corrected results of RankT5 on TREC-DL19
Journal reference
DOI
Subjects
cs.IRInformation Retrieval cs.CLComputation and Language cs.LGMachine Learning

On Hacker News

Linked by 4 identifiable commenters in 4 comments across 4 threads, from Apr 2024 to Sep 2025. Found in 1 HN submission from Jul 2023 to Jul 2023. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments4 threads

    • That was a small self-contained example that fit above the fold in the README (and fwiw even last year’s models like GPT-4o give the right output there). That `sort` is based on pairwise comparisons, which is one of the best ways you can do it in terms of accuracy (Qin et al.…

      anishathalyeView on HNParent context

    • For anyone interested in these LLM pairwise sorting problems, check out this paper: https://arxiv.org/abs/2306.17563 The authors discuss the person 1 / doc 1 bias and the need to always evaluate each pair of items twice. If you want to play around with this method there is a…

      markbergzView on HNParent context

    • This technique might be more efficient but can be highly correlated to the order of the input text. The paper [1] I mention in the repo touches upon such methods briefly. [1]: https://arxiv.org/abs/2306.17563

      vagozinoView on HNParent context

    • I'm not sure if that is a metric you can rely on. LLMs are very sensitive to the position of your item lists along the context, paying extra attention at the beginning and the end of those list. See the listwise approach at "Large Language Models are Effective Text Rankers with…

      dollo_7View on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.