Skip to main content
Multimodel fusion runs the same query through multiple embedding models and fuses the results into a single ranking. Different embedding models capture different aspects of semantic meaning, and combining their results produces more comprehensive retrieval than any single model alone. This code example creates a collection, inserts 100 sample documents, and generates three separate query embeddings to simulate different models. It searches with each embedding, then fuses all three result sets using RRF to produce a single combined ranking.
In production, replace the simulated embeddings with actual embedding model outputs. The example below uses random vectors as placeholders for models like OpenAI text-embedding-3-small, Cohere embed-multilingual-v3.0, and sentence-transformers/all-MiniLM-L6-v2.
Each fused result includes these fields:
  • id: The unique identifier of the matching point
  • score: Fused score combining rank positions from all three model searches
  • payload: Metadata object from the matching point
Multimodel fusion provides these advantages:
  • Different models capture complementary semantic signals
  • Results that rank highly across multiple models are more likely to be relevant
  • Reduces the risk of missing relevant documents that one model ranks poorly