SuperAPIAI Directory

rankify

github.com · AI developer platforms

A Comprehensive Python Toolkit for Retrieval, Re-Ranking, and Retrieval-Augmented Generation.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsLinux · API

About this tool

Rankify is a modular and efficient Python toolkit for retrieval, reranking, and retrieval-augmented generation (RAG), built on current state-of-the-art models and suitable for retrieval, ranking, and RAG tasks.

Purpose: To integrate retrieval, reranking, and retrieval-augmented generation into a single framework, helping researchers and developers conduct experiments, comparisons, and benchmarking.

Main capabilities:

  • Supports a variety of retrieval methods, including BM25, DPR, ANCE, BPR, ColBERT, BGE, Contriever, SFR, E5, GritLM, M2, Nomic, Instructor, RaDeR, ReasonIR, BGE-Reasoner, and ReasonEmbed, among others.
  • Reranking: Implements 28 advanced models, including 44 sub-methods, covering Cross-Encoders, Vicuna, Zephyr, Sentence Transformer, FlashRank, API reranking, ColBERT, LLM Layerwise Ranker, Splade, Inranker, Transformer, FIRST, Blender, LLM2VEC, ECHO, Incontext, PRP, and others.
  • RAG support: Can work with backends such as Hugging Face, OpenAI, vLLM, and LiteLLM, using models such as GPT, LLAMA, T5, and Fusion-in-Decoder (FiD), and supports methods such as Chain-of-Thought RAG, FiD with T5, and In-Context Learning RALM.
  • Built-in evaluation: Provides evaluation metrics for retrieval, reranking, and RAG, and supports BM25 baseline runs for BEIR and TREC DL19/DL20 with TREC-style metrics (nDCG, MAP, MRR), as well as RAGAS-based RAG quality evaluation.
  • Datasets and indexes: Provides more than 40 benchmark datasets with pre-retrieved documents, as well as prebuilt indexes for Wikipedia and MS MARCO.

Usage:

  • Installation requires Python 3.10 or above, PyTorch 2.5.1 is recommended, and it can be installed via pip with full dependencies or by component (retriever, reranking, rag, all), or the latest development version can be installed from GitHub. Using the ColBERT retriever requires additional setup steps.
  • Provides a one-line Pipeline API: pipeline("search") retrieves documents only, pipeline("rerank") performs retrieval plus reranking, and pipeline("rag") performs full RAG (retrieval, reranking, generation).
  • Provides RankifyAgent to help select appropriate models, and Rankify Server can be deployed as a REST API with one click, including the /retrieve, /rerank, /rag, and /health endpoints.
  • Supports integration with LangChain, LlamaIndex, and others, and provides a Gradio interactive Web Playground.
  • In traditional workflows, indexes can be built for custom datasets via the CLI (rankify-index), supporting retrievers such as bm25, dpr, ance, contriever, colbert, and bge, along with their corresponding parameters.
  • Code examples are provided for retrieval, reranking, generation, and evaluation, supporting local inference and API inference (an api-key must be provided).

Applicable scenarios: retrieval and ranking research, RAG system development and experimentation, benchmarking (BEIR, TREC DL19/DL20, BRIGHT, etc.), and validation of retrieval and generation pipelines on custom datasets.

Limitations: Rankify is still in the development stage, and the current version is the first release, v0.1.0; the official description states that more retrievers, rankers, datasets, and features are continuously being added. The official website does not provide other limitation statements. Documentation, examples, and tutorials are available in its online documentation and notes. The project uses the Apache-2.0 license.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools