Repository navigation
Gate hybrid alpha_param on Weaviate 1.36.7 - #2245
Closed
abhisheksharma001 wants to merge 1 commit into
Closed
abhisheksharma001 wants to merge 1 commit into
abhisheksharma001 wants to merge 1 commit into
Conversation
The switch to alpha_param/use_alpha_param was gated on 1.36.6 with a TODO to move it to 1.36.7. The released 1.36.6 does not read use_alpha_param, so on that version a hybrid query without alpha ran at alpha 0 (pure BM25), and aggregate hybrid ignored alpha entirely. Servers before 1.36.7 now get the legacy alpha field again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Orca Security Scan Summary
| Status | Check | Issues by priority | |
|---|---|---|---|
| Infrastructure as Code | View in Orca | ||
| SAST | View in Orca | ||
| Secrets | View in Orca | ||
| Vulnerabilities | View in Orca |
Collaborator
|
1.36.7 is quite old so I dont think we need to care about this anymore |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
_parse_hybridswitches to thealpha_param/use_alpha_paramfields from server 1.36.6, with a# TODO: change to 1.36.7 once it's released(added in 8520a1c, when CI ran against the dev build1.36.6-1abf310). The released 1.36.6 does not readuse_alpha_param; that arrived in 1.36.7 (released 2026-03-25). This PR moves the gate to 1.36.7 and drops the TODO.Effect on a 1.36.6 server today
From
adapters/handlers/grpc/v1/in weaviate/weaviate atv1.36.6:parse_search_request.go): alpha ishs.Alpha, replaced byalpha_paramonly when that is set. A hybrid query with noalphasets neither, so it runs at alpha 0 (pure BM25) instead of the default.parse_aggregate_request.go): readshs.Alphaonly, soaggregate.hybrid(..., alpha=...)runs at alpha 0 whatever alpha is passed.After this change the client sends the legacy
alphafield to servers below 1.36.7, defaulting to 0.7 as it did before. Behaviour on 1.36.7 and later is unchanged.Tests
test/collection/test_hybrid_alpha.pyadds unit tests (no server needed) for query and aggregate hybrid at 1.36.5 / 1.36.6 (legacyalpha) and 1.36.7 / 1.37.0 (alpha_param). Without the change, the two 1.36.6 cases fail and the other six pass. With it,pytest test/collectiongives 416 passed, 1 skipped. The CI matrix runs 1.36.24 for 1.36, so the integration tests don't reach this path.ruff check,ruff format --checkandflake8pass on the changed files. I did not run pyright locally.🤖 Generated with Claude Code