Skip to content

v0.7.0

Choose a tag to compare

@jaepil jaepil released this 03 Mar 23:47
· 30 commits to main since this release
89d63ff

What's New

  • alpha="auto" in log_odds_conjunction for automatic confidence scaling (sqrt(n) scaling law, Paper 2 Section 4.2)
  • AttentionLogOddsWeights for query-dependent signal weighting (Paper 2 Section 8) with batch fit() and online update()
  • ReLU/Swish gating in log_odds_conjunction (Paper 2 Theorems 6.5.3/6.7.4) for sparse non-negative priors
  • base_rate_method parameter in BayesianBM25Scorer: "percentile" (default), "mixture" (EM), "elbow" (knee detection)
  • MultiFieldScorer for first-class multi-field search with per-field BM25 indexes and log_odds_conjunction fusion
  • RetrievalResult dataclass for explainable retrieval with per-document BM25SignalTrace
  • add_documents() for incremental indexing in both BayesianBM25Scorer and MultiFieldScorer
  • CalibrationReport and calibration_report() one-call diagnostic bundling ECE, Brier score, and reliability diagram
  • 16 zero-shot fusion methods in BEIR hybrid benchmark with calibration diagnostics

BEIR Hybrid Search (NDCG@10 Average)

Method Avg NDCG@10 Delta vs BM25
Bayesian-Balanced 41.50 +6.12
Balanced-Mix 41.50 +6.12
Balanced-Elbow 41.50 +6.13
Convex 41.15 +5.78
RRF 40.48 +5.10
BM25 35.38 --

Full results: https://github.com/cognica-io/bayesian-bm25#beir-hybrid-search

Install

pip install bayesian-bm25==0.7.0