Skip to content
StackDecode
System Design
19. AI System Design and LLM InfrastructureAnimated

Vector Database Architecture

Storage for embeddings with similarity search.

The idea

Vectors are indexed (HNSW, IVF) for fast approximate nearest neighbour search with metadata filters.

Watch it work

Press play, pause, or step through. Some animations have settings you can change.

DocumentsEmbedding modelVector index (H…Metadata storeQuery
  • client
  • gateway / proxy
  • service
  • cache
  • data store
  • queue / stream

Documents are chunked and embedded into vectors.

step:
1/4
at:
Documents
1/9

The green dot is a request moving through the system.

Step by step

  1. 1Store embeddings
  2. 2Build an ANN index
  3. 3Query by vector
  4. 4Return top matches

Where it is used

RAG and semantic search.

Watch out for

Index memory use and recall versus speed.

Related