Lightning-Fast Vector Search Build powerful semantic search and RAG applications with Zvec — an in-process vector database that delivers production-grade performance with zero infrastructure overhead.
import zvec
# Define schema
schema = zvec.CollectionSchema(
name = "documents" ,
vectors = zvec.VectorSchema(
"embedding" ,
zvec.DataType. VECTOR_FP32 ,
384
)
)
# Create collection
collection = zvec.create_and_open(
path = "./my_db" ,
schema = schema
)
# Insert vectors
collection.insert([
zvec.Doc(
id = "doc_1" ,
vectors = { "embedding" : [ 0.1 , 0.2 , ... ]}
)
])
# Query by similarity
results = collection.query(
zvec.VectorQuery( "embedding" , vector = [ ... ]),
topk = 10
)
Quick Start Get up and running with Zvec in minutes
Install Zvec
Install the package using your preferred package manager. Zvec supports Python 3.10-3.12 and Node.js on Linux (x86_64, ARM64) and macOS (ARM64).
Define your schema
Create a collection schema that defines your vector dimensions and data structure. import zvec
schema = zvec.CollectionSchema(
name = "my_collection" ,
vectors = zvec.VectorSchema(
"embedding" ,
zvec.DataType. VECTOR_FP32 ,
dimension = 384
)
)
Create and query
Open your collection, insert documents with vectors, and query by similarity. # Create and open collection
collection = zvec.create_and_open(
path = "./zvec_data" ,
schema = schema
)
# Insert documents
collection.insert([
zvec.Doc(
id = "doc_1" ,
vectors = { "embedding" : [ 0.1 , 0.2 , 0.3 , ... ]}
)
])
# Search by vector similarity
results = collection.query(
zvec.VectorQuery( "embedding" , vector = [ 0.4 , 0.3 , 0.2 , ... ]),
topk = 10
)
print (results) # [{'id': 'doc_1', 'score': 0.95, ...}]
Results are automatically sorted by relevance score in descending order.
Core Features Everything you need for production vector search
In-Process Database No servers, no config. Embeds directly into your application for minimal latency and maximum simplicity.
Multiple Index Types Choose from HNSW, IVF, or Flat indexes optimized for different data scales and query patterns.
Dense & Sparse Vectors Support for both dense embeddings and sparse vectors with multi-vector queries in a single call.
Hybrid Search Combine semantic similarity with structured filters for precise, context-aware results.
Built-in Embeddings Native integrations for OpenAI, Qwen, SentenceTransformers, and BM25 embedding functions.
Production Performance Powered by Alibaba’s battle-tested Proxima engine. Search billions of vectors in milliseconds.
Explore by Topic Deep dive into specific areas of Zvec
Core Concepts Learn about collections, schemas, vectors, indexing, and querying fundamentals.
Practical Guides Step-by-step guides for dense vectors, sparse vectors, hybrid search, and performance tuning.
Integrations Connect with OpenAI, Qwen, SentenceTransformers, and BM25 for seamless embeddings.
API Reference Complete API documentation with detailed parameter descriptions and type signatures.
Community & Support Get help and connect with other Zvec users
GitHub Discussions Ask questions, share ideas, and collaborate with the community on GitHub.
Discord Community Join our Discord server for real-time chat and support from the team.
Ready to Build? Start building powerful vector search applications with Zvec today. No servers, no complexity — just fast, reliable vector search.
Get Started Now