Leveraging Reference Documents for Zero-Shot Ranking via Large Language Models

Jieran Li, Xiuyuan Hu, Yang Zhao, Shengyao Zhuang, Hao Zhang · DOI

TL;DR

This paper introduces RefRank, a novel method for zero-shot document ranking using Large Language Models (LLMs). RefRank cleverly leverages a single "reference" document from the initial retrieval results to enable comparative scoring of all other documents, achieving the accuracy benefits of pairwise comparisons with the efficiency of pointwise methods. This approach significantly outperforms existing methods in terms of both accuracy and speed, making LLM-based reranking more practical for real-world applications.

What Problem Does This Paper Address?

Modern search systems often use a two-stage approach: a fast "retriever" to quickly find a large set of potentially relevant documents, followed by a slower but more accurate "reranker" to precisely order these documents. Large Language Models (LLMs) have shown great promise as zero-shot rerankers, meaning they can perform this task without needing specific training data. However, two main ways of using LLMs for reranking present a difficult trade-off:

  1. Individual-scoring (Pointwise): LLMs score each document independently. This is fast and can be easily batched for parallel processing. The problem is that these scores can be "calibrated" inconsistently across different documents, leading to errors when subtle differences in relevance matter.
  2. Comparative-sorting (Pairwise/Listwise): LLMs explicitly compare documents against each other. This leads to more accurate rankings because the LLM understands relative relevance. However, comparing every pair of documents becomes computationally very expensive, scaling quadratically ($O(n^2)$) with the number of documents, which is too slow for large candidate sets.

This paper aims to bridge this gap by developing a reranking method that offers the accuracy of comparative methods with the efficiency and batchability of pointwise methods.

Methods

The core innovation is RefRank, a reference-anchored relative scoring framework. Instead of asking the LLM to score documents in isolation or compare all pairs, RefRank uses a single, pre-selected "anchor" document from the initial retrieval results. The LLM is then prompted to compare each candidate document relative to this anchor.

Here's how it works:

  • Reference Anchor Selection: The top-ranked document from the initial retrieval (e.g., from BM25 or a dense retriever) is chosen as the reference anchor. This document is assumed to be a good representation of the query's intent.
  • Relative Scoring: For each candidate document, the LLM is prompted to determine if the candidate is more relevant than the anchor, or vice-versa. This is framed as a binary classification task.
  • Log-Odds Ratio: The LLM's output probabilities are used to calculate a log-odds ratio, which serves as a calibrated relevance score for the candidate document relative to the anchor. This effectively cancels out any inherent biases of the LLM.
  • Parallelism: Crucially, each candidate document is scored against the same anchor. This allows all these scoring operations to be performed in parallel, maintaining the efficiency of pointwise methods.
  • RefRank-Single vs. RefRank-Multiple:
    • RefRank-Single: Uses only the top-1 retrieved document as the anchor.
  • RefRank-Multiple: Aggregates scores from multiple top-ranked anchors (e.g., top-4) to improve robustness and mitigate potential noise from a single anchor.

RefRank is designed to be training-free, adding no extra model calls, and maintaining linear complexity ($O(n)$) with respect to the number of candidate documents.

Datasets

The paper evaluates RefRank on several standard information retrieval benchmarks:

  • TREC-DL 2019 and 2020: These are established benchmarks for document ranking.
  • BEIR benchmark datasets: This includes subsets like Signal, News, Covid, NFCorpus, DBPedia, and SciFact, covering a diverse range of information retrieval tasks and domains.

The initial retrieval for these datasets was performed using BM25.

Key Insights and Ideas

  • Anchor as a "Zero-Point": The key insight is that a well-chosen reference document acts as a stable "zero-point" for relevance scoring. By comparing everything to this anchor, the LLM's inherent biases are neutralized, leading to globally calibrated scores.
  • Exploiting Initial Retrieval: RefRank effectively reuses the signal from the initial retrieval stage, which is often overlooked by other reranking methods. This "free supervision" is critical for its efficiency.
  • Accuracy-Efficiency Sweet Spot: RefRank successfully navigates the accuracy-efficiency trade-off. It achieves comparative-level accuracy with the speed and batchability of pointwise methods, a significant achievement.
  • Anchor Sensitivity is Manageable: While the choice of anchor can slightly affect scores, the study shows that using any of the top-5 retrieved documents provides sufficiently stable results, making the method robust to minor variations. The top-1 anchor is generally preferred for simplicity and performance.
  • Aggregation for Robustness: Using multiple anchors (RefRank-Multiple) offers marginal but consistent improvements, acting as a safeguard against ambiguity and further stabilizing rankings.

Key Results

  • State-of-the-Art Performance: RefRank consistently outperforms pointwise baselines and achieves performance comparable to or better than pairwise/listwise methods across multiple LLMs (Flan-T5-XL/XXL, Llama-3.1-8B) and datasets.
  • Significant Speedup: RefRank-Single achieves reranking in seconds for 100 documents, which is orders of magnitude faster than pairwise methods (e.g., 1.9s vs. 115.8s for Flan-T5-XL on TREC-DL 2019).
  • Linear Complexity: The method maintains linear complexity ($O(n)$) and is fully batchable, making it highly scalable.
  • Minimal Overhead: RefRank adds only one extra passage per prompt (the reference) compared to pointwise methods, resulting in very low token overhead and constant latency per document.
  • Competitive with Listwise on Decoder-Only Models: For decoder-only LLMs like Llama-3.1-8B, RefRank-Multiple achieves comparable accuracy to listwise methods but is significantly faster.

Limitations and Future Work

  • Anchor Sensitivity: While manageable, the choice of anchor does have a slight impact. The paper suggests that the top-1 anchor is generally optimal, but practitioners can tune this.
  • Future Work: The authors propose several exciting directions:
  • Query-Difficulty-Aware Meta-Controller: Developing a system that dynamically adjusts the number of anchors based on query difficulty.
  • Multi-Modal and Streaming Retrieval: Extending RefRank to handle different data types (images, audio) and real-time streaming scenarios.
  • On-the-Fly Pseudo-Documents: Generating synthetic anchors to further improve flexibility.

By decoupling high-quality calibration from model size and inference budget, RefRank democratizes accurate LLM-based reranking for resource-constrained environments.

Summary updated

BibTeX
@misc{li2025leveraging,
  author = {Jieran Li and Xiuyuan Hu and Yang Zhao and Shengyao Zhuang and Hao Zhang},
  title = {{Leveraging Reference Documents for Zero-Shot Ranking via Large Language Models}},
  year = {2025},
  eprint = {2506.11452},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2506.11452},
}
Figure