Repository navigation
Conversation
chengjoey
force-pushed
the
feat/multi-embedding
branch
2 times, most recently
from
September 30, 2026 09:45
e190989 to
5f24b28
Compare
Implements multimodal image-vector retrieval (issue Tencent#2875): - Add a `MultimodalEmbedder` interface and a `multimodalEmbedder` decorator (chat / sglang envelopes, one embedding request per image). Text calls still go through the catalog protocol, so only the multimodal call shape changes. - New chunk type `image_vector` plus an `indexing_strategy.image_vector_enabled` switch. It is decoupled from VLM: images embedded inside docs (PDF/Word/Markdown) are indexed without turning on image processing. - Indexing and query sides share a single `usesMultimodalEnvelope` predicate. A text query is encoded through the same envelope and recalled via ANN in the same collection; `image_vector` chunks are exempted from reranking (their content is only a markdown image link). - Flipping the switch on an existing KB enqueues `kb:reindex_vectors` to backfill image vectors. ## Bug fix `writeImageVectorChunk` omitted `IsEnabled` when constructing `IndexInfo`, so the image vectors were persisted with `is_enabled = false` and silently filtered out by every retrieval engine — written but never recallable. Fixed and covered by a regression assertion (with mutation verification). Signed-off-by: joeyczheng <joeyczheng@tencent.com>
chengjoey
force-pushed
the
feat/multi-embedding
branch
from
September 30, 2026 10:00
5f24b28 to
14124f3
Compare
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.
Implements multimodal image-vector retrieval
MultimodalEmbedderinterface and amultimodalEmbedderdecorator (chat / sglang envelopes, one embedding request per image). Text calls still go through the catalog protocol, so only the multimodal call shape changes.image_vectorplus anindexing_strategy.image_vector_enabledswitch. It is decoupled from VLM: images embedded inside docs (PDF/Word/Markdown) are indexed without turning on image processing.usesMultimodalEnvelopepredicate. A text query is encoded through the same envelope and recalled via ANN in the same collection;image_vectorchunks are exempted from reranking (their content is only a markdown image link).kb:reindex_vectorsto backfill image vectors.Bug fix
writeImageVectorChunkomittedIsEnabledwhen constructingIndexInfo, so the image vectors were persisted withis_enabled = falseand silently filtered out by every retrieval engine — written but never recallable. Fixed and covered by a regression assertion (with mutation verification).Verification
hybrid-searchwithquery_text="图片里有什么"successfully recalled all 4 images cross-modally.Description
Type of Change
Related Issue
feat: #2875
Checklist
git diff --check origin/main...HEADpassesgolangci-lint run --new-from-rev=origin/main ./...)website-docs/, Swagger annotations, etc.)Screenshots / Recordings