1.6k stars · Apache-2.0 · 0.10.0 on PyPI (2025-05-22); GitHub release v0.6.0 (2024-11-12) · Track this in Scout
A lightweight unified API over cross-encoder and reranking models — would sharpen which chunks surface in Grasppy's drill-in.
▶Repo detailsthe review · specs · pros & cons · install
What it is
rerankers is a small Python library from Answer.AI. It wraps cross-encoders, late-interaction models, API-based rerankers and LLM-based rerankers behind a single Reranker class with the same rank() method for all of them.
What it is good for. Anyone building search over their own documents and finding that the first results are nearly right. Reranking is usually the cheapest large improvement available: the first search stays as it is, and a second pass reorders what it found. This library's value is that testing six rerankers costs six string changes rather than six integrations.
- Very few dependencies by default. You install only the backends you actually use.
- Genuinely broad coverage: cross-encoders, ColBERT-style models, FlashRank, hosted APIs and LLM rerankers, all through one call.
- Apache-2.0, so it can sit inside a commercial product without conditions.
- The newest GitHub release is 0.6.0, dated 12 November 2024. Code landed on 20 December 2025, so the project is alive, but it has been a long time since a tagged version. Pin what you install and test before upgrading.
- A reranker is slower than the search in front of it. Reordering fifty results with a cross-encoder costs real time on a CPU, and the good models want a GPU (a graphics card used for fast maths).
- It is a library with nothing to open and no screen. It only makes sense inside something you are already building.
- UKPLab/sentence-transformers
The library most of the cross-encoder models are published for; more powerful and much lower level, with no single interface across model families.
Track this in Scout - FlagOpen/FlagEmbedding
The home of the BGE embedding and reranking models themselves, rather than a wrapper around many families.
Track this in Scout - castorini/pyserini
A research toolkit that covers the whole retrieval pipeline, including the first search, and is aimed at reproducible experiments.
Track this in Scout
python3 -m venv venv source venv/bin/activate pip install "rerankers[transformers]"