Skip to main content
QUICK REVIEW

[Paper Review] PyTerrier-GenRank: The PyTerrier Plugin for Reranking with Large Language Models

Kaustubh Dhole|arXiv (Cornell University)|Dec 6, 2024
Natural Language Processing TechniquesComputer Science3 citations
TL;DR

PyTerrier-GenRank is a PyTerrier plugin that enables seamless experimentation with large language models (LLMs) for neural reranking, supporting pointwise, pairwise, and listwise prompting strategies. It integrates with Hugging Face and OpenAI endpoints, demonstrating state-of-the-art performance with models like Rank-Zephyr and GPT-4o-mini, achieving an nDCG@10 of 0.711 on TREC-DL 2019.

ABSTRACT

Using LLMs as rerankers requires experimenting with various hyperparameters, such as prompt formats, model choice, and reformulation strategies. We introduce PyTerrier-GenRank, a PyTerrier plugin to facilitate seamless reranking experiments with LLMs, supporting popular ranking strategies like pointwise and listwise prompting. We validate our plugin through HuggingFace and OpenAI hosted endpoints.

Motivation & Objective

  • To streamline the experimental workflow for LLM-based reranking in information retrieval.
  • To support diverse prompting strategies—pointwise, pairwise, and listwise—within a unified framework.
  • To enable rapid evaluation of multiple LLMs, hyperparameters, and retrieval pipelines using a modular, extensible plugin.
  • To ensure reproducibility and ease of integration for researchers using the PyTerrier IR toolkit.
  • To validate performance across zero-shot and fine-tuned LLMs on standard benchmarks like TREC-DL 2019.

Proposed method

  • The plugin provides PyTerrier wrappers over core reranking functions from the RankLLM and Pyserini repositories.
  • It supports both Hugging Face-hosted models and OpenAI API endpoints through a unified interface.
  • The framework allows dynamic hyperparameter tuning via function calls, including prompt formats and model configurations.
  • It enables integration into existing PyTerrier pipelines using standard chaining operators like % and >>.
  • The plugin supports listwise reranking by prompting LLMs with a list of documents and generating a ranked output of document IDs.
  • It includes utilities for loading indexes, retrieving top-k documents, and applying LLM-based reranking in a single pipeline.

Experimental results

Research questions

  • RQ1How can researchers efficiently experiment with different LLM prompting strategies (pointwise, pairwise, listwise) for document reranking?
  • RQ2What is the relative performance of zero-shot and fine-tuned LLMs as rerankers across standard IR benchmarks?
  • RQ3How does the PyTerrier-GenRank plugin improve reproducibility and modularity in LLM-based reranking experiments?
  • RQ4Which LLM architectures and configurations yield the highest retrieval effectiveness in a reranking setting?
  • RQ5Can the plugin effectively support both Hugging Face and OpenAI-hosted models within a single, consistent interface?

Key findings

  • The plugin successfully enables end-to-end reranking experiments using both Hugging Face and OpenAI models with minimal code changes.
  • Among zero-shot 8B models, Llama-Spark (8B) achieved the highest nDCG@10 score of 0.612 on TREC-DL 2019.
  • GPT-4o-mini achieved the highest nDCG@10 of 0.710 among zero-shot models, outperforming GPT-4-turbo and GPT-3.5-turbo.
  • Fine-tuned models like Rank-Zephyr achieved the best performance with an nDCG@10 of 0.711 on TREC-DL 2019.
  • The plugin demonstrated consistent performance across multiple model types and hosted endpoints, validating its interoperability and ease of use.
  • The framework successfully reproduced previously published results for RankVicuna and RankGPT, confirming its reliability and correctness.

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.