Vector Databases
by @clawkk
Deep vector database workflow—embedding choice, index algorithms, recall/latency trade-offs, hybrid search, filtering, operational tuning, and cost. Use when...
clawhub install vector-databases📖 About This Skill
name: vector-databases description: Deep vector database workflow—embedding choice, index algorithms, recall/latency trade-offs, hybrid search, filtering, operational tuning, and cost. Use when selecting or optimizing Pinecone, Milvus, Qdrant, Weaviate, pgvector, OpenSearch kNN, etc.
Vector Databases (Deep Workflow)
Vector search is approximate nearest neighbor (ANN) at scale—not magic semantic understanding. Success requires embedding model alignment, index parameters, metadata filters, and evaluation against real queries.
When to Offer This Workflow
Trigger conditions:
Initial offer:
Use six stages: (1) problem & metrics, (2) embeddings & schema, (3) index & parameters, (4) hybrid & filtering, (5) operations & cost, (6) evaluation & iteration. Confirm scale (vectors, QPS, dimension) and latency SLO.
Stage 1: Problem & Metrics
Goal: Define what “similar” means for the product—not only cosine similarity.
Questions
1. Query types: short keyword vs long paragraph? multilingual? 2. Precision vs recall preference: legal/medical may need high precision 3. Freshness: how often do vectors change? Real-time upserts? 4 Ground truth: any labeled relevant pairs for eval?
Metrics
Exit condition: Success metric and minimum acceptable recall/latency stated.
Stage 2: Embeddings & Schema
Goal: Stable embedding pipeline with versioning and metadata design.
Embeddings
Schema
doc_id, tenant_id, acl, source, timestampsVersioning
Exit condition: ID strategy + metadata filter needs documented.
Stage 3: Index & Parameters
Goal: Pick index type and build params for data size and recall.
Common families (vendor-specific names)
efConstruction, MTuning loop
Exit condition: Benchmark results: p95 latency vs recall at fixed k.
Stage 4: Hybrid Search & Filtering
Goal: Combine vector similarity with structured constraints—most production needs this.
Patterns
Pitfalls
Exit condition: Query plan documented: ANN → filter → rerank (as applicable).
Stage 5: Operations & Cost
Goal: Reliable ingestion, monitoring, and predictable bills.
Ops
Cost
Exit condition: Runbook for reindex, scaling, and incident “search degraded.”
Stage 6: Evaluation & Iteration
Goal: Continuous improvement with labeled or proxy eval.