Pyserini: An Easy-to-Use Python Toolkit to Support Replicable IR Research with Sparse and Dense Representations

Jimmy Lin, Xueguang Ma, Sheng-Chieh Lin, Jheng-Hong Yang, Ronak Pradeep +1 more
2/19/2021
cs.IR

Official code: castorini/pyserini (2,226 stars, Python, Apache-2.0, last commit 2026-11-19).

Abstract

Pyserini is an easy-to-use Python toolkit that supports replicable IR research by providing effective first-stage retrieval in a multi-stage ranking architecture. Our toolkit is self-contained as a standard Python package and comes with queries, relevance judgments, pre-built indexes, and evaluation scripts for many commonly used IR test collections.

Show full abstract

We aim to support, out of the box, the entire research lifecycle of efforts aimed at improving ranking with modern neural approaches. In particular, Pyserini supports sparse retrieval (e.g., BM25 scoring using bag-of-words representations), dense retrieval (e.g., nearest-neighbor search on transformer-encoded representations), as well as hybrid retrieval that integrates both approaches. This paper provides an overview of toolkit features and presents empirical results that illustrate its effectiveness on two popular ranking tasks. We also describe how our group has built a culture of replicability through shared norms and tools that enable rigorous automated testing.

View on arXivView PDF

Code Implementations(1)

castorini/pyseriniOfficial100%
Apache-2.0

Pyserini is a Python toolkit for reproducible information retrieval research with sparse and dense representations.

2,226682Python, ShellNov 1, 20191 weeks agoApache-2.0
information-retrieval

Similar Papers

Cite this paper

@article{lin2021pyserini,
  title  = {Pyserini: An Easy-to-Use Python Toolkit to Support Replicable IR Research with Sparse and Dense Representations},
  author = {Jimmy Lin and Xueguang Ma and Sheng-Chieh Lin and Jheng-Hong Yang and Ronak Pradeep and Rodrigo Nogueira},
  year   = {2021},
  eprint = {2102.10073},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2102.10073}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2102.10073.svg)](https://codeofpaper.com/paper/2102.10073)

Discussion