Skip to content

add: Choosing fusion method notebook #104

Open
Dylancouzon wants to merge 1 commit into
masterfrom
fusion-methods-tutorial
Open

add: Choosing fusion method notebook #104
Dylancouzon wants to merge 1 commit into
masterfrom
fusion-methods-tutorial

Conversation

@Dylancouzon
Copy link
Copy Markdown
Contributor

@Dylancouzon Dylancouzon commented May 16, 2026

Collab link: https://colab.research.google.com/github/qdrant/examples/blob/fusion-methods-tutorial/fusion-methods/Choosing_a_Fusion_Method.ipynb

Summary

Adds fusion-methods/Choosing_a_Fusion_Method.ipynb, the runnable companion to the hybrid-queries
docs
in qdrant/landing_page. The notebook walks through choosing between Qdrant's fusion methods
(RRF, weighted RRF, DBSF, FormulaQuery) with real metrics on a real corpus.

Running the notebook

The notebook is designed for Google Colab. It reads QDRANT_URL and QDRANT_API_KEY from Colab secrets via from google.colab import userdata. To run it
locally instead, swap the credentials block in the imports cell for os.environ or getpass.

Decisions worth noting

  • BEIR/SciFact as the eval corpus over larger BEIR datasets (NFCorpus, FiQA): fits a Free Tier cluster and finishes in a reasonable runtime, with enough relevance labels (300 queries, ~339 query-doc pairs) for the metrics to be meaningful.
  • Grid search for weighted-RRF weights, not random search or Bayesian optimization. For a 2D weight space with a smooth metric surface, all three land within rounding error; grid is the simplest to explain and reproduce.
  • No train/val split in the notebook itself for simplicity. The docs page and the notebook's "Best practice" callout direct readers to apply a held-out split for production tuning.
  • 0.1 coefficient on the decay term in the FormulaQuery demo. RRF scores in the top-5 are roughly 0.2-0.5 while un-weighted decay returns [0, 1].
    Without the coefficient, recency crowds out relevance and the demo silently replaces the fused candidates instead of nudging the ranking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant