Skip to Content
Backend ServicesVector Search

Vector Search

backend/vector-search/ (FastAPI + ChromaDB, port 3001) powers semantic video search — the system behind “where did they discuss X?” timeline markers.

Endpoints

MethodPathPurpose
POST/ingestIngest transcript chunks (with timestamps) into a collection
GET/searchQuery by text; returns matching chunks ranked by similarity
GET/healthLiveness probe
GET/statsCollection counts and index stats

Pipeline

  1. The transcript is chunked client-side by the adaptive semantic chunker — topic-boundary detection via cosine-similarity drops, 30–300 words per chunk
  2. Chunks (with start/end timestamps) are POST /ingest-ed
  3. The Conductor’s search_video function issues GET /search
  4. Hits return with timestamps → the timeline drops markers at the exact moments

Fallback

When the service is unreachable, src/lib/vector-search.ts performs browser-local similarity search over hash-based 128-dim embeddings — lower quality, zero infrastructure.

ChromaDB data persists in the vector-data Docker volume.