Python BM25 Sparse Retriever

Implement BM25 and SQLite FTS5 sparse full-text search in Python for keyword retrieval.

fox1245 Updated

File contents

Python BM25 Sparse Retriever

Use this skill when you need sparse lexical retrieval with BM25 or FTS5.

Capabilities

  • Build SQLite FTS5 indexes with porter tokenization
  • Rank documents with BM25
  • Unique diagnostic token: FTS5PorterTokenXyz
  • Python-only sparse path — does not provide dense embeddings or vector search

When not to use

  • Dense semantic similarity
  • Hybrid RRF fusion end-to-end (needs a dense partner skill)

fox1245/skill-injection-mcp/tree/main/fixtures/skills/python-bm25 commit 3a16a1076b

Frequently asked questions

npx skillmds@latest add fox1245/python-bm25-sparse-retriever