KatInterview

Designing a Multi-Modal Document & Asset Vector Search System

System DesignModel answer
HardModel answerSystem Designsystem-designmachine-learningvector-search

Last updated

Architect an end-to-end vector storage and retrieval engine for processing user documents, images, and videos, supporting multi-modal search under low-latency constraints.

Design an asynchronous file-embedding ingestion and retrieval system for a multi-tenant cloud application. The platform handles user-uploaded assets including structured documents (PDFs, presentations, raw text), static images, and video files (up to 50 MB per file).

Key Expectations

  1. Ingestion & Processing Pipeline: Define how multi-modal assets are ingested, decoded, chunked, and parsed.
  2. Model Strategy: Select and justify embedding model architectures for cross-modal (text-to-image/video) and high-density text search. Explain how space spaces are unified or compared.
  3. Storage & Vector Indexing: Detail the storage schema, database isolation, vector indexing strategies (e.g., HNSW vs. IVF-PQ), and scalar quantization trade-offs for scaling to billions of vectors.
  4. Retrieval & Reranking: Detail the search workflow, including tenant isolation, hybrid text search (BM25 + Dense Vector), segment aggregation, and reranking.
  5. Operational Concerns: Explain zero-downtime model migration strategies, idempotency, and throughput optimization.

Hints

Hint 1

Calculate vector volume: a single 5-minute video at 1 frame/2s produces 150 image vectors plus transcript chunks, making video processing the primary vector volume driver.

Hint 2

Cross-modal standard models (like CLIP) have strict context limits (e.g., 77 tokens), whereas text-dense documents require long-context text encoders. Consider how to query across disjoint vector spaces.

Hint 3

Avoid post-query tenant filtering; standard HNSW traversals degrade severely if pre-filtering selectivity drops below ~10% unless single-tenant partitioning or metadata-aware graph routing is implemented.