Repository navigation
fix(embedding): honour query_param as a query instruction for Volcengine dense embedders - #6088
Open
OnePerson2020 wants to merge 1 commit into
Open
OnePerson2020 wants to merge 1 commit into
OnePerson2020 wants to merge 1 commit into
Conversation
…ine dense embedders Fixes volcengine#6087
OnePerson2020
pushed a commit
to OnePerson2020/OpenViking
that referenced
this pull request
Oct 15, 2026
This branch has not been deployed
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
embedding.dense.query_paramhad no effect forprovider: volcengine: the factory never passed it toVolcengineDenseEmbedder, and the config lowercased it for every provider. Volcengine's multimodal/vision embedding models take the query side as an instruction text prefixed to the query, where case matters. The dense embedder now prefixesquery_paramto text queries (is_query=True); documents and image queries are embedded unchanged, so turning it on needs no reindex. Lowercasing is kept for the other providers, whose values are parameter names likequery.On our memory store (Volcengine vision embedding, 90 vague queries over a 300-document pool) the instruction raised MRR from 0.831 to 0.906.
Human Involvement
Related Issue
Fixes #6087
Type of Change
Changes Made
VolcengineDenseEmbedder:query_paramargument;_query_input()prefixes it tostrqueries inembed/embed_async.EmbeddingConfig: passquery_paramin the("volcengine", "dense")factory entry;sync_provider_backendno longer lowercasesquery_param/document_paramfor Volcengine; field description mentions the Volcengine meaning.test_dense_embedder_prefixes_text_queries_only,test_embedding_config_passes_volcengine_query_param_unchanged.Testing
test_dense_embedder_passes_local_provider_duration_to_metrics,test_openai_factory_max_tokens_also_forwardedalso fail on main in my environment); no new failures.volcengine_embedders.pyalready has an import-order (I001) and formatting difference on main, which I left untouched to keep the diff minimal.git diff --checkclean.Checklist
Additional Notes
No API or data-format change; no new dependency.
🤖 Generated with Claude Code