Multimodal Hybrid Search Pipeline
Combine vector search with keyword search (BM25) across text, images, and video for the most comprehensive multimodal retrieval system.
from mixpeek import Mixpeekclient = Mixpeek(api_key="YOUR_API_KEY", namespace="multimodal-search")# 1. Two collections, one extractor each: video and images through multimodal_extractor, documents through text_extractormedia = client.buckets.create(bucket_name="media",bucket_schema={"properties": {"asset": {"type": "video",},},},)docs = client.buckets.create(bucket_name="documents",bucket_schema={"properties": {"body": {"type": "text",},},},)media_collection = client.collections.create(collection_name="media",source={"type": "bucket", "bucket_ids": [media["bucket_id"]]},feature_extractor={"feature_extractor_name": "multimodal_extractor","version": "v1",},)text_collection = client.collections.create(collection_name="documents",source={"type": "bucket", "bucket_ids": [docs["bucket_id"]]},feature_extractor={"feature_extractor_name": "text_extractor","version": "v1","parameters": {"split_by": "paragraphs","chunk_size": 3,},},)# 2. Upload and processclient.buckets.upload(media["bucket_id"],blobs=[{"property": "asset", "type": "video", "data": "s3://your-bucket/media/q3-review.mp4"}],)client.buckets.upload(docs["bucket_id"],blobs=[{"property": "body", "type": "text", "data": "s3://your-bucket/docs/q3-report.md"}],)client.collections.trigger(media_collection["collection_id"])client.collections.trigger(text_collection["collection_id"])# 3. Dense search over both collections plus BM25 over document text (it reads the namespace text payload indexes), fused with RRF, then a rerankretriever = client.retrievers.create(retriever_name="hybrid-multimodal",collection_identifiers=["media", "documents"],input_schema={"query": {"type": "text","required": True,},},stages=[{"stage_name": "search","stage_id": "feature_search","parameters": {"searches": [{"feature_uri": "mixpeek://multimodal_extractor@v1/vertex_multimodal_embedding","query": {"input_mode": "text","value": "{{INPUT.query}}",},"top_k": 100,},{"feature_uri": "mixpeek://text_extractor@v1/multilingual_e5_large_instruct_v1","query": {"input_mode": "text","value": "{{INPUT.query}}",},"top_k": 100,},{"feature_uri": "mixpeek://text_extractor@v1/multilingual_e5_large_instruct_v1","query": {"input_mode": "text","value": "{{INPUT.query}}",},"top_k": 100,"lexical": True,},],"fusion": "rrf","final_top_k": 100,},},{"stage_name": "rerank","stage_id": "rerank","parameters": {"inference_name": "BAAI__bge_reranker_v2_m3","query": "{{INPUT.query}}","document_field": "text","top_k": 20,},},],)# 4. Searchresults = client.retrievers.execute(retriever["retriever_id"],inputs={"query": "quarterly revenue growth chart",},)for doc in results["documents"]:print(doc["document_id"], doc["score"])
Feature Extractors
Multimodal Extractor
Unified embeddings for video, audio, image, and text: scene/silence chunking, Whisper transcription, thumbnails, and Gemini vision.
Text Embedding
Extract semantic embeddings from documents, transcripts and text content
Retriever Stages
feature search
Search and filter documents by vector similarity using feature embeddings
rerank
Rerank documents using cross-encoder models for accurate relevance
Related Recipes & Resources
Explore these related resources to deepen your understanding and discover more powerful features
Text Embedding
Extract semantic embeddings from documents, transcripts and text content
Multimodal Extractor
Unified embeddings for video, audio, image, and text: scene/silence chunking, Whisper transcription, thumbnails, and Gemini vision.
Multimodal Search with MVS
Build multimodal search by embedding different content types (text, images, video frames) with your own models and searching across them in a single MVS namespace. Use CLIP or any multimodal embedding model for cross-modal retrieval.
Document Intelligence Search
Extract and search through PDFs, presentations, and documents. Combines OCR, layout analysis, and semantic search for comprehensive document retrieval.
BYO Embeddings Vector Search
Bring pre-computed embeddings from any provider (OpenAI, Cohere, Together, etc.) and upsert them directly into MVS for instant vector search. No feature extractors, no pipelines -- just embeddings in, results out.
Multimodal RAG Pipeline
Build a retrieval-augmented generation system that works with text, images, and video. Feed relevant multimodal context to LLMs for grounded responses.