Skip to content

fix(retrieval): restore score_propagation_alpha default to 0.5#1804

Closed
r266-tech wants to merge 1 commit intovolcengine:mainfrom
r266-tech:fix-retrieval-score-propagation-alpha-default
Closed

fix(retrieval): restore score_propagation_alpha default to 0.5#1804
r266-tech wants to merge 1 commit intovolcengine:mainfrom
r266-tech:fix-retrieval-score-propagation-alpha-default

Conversation

@r266-tech
Copy link
Copy Markdown
Contributor

Summary

#1770 refactored the hardcoded SCORE_PROPAGATION_ALPHA = 0.5 constant in openviking/retrieve/hierarchical_retriever.py into a new RetrievalConfig field, but set the field default to 0.0 instead of 0.5. 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 configure a retrieval block.

The same PR's docs and example config all state the default is 0.5:

  • README.md"score_propagation_alpha": 0.5
  • docs/en/guides/01-configuration.mdscore_propagation_alpha ... | Default | 0.5 | "0.5 keeps the existing equal blend"
  • docs/zh/guides/01-configuration.mdscore_propagation_alpha ... | 默认值 | 0.5 | 0.5 保持当前 50/50 行为
  • docs/en/concepts/07-retrieval.md — table: retrieval.score_propagation_alpha | 0.5 | 50% embedding + 50% parent
  • docs/zh/concepts/07-retrieval.md — same
  • examples/ov.conf.example"score_propagation_alpha": 0.5

Restoring the field default to 0.5 aligns 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

  • Bug fix (non-breaking change that fixes an issue)
  • New feature
  • Breaking change
  • Documentation update
  • Refactoring

How verified

  • Read RetrievalConfig field default vs. the documentation tables added in feat(config): 配置检索打分和 embedding 输入 #1770; confirmed mismatch.
  • Confirmed _recursive_search uses alpha = self.score_propagation_alpha and final_score = alpha * embedding_score + (1 - alpha) * parent_score, so alpha = 0.0 reduces every node's final score to its parent's score.
  • Confirmed pre-refactor HierarchicalRetriever carried SCORE_PROPAGATION_ALPHA = 0.5, so 0.5 is the historical default we want to restore.

Notes

hotness_alpha default = 0.0 is intentional (matches docs and the explicit "disable boost by default" wording), so this PR only touches score_propagation_alpha.

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.
@github-actions
Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🏅 Score: 100
🧪 No relevant tests
🔒 No security concerns identified
✅ No TODO sections
🔀 No multiple PR themes
⚡ No major issues detected

@github-actions
Copy link
Copy Markdown

PR Code Suggestions ✨

No code suggestions found for the PR.

@qin-ctx
Copy link
Copy Markdown
Collaborator

qin-ctx commented Apr 30, 2026

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.

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

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants