v0.7.0
What's New
alpha="auto"inlog_odds_conjunctionfor automatic confidence scaling (sqrt(n) scaling law, Paper 2 Section 4.2)AttentionLogOddsWeightsfor query-dependent signal weighting (Paper 2 Section 8) with batchfit()and onlineupdate()- ReLU/Swish gating in
log_odds_conjunction(Paper 2 Theorems 6.5.3/6.7.4) for sparse non-negative priors base_rate_methodparameter inBayesianBM25Scorer:"percentile"(default),"mixture"(EM),"elbow"(knee detection)MultiFieldScorerfor first-class multi-field search with per-field BM25 indexes andlog_odds_conjunctionfusionRetrievalResultdataclass for explainable retrieval with per-documentBM25SignalTraceadd_documents()for incremental indexing in bothBayesianBM25ScorerandMultiFieldScorerCalibrationReportandcalibration_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