Add MUVERA processors for multi-vector search#3164
Add MUVERA processors for multi-vector search#3164praveenMprasad wants to merge 6 commits intoopensearch-project:mainfrom
Conversation
Introduces MUVERA (Multi-Vector Retrieval via Fixed Dimensional Encodings) as ingest and search request processors in the k-NN plugin. Documents are encoded into fixed-size FDE vectors at ingest time for ANN prefetch, while the original multi-vectors are preserved for MaxSim reranking via lateInteractionScore. Resolves opensearch-project#3163 Signed-off-by: Praveen Mohan Prasad <prasadnu@amazon.com>
Signed-off-by: Navneet Verma <navneev@amazon.com>
|
@praveenMprasad please add the IT for this new Processor. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3164 +/- ##
============================================
+ Coverage 82.52% 82.59% +0.06%
- Complexity 3935 4001 +66
============================================
Files 426 429 +3
Lines 14646 14897 +251
Branches 1869 1935 +66
============================================
+ Hits 12087 12304 +217
- Misses 1796 1811 +15
- Partials 763 782 +19 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Add MuveraProcessorIT with 7 REST-based integration tests covering the end-to-end MUVERA ingest and search pipeline flow. Tests verify pipeline creation, document indexing with FDE encoding, ANN prefetch via search pipeline, passthrough for non-script_score queries, and error handling for dimension mismatches and invalid fde_dimension config. Signed-off-by: Praveen M Prasad <prasadnu@amazon.com> Signed-off-by: Praveen Mohan Prasad <prasadnu@amazon.com>
@navneet1v Added MuveraProcessorIT with 7 integration tests covering the end-to-end flow - ingest pipeline creation, FDE encoding on indexed documents, search pipeline with ANN prefetch via muvera_query, passthrough for non-script_score queries, and error handling for dimension mismatches and invalid fde_dimension config. Please take a look. |
|
Thank you @praveenMprasad . Will start reviewing the PR. I would need some to review it, since I had to first understand what MUVERA is. |
|
@praveenMprasad before we can kickoff the review lets ensure that all CIs are passing. cc: @Gankris96 and @kotwanikunal |
The deleteIndex(String) method in MuveraProcessorIT conflicted with the static deleteIndex(String) in OpenSearchRestTestCase. Renamed to deleteTestIndex to avoid the override error. Also applied spotless formatting. Signed-off-by: Praveen Mohan Prasad <prasadnu@amazon.com>
|
@navneet1v I've fixed the compilation issue. The CI workflows need maintainer approval to run, could you please approve them ? |
src/main/java/org/opensearch/knn/processor/muvera/MuveraIngestProcessor.java
Outdated
Show resolved
Hide resolved
Use Processor import instead of full package path in KNNPlugin.getProcessors(). Use ArrayList import instead of inline java.util.ArrayList in MuveraIngestProcessor. Signed-off-by: Praveen Mohan Prasad <prasadnu@amazon.com>
Description
Add MUVERA (Multi-Vector Retrieval via Fixed Dimensional Encodings) ingest and search request processors to enable ANN prefetch for multi-vector models like ColBERT and ColPali.
The MUVERA algorithm converts variable-length multi-vector embeddings into a single fixed-dimensional encoding (FDE) vector using SimHash clustering and random projections. This enables approximate nearest neighbor search on multi-vector representations, which previously required brute-force scoring via
lateInteractionScore.Two new processors:
muveraingest processor — reads multi-vectors from a source field, produces an FDE vector, writes it to aknn_vectortarget field. Original multi-vectors remain in_sourcefor reranking.muvera_querysearch request processor — interceptsscript_scorequeries containingquery_vectorsin script params, MUVERA-encodes them, and replaces the innermatch_allwith aknnquery on the FDE field. ThelateInteractionScorescript wrapper stays intact for MaxSim reranking.Key design decisions:
fde_dimensionparameter validates against computed valueReference: MUVERA paper, fastembed implementation
Related Issues
Resolves #3163
Check List
--signoff.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.