You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add deterministic offline regression coverage for weighted reciprocal rank fusion. Existing reranking tests exercise unweighted RRF, while conversion fixtures cover serialization of weights but not their effect on scores or their forwarding through a local query.
This is a tests-only contribution; it does not change runtime behavior or claim to fix a newly discovered bug.
Check weighted scores and accumulation for overlapping IDs with default/explicit/custom k and result limits.
Cover zero weight, an empty source without shifting weight alignment, and too few/too many weights.
Exercise the public local query_points API with dense and sparse prefetches. Reversing the source weights reverses their relative ranking; assert exact IDs, approximate scores and payloads.
Expected values follow Qdrant's weighted RRF formula, not the implementation under test. All vectors and ranks are fixed; no model calls or server are needed.
Sensitivity checks (temporary mutations, fully reverted): forcing every source weight to 1 caused 10 new cases to fail; dropping weights at the local query forwarding call caused both new public-API cases to fail.
Ruff check, format check (line length 99), applicable pre-commit hooks, and git diff --check passed. Hooks used the repository revisions with a local Python 3.11 interpreter override; the upstream configuration is unchanged.
Live REST/gRPC, the full repository suite and other Python versions were not run. No temporary mutations or private artifacts are included.
Submission checks
Targets dev.
Repository contribution guidance and PR template checked.
Searched all-state PRs for weighted RRF, weights in titles, and fusion tests; no matching coverage contribution found.
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: ccdc20a1-7678-42be-93b2-080bf91f7547
📥 Commits
Reviewing files that changed from the base of the PR and between 9f45d24 and ed2b248.
📒 Files selected for processing: 2
qdrant_client/hybrid/test_reranking.py
tests/test_in_memory.py
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.
📝 Walkthrough
The change adds tests for weighted reciprocal-rank fusion. The tests check scores and ordering across ranking-constant settings, result limits, zero weights, empty sources, and mismatched weight counts. In-memory tests also check weighted fusion of dense and sparse query results, including returned IDs, scores, and payloads.
The added weighted-fusion tests are consistent with the implementation; no merge-blocking issue was identified.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 9 functions across 2 files.
Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed checks: 4 passed
Check name
Status
Explanation
Description check
The description clearly explains the tests for weighted RRF scoring and dense-sparse query forwarding. It includes scope, expected behavior, validation results, and test limitations.
Title check
The title concisely and accurately summarizes the main changes: weighted RRF scoring coverage and dense-sparse query forwarding tests.
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add deterministic offline regression coverage for weighted reciprocal rank fusion. Existing reranking tests exercise unweighted RRF, while conversion fixtures cover serialization of weights but not their effect on scores or their forwarding through a local query.
This is a tests-only contribution; it does not change runtime behavior or claim to fix a newly discovered bug.
Expected values follow Qdrant's weighted RRF formula, not the implementation under test. All vectors and ranks are fixed; no model calls or server are needed.
Validation
Python 3.11 on Windows, based on dev at 9f45d24:
Live REST/gRPC, the full repository suite and other Python versions were not run. No temporary mutations or private artifacts are included.
Submission checks