rerankers
Lightweight, low-dependency unified Python API to run any cross-encoder, ColBERT, or LLM reranker to sharpen RAG retrieval.
rerankers
A small, focused library from Answer.AI that gives you a single, consistent Python interface over every common reranking approach. Swap a SentenceTransformers cross-encoder for a Cohere/Jina API reranker, a T5-based model, ColBERT late-interaction scoring, RankGPT-style LLM reranking, or FlashRank ONNX models by changing one string — the calling code stays identical. This solves the classic RAG second-stage problem: a fast bi-encoder retrieves a broad candidate set, and a reranker re-scores the top-k so the most relevant passages land in the prompt.
Key features
- One
RerankerAPI across cross-encoders, ColBERT, T5, LLM, API, and FlashRank backends - Deliberately minimal dependencies — install only the backend you actually use
- Returns ranked, scored results ready to feed a generator
- Trivial to A/B different rerankers without rewriting retrieval code
- Framework-agnostic; drops into LangChain, LlamaIndex, or bespoke pipelines
Curated mirror of the open-source rerankers (Apache-2.0). Get it from the source.