Skip to main content
QUICK REVIEW

[Paper Review] Large Language Models are Effective Text Rankers with Pairwise Ranking Prompting

Zhen Qin, Rolf Jagerman|arXiv (Cornell University)|Jun 30, 2023
Topic ModelingComputer Science16 citations
TL;DR

Pairwise Ranking Prompting (PRP) enables LLMs to rank texts by comparing document pairs, achieving state-of-the-art zero-shot ranking with moderate-sized open-source LLMs on standard benchmarks. PRP outperforms many larger or blackbox models on TREC-DL2019/2020 and is efficient with variants like PRP-Sliding-K.

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.

Motivation & Objective

  • Motivate the text ranking problem for LLMs and identify limitations of pointwise and listwise prompts.
  • Introduce Pairwise Ranking Prompting (PRP) to reduce task difficulty for LLMs.
  • Demonstrate that open-source, moderate-sized LLMs can achieve state-of-the-art ranking performance on standard benchmarks.
  • Explore efficiency variants of PRP and analyze robustness to input order and API mode.

Proposed method

  • Define a pairwise prompting unit u(q, d1, d2) that asks the LLM which of two passages is more relevant to a query.
  • Use scoring mode to obtain log-likelihood-based scores for pairwise outputs and swap document order to mitigate prompt order sensitivity.
  • Develop three PRP variants: PRP-Allpair (global pairwise aggregation), PRP-Sorting (use pairwise comparisons as a comparator in sorting), PRP-Sliding-K (linear-time, top-K focused).
  • Evaluate on MS MARCO-based TREC-DL2019 and TREC-DL2020 with top-100 BM25 reranks using open-source LLMs (FLAN-T5-XL/XXL, FLAN-UL2) and compare to baselines.
  • Discuss practical properties, including support for both generation and scoring APIs, input-order insensitivity, and linear-time variants.

Experimental results

Research questions

  • RQ1Can pairwise prompting enable zero-shot ranking with moderate-sized open-source LLMs to surpass fine-tuned baselines?
  • RQ2How do PRP variants compare in accuracy and efficiency to pointwise and listwise prompting approaches on standard benchmarks?
  • RQ3Are open-source LLMs able to achieve competitive ranking with generation vs scoring modes and under input-order perturbations?
  • RQ4What are the trade-offs between PRP-Allpair, PRP-Sorting, and PRP-Sliding-K in terms of computation and robustness?

Key findings

  • PRP with FLAN-UL2 20B achieves state-of-the-art results on TREC-DL2020, outperforming the prior best based on GPT-4 by over 5% at NDCG@1.
  • On TREC-DL2019, PRP approaches outperform InstructGPT and are competitive with GPT-4, notably across most ranking metrics.
  • PRP variants based on FLAN-UL2 and FLAN-T5 demonstrate competitive results with much smaller models (3B–20B) than prior giant LLMs.
  • PRP-Sliding-K provides a favorable efficiency–effectiveness balance with linear or near-linear complexity and good top-K ranking performance.
  • PRP is robust to input ordering and works with both scoring and generation APIs, showing minimal sensitivity to prompt mode.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.