feat(search) Add lightweight query planner config for intent analysis#2224
Open
heaoxiang-ai wants to merge 7 commits into
Open
feat(search) Add lightweight query planner config for intent analysis#2224heaoxiang-ai wants to merge 7 commits into
heaoxiang-ai wants to merge 7 commits into
Conversation
PR Reviewer Guide 🔍(Review updated until commit 1655053)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
|
Persistent review updated to latest commit 1655053 |
PR Code Suggestions ✨No code suggestions found for the PR. |
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
Adds an optional dedicated query planner model configuration for OpenViking retrieval intent analysis. When configured, search intent analysis uses this lightweight planner instead of the general VLM; when omitted or empty, OpenViking preserves the existing behavior and falls back to
vlm.The PR keeps the default example config unchanged to avoid implying that every deployment should run a local intent-analysis model. The opt-in planner setup is documented in the configuration guide instead.
Related Issue
N/A
Type of Change
Changes Made
query_plannerconfig support using the existingVLMConfigshape.OpenVikingConfig.get_query_planner()to centralize fallback tovlmwhenquery_planneris unset or empty.IntentAnalyzerto call the configured query planner for retrieval intent analysis and query planning.query_plannerin English and Chinese configuration guides as an optional opt-in setting.tests/retrieve/test_intent_analyzer_query_planner.pyfor config parsing and planner-vs-VLM routing behavior.scripts/test_ov_intent_planner.pyas a local smoke test for validating query planner wiring against representative intent-analysis scenarios.Testing
python -m pytest tests/retrieve/test_intent_analyzer_query_planner.pypassed: 4 passed, 4 warnings.Checklist
Screenshots
N/A
Additional Notes
The new config is backward-compatible: existing deployments without
query_plannercontinue usingvlmfor intent analysis.