For a reranking library for RAG retrieval, the first results are huggingface/text-embeddings-inference (Text Embeddings Inference is a high-performance server that directly provides a cross-encoder reranking API for scoring query-document relevance, along with efficient batch processing and GPU acceleration, making it a strong fit for adding a reranking step to a RAG pipeline), huggingface/sentence-transformers and ukplab/sentence-transformers (Sentence-Transformers is a widely used library that provides cross-encoder reranking models alongside its embedding capabilities, making it a direct fit for implementing the reranking step in a RAG pipeline with easy API integration and batch processing). flagopen/flagembedding and answerdotai/rerankers round out the shortlist. Compare the match explanations and check the project documentation against your requirements.
Open-source frameworks and algorithms designed to improve search relevance by reordering retrieved document chunks for LLMs.
Text Embeddings Inference is a high-performance inference server designed to host text embedding and sequence classification models as scalable API endpoints. It provides a vector embedding API to convert text into dense representations and a cross-encoder reranking server for scoring the relevance of document sequences against a query. The project features a GPU-accelerated inference engine that utilizes dynamic batching and specialized kernels to maximize throughput. It offers a high-performance binary interface via gRPC as an alternative to standard HTTP to reduce network latency and seria
Text Embeddings Inference is a high-performance server that directly provides a cross-encoder reranking API for scoring query-document relevance, along with efficient batch processing and GPU acceleration, making it a strong fit for adding a reranking step to a RAG pipeline.
This project is a transformer-based framework for generating dense and sparse vector embeddings of text and multimodal data. It serves as a library for fine-tuning models to perform semantic similarity tasks, retrieval, and reranking. The system is distinguished by its support for diverse architectural patterns, including bi-encoders for fast similarity search and cross-encoders for high-precision reranking. It provides dedicated pipelines for multimodal embeddings, mapping text and images into a shared vector space, and implements knowledge distillation to compress large models into smaller,
Sentence-Transformers is a transformer-based library that directly provides cross-encoder reranking for high-precision scoring, alongside dense and sparse embedding pipelines—making it the go‑to tool for improving answer quality in any RAG pipeline with easy integration and efficient batch processing.
This project is a framework for training and deploying transformer-based models that map text, images, audio, and video into dense or sparse vector representations. It functions as a multimodal embedding library and semantic search engine used to retrieve relevant documents by calculating vector similarity between meanings. The framework provides specialized tools for both cross-encoder reranking, which calculates precise similarity scores to refine search results, and vector quantization to compress embedding vectors for reduced memory usage and increased retrieval speed. The project covers
Sentence-Transformers is a widely used library that provides cross-encoder reranking models alongside its embedding capabilities, making it a direct fit for implementing the reranking step in a RAG pipeline with easy API integration and batch processing.
FlagEmbedding is a comprehensive toolkit designed for training, benchmarking, and deploying embedding models, retrieval systems, and augmented generation pipelines. It provides the necessary infrastructure to transform text into high-dimensional vector representations and organize them into searchable structures for semantic search applications. The framework distinguishes itself through specialized capabilities for fine-tuning pre-trained embedding and reranking models on domain-specific datasets. By allowing users to adapt models to unique vocabularies and specialized retrieval tasks, it en
FlagEmbedding is a comprehensive open-source toolkit for training and deploying embedding and reranking models in RAG pipelines, directly addressing the need for a reranking step with support for cross-encoder models and seamless integration into retrieval-augmented generation workflows.
A lightweight, low-dependency, unified API to use all common reranking and cross-encoder models.
Answerdotai/rerankers provides a unified API for using various cross-encoder reranking models, making it a lightweight and easy-to-integrate library for implementing a reranking step in a RAG pipeline.
pgai is a PostgreSQL AI toolkit and framework designed to integrate large language models and vector embeddings directly into a database. It serves as a bridge for executing machine learning model requests and performing text-to-SQL translations within standard database queries. The project provides an automated vector embedding pipeline that handles the loading, parsing, and chunking of text from tables and unstructured documents. This system utilizes a background worker to synchronize embeddings automatically as source data changes and includes specialized tools for building retrieval-augme
pgai is a PostgreSQL toolkit that includes result reranking as part of its RAG pipeline, making it usable for reranking in RAG, though its primary focus is broader embedding and database AI integration rather than being a dedicated reranker.
LlamaIndex is a comprehensive development framework designed to connect private or external data sources to large language models. It functions as a data-centric toolkit that enables the construction of retrieval-augmented generation systems, allowing developers to build applications that provide context-aware answers based on specific organizational information. The project distinguishes itself through a robust agentic orchestration engine that supports the creation of autonomous agents capable of multi-step reasoning, memory management, and complex tool execution. Beyond simple retrieval, i
LlamaIndex is a complete RAG framework that includes built-in reranking support, making it a strong fit for improving retrieved-document quality, though it is broader than a dedicated reranking library.
Haystack is an orchestration framework designed for building complex search and generative AI pipelines. It functions as an agentic workflow engine, enabling the construction of automated sequences that allow AI agents to perform multi-step reasoning and data analysis. The framework utilizes a modular, component-based architecture that connects processing steps into directed acyclic graphs. By employing a provider-agnostic integration layer, it decouples core logic from specific external AI services and vector databases, allowing for the flexible exchange of underlying technologies. This desi
Haystack is a full RAG orchestration framework that natively supports reranking as a pipeline step through components like cross-encoder rankers, making it a practical tool for implementing reranking in RAG systems.
text2vec is a text vectorization toolkit and semantic similarity framework used to convert words and sentences into numerical vectors. It provides integrated toolsets for generating embeddings, calculating semantic closeness, and implementing lexical and semantic search. The project includes a model fine-tuning pipeline for optimizing embedding and matching models using supervised or unsupervised datasets. It further distinguishes itself by providing a text embedding API that allows vectorization models to be deployed as network services via gRPC or HTTP protocols. The framework covers a bro
Text2vec is a text embedding and semantic similarity toolkit that includes cross-encoders for scoring, but it is not a dedicated reranking library for RAG—its primary focus is vectorization, not reranking pipeline integration.
This project is a comprehensive retrieval-augmented generation platform designed for building, managing, and deploying knowledge-based AI applications. It provides a unified environment for organizing datasets, configuring conversational chat assistants, and developing autonomous agents that execute multi-step reasoning workflows. By integrating document intelligence with advanced retrieval pipelines, the platform enables the creation of grounded, verifiable responses supported by traceable citations. The platform distinguishes itself through deep document understanding and sophisticated know
RagFlow is a comprehensive RAG platform that integrates retrieval and generation, but it is a full end-to-end system rather than a dedicated reranking component, so it is not the exact tool this search targets.
vllm-project/semantic-router is built as an AI gateway and LLM router for directing queries to appropriate models, not as a dedicated reranking tool for refining retrieved documents in a RAG pipeline; while it includes cross-encoder reranking features, they serve routing decisions rather than standalone post-retrieval scoring.
WeKnora is a multi-tenant retrieval-augmented generation (RAG) knowledge platform and autonomous AI agent framework. It transforms raw documents into queryable knowledge bases and integrates large language models with vector databases to provide grounded AI responses. The system also functions as a Model Context Protocol (MCP) tool server, exposing knowledge search and agentic capabilities to external AI clients. The platform distinguishes itself through an autonomous agent framework that utilizes iterative reasoning, tool calling, and web search to solve multi-step tasks. It implements a sta
WeKnora is a multi-tenant RAG platform and agent framework that includes reranking among its capabilities, but it is not a dedicated reranking tool or library—it is a broader system that goes beyond the specific reranking component you are searching for.
| Repository | Stars | Language | License | Last push |
|---|---|---|---|---|
| huggingface/text-embeddings-inference | 4.9K | Rust | Apache-2.0 | |
| huggingface/sentence-transformers | 19.3K | Python | Apache-2.0 | |
| ukplab/sentence-transformers |
| 18.8K |
| Python |
| Apache-2.0 |
| flagopen/flagembedding | 12.3K | Python | MIT |
| answerdotai/rerankers | 1.6K | Python | Apache-2.0 |
| timescale/pgai | 5.8K | PLpgSQL | PostgreSQL |
| run-llama/llama_index | 52.8K | Python | MIT |
| deepset-ai/haystack | 24.3K | MDX | apache-2.0 |
| shibing624/text2vec | 5K | Python | Apache-2.0 |
| infiniflow/ragflow | 93.7K | Go | Apache-2.0 |