fix(retrieval): restore score_propagation_alpha default to 0.5#1804
Closed
r266-tech wants to merge 1 commit intovolcengine:mainfrom
Closed
fix(retrieval): restore score_propagation_alpha default to 0.5#1804r266-tech wants to merge 1 commit intovolcengine:mainfrom
r266-tech wants to merge 1 commit intovolcengine:mainfrom
Conversation
volcengine#1770 refactored the hardcoded `SCORE_PROPAGATION_ALPHA = 0.5` constant in `openviking/retrieve/hierarchical_retriever.py` into a `RetrievalConfig` field but set the new field default to 0.0. With the existing formula final_score = alpha * embedding_score + (1 - alpha) * parent_score a default of 0.0 silently drops every child's own embedding score and keeps only the propagated parent score, changing default ranking behavior for any caller that does not provide an explicit `retrieval` block. The same PR's README, docs/{en,zh}/concepts/07-retrieval.md, docs/{en,zh}/guides/01-configuration.md and examples/ov.conf.example all state the default is `0.5` and explicitly note that `0.5 keeps the existing equal blend`. Restoring the field default to `0.5` aligns the shipped code with the documented and pre-refactor behavior.
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨No code suggestions found for the PR. |
Collaborator
|
To be honest, we don't currently have a sufficiently authoritative dataset to validate this parameter. We'll update it later once we have a conclusion. |
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.
Summary
#1770 refactored the hardcoded
SCORE_PROPAGATION_ALPHA = 0.5constant inopenviking/retrieve/hierarchical_retriever.pyinto a newRetrievalConfigfield, but set the field default to0.0instead of0.5. With the existing formulaa default of
0.0silently drops every child's own embedding score and keeps only the propagated parent score, changing default ranking behavior for any caller that does not configure aretrievalblock.The same PR's docs and example config all state the default is
0.5:README.md—"score_propagation_alpha": 0.5docs/en/guides/01-configuration.md—score_propagation_alpha ... | Default | 0.5 | "0.5 keeps the existing equal blend"docs/zh/guides/01-configuration.md—score_propagation_alpha ... | 默认值 | 0.5 | 0.5 保持当前 50/50 行为docs/en/concepts/07-retrieval.md— table:retrieval.score_propagation_alpha | 0.5 | 50% embedding + 50% parentdocs/zh/concepts/07-retrieval.md— sameexamples/ov.conf.example—"score_propagation_alpha": 0.5Restoring the field default to
0.5aligns the shipped code with the documented and pre-refactor behavior. The field description is also updated to reference the historical constant so future readers see the link.Type of Change
How verified
RetrievalConfigfield default vs. the documentation tables added in feat(config): 配置检索打分和 embedding 输入 #1770; confirmed mismatch._recursive_searchusesalpha = self.score_propagation_alphaandfinal_score = alpha * embedding_score + (1 - alpha) * parent_score, soalpha = 0.0reduces every node's final score to its parent's score.HierarchicalRetrievercarriedSCORE_PROPAGATION_ALPHA = 0.5, so0.5is the historical default we want to restore.Notes
hotness_alphadefault =0.0is intentional (matches docs and the explicit "disable boost by default" wording), so this PR only touchesscore_propagation_alpha.