xhluca/bm25s
An ultrafast pure-Python implementation of BM25 ranking function for text retrieval, commonly used in RAG pipelines.

Velocity · 7d
+2.2
★ / day
Trend
→steady
star history
BM25S provides an efficient implementation of BM25, a classic probabilistic ranking function for keyword-based text retrieval. The library leverages sparse matrices and Numba JIT compilation to achieve high performance for document ranking tasks. It is frequently used as the retrieval backend in Retrieval-Augmented Generation (RAG) pipelines alongside vector search systems.