Skip to content

fix(retrieval): keep VikingFS.find on quick mode - #4472

Open
ranxi2001 wants to merge 1 commit into
volcengine:mainfrom
ranxi2001:fix/vikingfs-find-quick-mode
Open

fix(retrieval): keep VikingFS.find on quick mode#4472
ranxi2001 wants to merge 1 commit into
volcengine:mainfrom
ranxi2001:fix/vikingfs-find-quick-mode

Conversation

@ranxi2001

@ranxi2001 ranxi2001 commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Description

VikingFS.find() did not pass a retrieval mode to HierarchicalRetriever. When a
reranker is configured, the retriever therefore selected its recursive THINKING path,
even though find is the fast semantic-retrieval API.

This change makes find explicitly request QUICK mode. VikingFS.search() keeps its
existing mode selection, and the public API is unchanged.

Human Involvement

  • A human participated in the implementation or review loop
  • This PR was generated entirely by AI agents without human participation in the loop

Related Issue

Fixes #4463

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Test update

Changes Made

  • pass RetrieverMode.QUICK from VikingFS.find() to the hierarchical retriever;
  • assert QUICK mode for text and image find calls; and
  • cover the reranker-configured path that previously defaulted to THINKING mode.

Testing

  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have tested this on the following platforms:
    • Linux
    • macOS
    • Windows

Local checks:

  • 22 relevant find, hierarchical-retriever, and image search-service tests passed;
  • Ruff lint and format checks passed on both changed files;
  • Python compile checks and git diff --check passed.

The full server search suite was not runnable because this environment has no
~/.openviking/ov.conf. Editable installation is also unavailable because Cargo and
the generated native openviking/bin/ov artifact are absent. The tests were therefore
run from source using an existing project test environment.

Checklist

  • My code follows the project's coding style
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

Screenshots (if applicable)

Not applicable; this change has no visual output.

Additional Notes

The regression first failed with assert None == 'quick'. A direct probe of the
unmodified retriever with an available reranker also entered two rerank rounds and four
child searches, confirming that the omitted mode selected the recursive path.

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

Labels

None yet

Projects

Status: Backlog

1 participant