Skip to main content

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.

quickstart.py
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

1

Install Zvec

Install the package using your preferred package manager.
pip install zvec
Zvec supports Python 3.10-3.12 and Node.js on Linux (x86_64, ARM64) and macOS (ARM64).
2

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
    )
)
3

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.

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

Build docs developers (and LLMs) love