fix(retrieval): allow find without rerank and preserve level-2 rerank scores#754
Merged
MaojiaSheng merged 3 commits intovolcengine:mainfrom Mar 19, 2026
Merged
Conversation
MaojiaSheng
approved these changes
Mar 19, 2026
chethanuk
added a commit
to chethanuk/OpenViking
that referenced
this pull request
Mar 19, 2026
- Add .pr_agent.toml with 15 repo-specific review rules derived from real bug history (PRs volcengine#505, volcengine#728, volcengine#749, volcengine#740/volcengine#745, volcengine#754, volcengine#735, volcengine#767) - Rules structured as WHEN/THEN/BECAUSE for deterministic enforcement - Add 8 custom labels (memory-pipeline, async-change, api-breaking, etc.) - Add ignore patterns for lock files, third_party, build artifacts - Enable score review, TODO scan, split-PR detection, security audit - Configure improve tool with quality threshold and extended mode - Configure describe tool with PR diagrams and semantic file types - Update workflow: ark-code-latest model, checkout step for .pr_agent.toml, move all config from inline YAML to .pr_agent.toml (single source of truth)
4 tasks
qin-ctx
pushed a commit
that referenced
this pull request
Mar 19, 2026
…#780) - Add .pr_agent.toml with 15 repo-specific review rules derived from real bug history (PRs #505, #728, #749, #740/#745, #754, #735, #767) - Rules structured as WHEN/THEN/BECAUSE for deterministic enforcement - Add 8 custom labels (memory-pipeline, async-change, api-breaking, etc.) - Add ignore patterns for lock files, third_party, build artifacts - Enable score review, TODO scan, split-PR detection, security audit - Configure improve tool with quality threshold and extended mode - Configure describe tool with PR diagrams and semantic file types - Update workflow: ark-code-latest model, checkout step for .pr_agent.toml, move all config from inline YAML to .pr_agent.toml (single source of truth)
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.
Description
This PR fixes two retrieval issues in the
find()/HierarchicalRetrieverpath:VikingFS.find()incorrectly requiredrerank_config, even though the documentation definesfind()as basicsemantic/vector retrieval and rerank is optional.
HierarchicalRetrieverdid not preserve rerank scores for level-2 global hits used as initial candidates, sodirect file hits from global retrieval could bypass rerank ordering in THINKING mode.
These changes keep
find()usable without rerank configuration and make rerank behavior more consistent for level-2retrieval results.
Type of Change
Changes Made
openviking/storage/viking_fs.pysofind()works whenrerank_configis notconfigured.
openviking/retrieve/hierarchical_retriever.pyto rerank level-2 global hits before they are used as initialcandidates, and avoid sending those same level-2 hits through starting-point rerank logic twice.
tests/misc/test_vikingfs_find_without_rerank.pytests/retrieve/test_hierarchical_retriever_rerank.pyTesting
I added targeted regression tests for the two fixed behaviors.
Relevant local verification previously completed on this branch:
py -3.11 -m pytest tests\\misc\\test_vikingfs_find_without_rerank.py tests\\retrieve\ \test_hierarchical_retriever_rerank.py tests\\client\\test_search.py tests\\server\\test_api_search.py -qpy -3.11 -m pytest tests\\integration\\test_http_integration.py -qpy -3.11 -m ruff check openviking\\storage\\viking_fs.py openviking\\retrieve\\hierarchical_retriever.py tests\ \misc\\test_vikingfs_find_without_rerank.py tests\\retrieve\\test_hierarchical_retriever_rerank.pyPlatform verified:
Checklist
Additional Notes
This PR is intentionally scoped to retrieval fixes only.
Behavioral intent:
find()remains a basic semantic retrieval API and should not require rerank configuration.scores consistently.