Is ChatGPT Good at Search? Investigating Large Language Models as Re-Ranking Agent

Weiwei Sun, Lingyong Yan, Xinyu Ma, Pengjie Ren, Dawei Yin, Zhaochun Ren · DOI

TL;DR

This paper investigates the surprising effectiveness of large language models (LLMs) like ChatGPT and GPT-4 for passage re-ranking in information retrieval (IR), showing they can outperform state-of-the-art supervised methods. The authors also demonstrate that these powerful LLM capabilities can be distilled into smaller, more efficient specialized models, achieving competitive results with significantly reduced computational cost.

What Problem Does This Paper Address?

Traditional Information Retrieval (IR) systems often rely on multi-stage pipelines, with a crucial "re-ranking" step to refine initial search results. However, existing re-ranking methods typically require extensive manual supervision and struggle to generalize across diverse queries and domains. While Large Language Models (LLMs) like ChatGPT have shown remarkable zero-shot generalization abilities in various NLP tasks, their application to passage re-ranking has been limited. A key challenge is the mismatch between LLMs' pre-training objectives (e.g., text generation) and the specific task of ranking passages based on relevance to a query. This paper aims to bridge this gap by exploring how LLMs can be effectively used for passage re-ranking and how their capabilities can be distilled into more practical, specialized models.

Methods

The authors introduce a novel instructional permutation generation approach for LLMs. Instead of relying on log-probabilities of model outputs (which are often unavailable via APIs), they instruct LLMs to directly output a ranked list of passage identifiers. To handle the limited context windows of LLMs, they employ a sliding window strategy to re-rank longer lists of passages.

For distilling LLM capabilities, they propose a permutation distillation technique. This involves using ChatGPT as a "teacher" model to generate ranked permutations of passages for a set of queries. A "student" model (e.g., a BERT-like or GPT-like architecture) is then trained to mimic these permutations using a RankNet loss objective. This approach aims to transfer the nuanced ranking judgments of LLMs into a more efficient, specialized model.

Datasets

The paper uses several standard IR benchmarks for evaluation:

  • TREC-DL (2019 and 2020)
  • BEIR (covering eight diverse retrieval tasks)
  • Mr.TyDi (a multilingual passage retrieval dataset)

Additionally, to address concerns about data contamination and assess LLMs' ability to rank truly novel information, they introduce a new test set called NovelEval-2306. This dataset consists of 21 novel questions published after GPT-4's release, with passages obtained via Google search and manually labeled for relevance.

Key Insights and Ideas

  • LLMs as Zero-Shot Rankers: Surprisingly, LLMs like ChatGPT and GPT-4, when prompted correctly, can achieve state-of-the-art performance in passage re-ranking without any task-specific fine-tuning. This challenges the long-held belief that supervised learning is essential for high-quality re-ranking.
  • Permutation Generation is Key: Directly asking LLMs to output a ranked permutation of passages (rather than just relevance scores or query generation) proves to be a highly effective strategy. This suggests LLMs excel at comparative judgments.
  • Distillation for Efficiency: The powerful but computationally expensive LLMs can be distilled into much smaller, specialized models. This distilled model can outperform larger, supervised models, offering a path to deploy advanced re-ranking capabilities in real-world, cost-sensitive applications.
  • NovelEval's Importance: The creation of NovelEval highlights the critical need for continuously updated benchmarks to accurately assess LLMs' ability to handle information that is genuinely new and not present in their training data.

Key Results

  • GPT-4 Outperforms SOTA: GPT-4, using the proposed permutation generation method, significantly outperforms previous state-of-the-art supervised models like monoT5 (3B) across TREC, BEIR, and Mr.TyDi datasets, achieving average nDCG@10 improvements of 2.7, 2.3, and 2.7 respectively.
  • NovelEval Success: GPT-4 also achieves state-of-the-art performance on the newly introduced NovelEval test set, demonstrating its ability to rank unfamiliar information.
  • Distilled Model Superiority: A distilled 435M parameter DeBERTa model, trained on just 10K ChatGPT-generated permutations, outperforms the 3B parameter monoT5 model on the BEIR benchmark by an average nDCG@10 improvement of 1.67.
  • Cost-Effectiveness: Using GPT-4 for re-ranking the top 30 passages (instead of all 100) reduces cost by 5x while maintaining good results. The distillation process further drastically reduces computational costs for inference.
  • Model Stability: GPT-4 exhibits higher stability in generating permutations compared to ChatGPT and text-davinci-003, with fewer duplicate or missing passage identifiers.

Limitations and Future Work

  • Proprietary LLMs: The study primarily focuses on proprietary LLMs like ChatGPT and GPT-4. While open-source models were tested, their performance lagged significantly, suggesting further research is needed to effectively leverage open-source LLMs for re-ranking.
  • Initial Passage Order Sensitivity: The performance of LLM re-rankers is highly sensitive to the initial order of passages provided by the first-stage retriever (e.g., BM25). Enhancing first-stage retrieval or making LLMs more robust to initial order is an area for future work.
  • Focus on Re-ranking: The study solely examines LLMs in the re-ranking task. Future work could explore their role in the entire IR pipeline, including first-stage retrieval.
  • Bias and Hallucinations: The authors acknowledge that LLMs, including those used in this study, can exhibit bias, hallucinate, and generate incorrect information. This raises concerns for applications in sensitive domains, and they caution against using LLMs for ranking in high-stakes scenarios without careful consideration.

Summary updated

BibTeX
@inproceedings{sun2023is,
  author = {Weiwei Sun and Lingyong Yan and Xinyu Ma and Pengjie Ren and Dawei Yin and Zhaochun Ren},
  title = {{Is ChatGPT Good at Search? Investigating Large Language Models as Re-Ranking Agent}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  doi = {10.18653/v1/2023.emnlp-main.923},
}
Figure