Vector Database Shootout - Functional & Technical Specification
Defines a benchmarking suite to compare performance of five vector databases across embedding models, dimensions, and query patterns.
What this file does
Defines a benchmarking suite to compare performance of five vector databases across embedding models, dimensions, and query patterns.
When to use it
- Evaluating vector databases for an AI application
- Designing reproducible performance benchmarks
- Comparing Qdrant, Weaviate, pgvector, Milvus, and Pinecone
- Planning a multi-database testing methodology
Assumes this stack
Vector Database Shootout - Functional & Technical Specification
FUNCTIONAL SPECIFICATION
1. Project Overview
A comprehensive benchmarking suite designed to systematically compare the performance characteristics of leading vector databases (Qdrant, Weaviate, pgvector, Milvus, Pinecone) across various dimensions to provide actionable insights for AI application developers.
2. Objectives
- Provide objective performance metrics for each vector database across different workloads
- Determine optimal database choices for specific AI application types
- Create a reproducible benchmarking methodology for future comparisons
- Document performance tradeoffs between databases at different scales and configurations
3. Scope
In Scope:
- Performance testing of 5 vector databases (Qdrant, Weaviate, pgvector, Milvus, Pinecone)
- Testing across multiple text embedding models (3-5 representative models)
- Evaluation across standard vector dimensions (128 to 4096)
- Testing of common query patterns and workloads
- Measurement of latency, throughput, and recall accuracy metrics
Out of Scope:
- Cost analysis and pricing comparison
- Security assessment
- Administration and maintenance evaluation
- Feature comparison (except where directly impacting performance)
4. Success Criteria
- Complete benchmark results for all database/model/dimension combinations
- Statistical validation of results with minimal variance (<5%)
- Clear performance recommendations for at least 5 common AI application scenarios
- Publication-ready documentation and visualizations of results
5. User Requirements
| ID | Requirement | Priority |
|---|---|---|
| FR1 | System shall benchmark vector search performance across all listed databases | High |
| FR2 | System shall test with at least 3 embedding models of different characteristics | High |
| FR3 | System shall measure performance across at least 4 vector dimensions | Medium |
| FR4 | System shall test at least 5 query patterns relevant to AI applications | High |
| FR5 | System shall generate comprehensive performance reports with visualizations | Medium |
| FR6 | System shall ensure testing environments are identical across databases | High |
6. AI Application Scenarios
- Large-scale document retrieval system (millions of vectors, text embeddings)
- Real-time recommendation engine (low latency, medium dataset)
- Semantic search with filtering (hybrid search capabilities)
- High-throughput inference system (batch processing focus)
- Question-answering system (precision-focused retrieval)
TECHNICAL SPECIFICATION
1. System Architecture
┌────────────────────────────────────────────────────────────┐
│ Benchmarking Controller │
└───────────────────────────────┬────────────────────────────┘
│
┌───────────────────────────┼───────────────────────────┐
│ │ │
┌───▼───────────────┐ ┌─────▼─────────────┐ ┌────────▼────────────┐
│ Test Data Generator│ │ Workload Generator │ │ Metrics Collector │
└───────────────────┬┘ └─────────────────┬─┘ └────────┬─────────────┘
│ │ │
└───────────┬───────────┘ │
│ │
┌─────────────────────────────▼────────────────────────────▼─────────────────┐
│ Daytona Environment │
├────────────────┬────────────────┬────────────────┬────────────────┬────────┴───────┐
│ Qdrant │ Weaviate │ pgvector │ Milvus │ Pinecone │
│ Sandbox │ Sandbox │ Sandbox │ Sandbox │ Sandbox │
└────────────────┴────────────────┴────────────────┴────────────────┴────────────────┘
2. Testing Environment
2.1 Daytona Configuration
- Use Daytona to create isolated containerized environments for each database
- Standardized hardware allocation for each environment:
- CPU: 8 cores per database instance
- RAM: 32GB per database instance
- Storage: 100GB SSD
- Network: Isolated with identical bandwidth allocation
2.2 Database Versions and Setup
| Database | Version | Configuration Notes |
|---|---|---|
| Qdrant | Latest (0.11.x+) | Default configuration with optimized HNSW parameters |
| Weaviate | Latest (1.19.x+) | Default configuration with BM25 hybrid search enabled |
| pgvector | Latest (0.5.x+) | PostgreSQL 15 with optimized IVFFlat indexes |
| Milvus | Latest (2.2.x+) | Default configuration with optimized index parameters |
| Pinecone | Latest service | p1 or s1 index type, identical pod configuration |
3. Testing Dimensions
3.1 Embedding Models
- text-embedding-ada-002 (OpenAI) - 1536 dimensions
- text-embedding-3-small (OpenAI) - 1536 dimensions
- all-MiniLM-L6-v2 (SentenceTransformers) - 384 dimensions
- instructor-xl (Instructor) - 768 dimensions
- mpnet-base-v2 (SentenceTransformers) - 768 dimensions
3.2 Vector Dimensions
- 128 dimensions (for small models/quantized variants)
- 384 dimensions (sentence transformers)
- 768 dimensions (BERT-based embeddings)
- 1536 dimensions (OpenAI embeddings)
3.3 Dataset Sizes
- Small: 10,000 vectors
- Medium: 100,000 vectors
- Large: 1,000,000 vectors
- Extra Large: 10,000,000 vectors (for selected tests)
3.4 Query Patterns
- Exact Nearest Neighbor (k=1, 10, 100)
- Approximate Nearest Neighbor with varying recall targets
- Filtered Vector Search (metadata filtering + vector search)
- Hybrid Search (vector similarity + text matching)
- Batched Queries (batch sizes: 10, 100, 1000)
- Concurrent Queries (10, 100, 1000 simultaneous users)
4. Benchmarking Methodology
4.1 Data Generation
- Text Dataset: Mixture of Wikipedia articles, news content, and synthetic data
- Document Types: Short texts (sentences), medium texts (paragraphs), long texts (full documents)
- Domain Diversity: General knowledge, technical content, conversational data
4.2 Test Execution
- Initialize each database with identical schema and settings
- Load pre-generated test data in parallel to all databases
- Run identical query workloads against each database
- Execute each test 5 times and average results
- Clear caches between test runs to ensure consistency
4.3 Metrics Collection
| Metric | Description | Measurement Method |
|---|---|---|
| Latency | Query response time | P50, P95, P99 percentiles in ms |
| Throughput | Queries per second | Maximum sustainable QPS without degradation |
| Recall | Search result accuracy | Compared against exact brute-force results |
| Index Build Time | Time to create indexes | Wall clock time in seconds |
| Memory Usage | RAM consumption | Peak memory usage during operations |
| CPU Utilization | Processor load | Average and peak CPU % during operations |
5. Implementation Plan
5.1 Development Phases
-
Setup Phase (Week 1-2)
- Configure Daytona environments
- Set up database instances
- Build data generation pipeline
-
Execution Phase (Week 3-5)
- Generate datasets for all embedding models
- Execute benchmarks across all dimensions
- Collect and validate raw metrics
-
Analysis Phase (Week 6-7)
- Process results data
- Generate visualizations
- Identify performance patterns
-
Documentation Phase (Week 8)
- Produce final report
- Create application-specific recommendations
- Document methodology for reproducibility
5.2 Tools & Technologies
- Benchmark Framework: Built on Python 3.10+
- Data Processing: NumPy, Pandas
- Visualization: Matplotlib, Plotly
- Embedding Generation: HuggingFace Transformers, OpenAI API
- Load Testing: Locust for concurrent user simulation
- Version Control: Git
- Containerization: Docker for Daytona environments
6. Output Deliverables
- Raw benchmark data in structured format (CSV, JSON)
- Interactive dashboard showing performance across dimensions
- Written report with analysis and recommendations
- Application-specific decision matrix
- Reproducible benchmark code and configuration
7. Future Considerations
- Expand to additional vector databases (FAISS, Vespa, ChromaDB)
- Test with custom/fine-tuned embedding models
- Evaluate cost-performance tradeoffs
- Benchmark performance at extreme scale (100M+ vectors)
What's inside
7 sections: functional spec, technical spec, system architecture, testing environment, dimensions, methodology, implementation plan
Change this for your project
- Replace
Daytonawith your own environment provisioning tool - Replace
text-embedding-ada-002with your embedding model IDs - Replace
nibzard/vectordb-benchwith your repository name
Where it goes
Keep in docs/ or alongside the feature. Agents read it to implement against a defined contract.
Worth borrowing
- Structuring benchmarks by database, model, dimension, and query pattern
- Using a standardized hardware allocation per database instance
- Collecting P50, P95, P99 latency alongside throughput and recall
Related Documents
GPU Selection Guide for Large Language Models (LLMs)
Guides GPU selection for LLM inference, fine-tuning, and training by mapping model sizes, precision levels, and budgets to VRAM requirements.
Community AI Agent Skills Discovery Sources
Catalogs 50+ platforms, repositories, directories, and communities for discovering and sharing AI agent skills across multiple coding tools.
ReleaseKit - Technical Requirements Document
Specifies a Go library and CLI for release automation with conventional commit parsing, validation checks, and workflow orchestration.
api_llm Specification
Defines a workspace of thin HTTP API clients for major LLM providers with no abstraction layer and explicit developer control.