GH Repository · xhluca
bm25s
Fast BM25 search in Python, powered by Numpy and Numba
- stars
- 1,789
- 30-day movement
- +10/day
- Related entries
- 60
- Connections
- 1
Pythonragsearchrobertsonokapi-bm25retrievalpythonlexical-searchbm25-plusinformation-retrievalbm25-lbm25
bm25s is a Python library that implements BM25 lexical search using NumPy and Numba for speed. It supports several BM25 variants, including Okapi BM25, BM25-L, and BM25-Plus.
You need fast, pure-Python BM25 retrieval without external search infrastructure, such as for lexical retrieval in a RAG pipeline.
Use it to
- Add lexical retrieval to a RAG pipeline
- Run BM25 ranking over a document corpus in Python
- Compare Okapi BM25, BM25-L, and BM25-Plus scoring
- Accelerate retrieval workloads with NumPy and Numba
For Python developers building search or retrieval systems
- Role
- rag
- Language
- Python
- Licence
- MIT
- Forks
- 104
- Open issues
- 1
- Last push
- 2026-09-10
- Latest release
- 0.0.1rc1 · 2024-04-10
topicsbm25lexical-searchretrievalraginformation-retrievalsearch