AI System Design - databases
#01 Databases

Build a Multi-Tenant Vector Database with Namespace Isolation Premium

Design a shared vector database serving 40,000 tenants and 2.4 billion embeddings at 25ms p99, where the smallest namespace holds 300 vectors, the largest holds 180 million, and no tenant can read another's data or steal its latency budget.

Read
#02 Security

Build a Private Enterprise RAG System with Row-Level Security Premium

A blueprint for a multi-tenant RAG system serving 12,000 enterprise users across 500 tenants, where row-level security enforces document-level ACLs at retrieval time over a 300 million chunk index while holding p99 query latency under 350ms.

Read
#03 Data Engineering

Build a Production RAG Pipeline with Hybrid BM25 + Dense Retrieval Premium

A blueprint for a hybrid retrieval pipeline that fuses BM25 keyword search with dense HNSW vector search across 200 million chunks, serving 800 queries per second at p99 retrieval latency under 120ms and recall at 50 above 0.92.

Read
#04 Data Engineering

Build a Query Rewriting and Expansion Engine for RAG Premium

Design a query rewriting and expansion engine that turns 12,000 ambiguous queries per second into fused multi-index retrievals, lifting recall@8 from 0.62 to 0.89 while adding under 45ms to the retrieval path.

Read
#05 Data Engineering

Build a Real-Time RAG Pipeline with Streaming Document Ingestion Premium

A blueprint for a streaming RAG ingestion pipeline that consumes 4,000 document change events per second from CDC and webhook sources, embeds only the delta, and keeps a 40 million chunk index queryable within an 8 second p99 staleness budget.

Read
#06 Databases

Build a Real-Time Vector Index with Incremental Updates Premium

Design a 400 million vector index that absorbs 12,000 upserts per second, makes a new embedding searchable within 190ms, and still answers 2,500 QPS at 45ms p99 with recall@10 above 0.92.

Read
#07 Databases

Build a Sparse-Dense Hybrid Index (SPLADE + Dense) for Semantic Search Premium

Design a sparse-dense hybrid index over 60 million passages that serves 6,000 peak queries per second at 40ms p99, fusing SPLADE term weights with dense vectors so exact-term and paraphrase queries both pass the quality gate.

Read
#08 Databases

Build a Vector Embedding Versioning and Migration System Premium

Design an embedding versioning and migration system that moves 840 million vectors across 1,900 tenants from one model epoch to the next at 6,200 QPS, with dual writes, shadow reads, interleaved per-tenant cutover, and a rollback path.

Read
#09 Databases

Build a Vector Index with HNSW and Quantization at 1B Vectors Premium

Design a billion-vector similarity index that serves 20,000 queries per second at 18ms p99 with recall@10 of 0.94, compressing 1.5TB of 768-dimensional embeddings into 352 bytes per vector across 64 shards.

Read
#10 Caching

Build an Embedding Cache for Deduplicating Repeated Queries Premium

Design a two-tier embedding cache that absorbs 48,000 peak queries per second, serves 64% of them without touching a GPU, and shrinks a self-hosted embedding fleet from 37 L4 GPUs to 14.

Read