Back to directory

bm25

A Rust crate implementing the BM25 relevance-scoring algorithm as an embedder, scorer and in-memory search engine, for use directly or alongside vector databases such as Qdrant, Pinecone or Milvus.

bm25

bm25 is a Rust crate covering BM25 information retrieval at three levels: an embedder that turns text into sparse vectors, a scorer that measures how well a query embedding matches document embeddings, and a lightweight in-memory search engine built on top of both. The sparse embeddings it produces can be used directly or uploaded to a vector database for querying there.

It includes a multilingual tokenizer with stemming, stop-word removal, unicode normalization and language detection, exposes BM25's b, k1 and average-document-length parameters for tuning, and can fit the average document length automatically or work without it. The crate supports parallel batch fitting, compile-time configuration through feature flags, and a companion demo compiles the search engine to WebAssembly for the browser.

More in RAG

See all 540
  • ai·rete·rag

    ai-rete-rag.com

    A platform that pairs a Rete rule engine with retrieval-augmented generation, so deterministic rules decide an outcome and grounded retrieval explains the decision in plain language.

  • Xtriever

    github.com

    A hybrid retrieval engine for retrieval-augmented generation, written in Rust to run on-device on a phone or a laptop, combining lexical BM25 search, dense embedding search, reciprocal-rank fusion and cross-encoder re-ranking with no server.

  • FileFlux

    github.com

    A .NET library that turns PDF, DOCX, HWP and other documents into optimized chunks for RAG systems, through a five-stage pipeline built on high-performance Rust FFI readers.