What problem does it solve?
Integrating vector similarity search often requires setting up and managing a separate vector database, adding complexity to your application stack. sqlite-vec brings this capability directly into SQLite, simplifying deployment and maintenance.
Core Features & Use Cases
- In-Database Vector Search: Store and query vector embeddings (float, int8, bit) directly within SQLite using the
vec0 virtual table.
- Efficient KNN Queries: Perform K-Nearest Neighbor searches with support for L2, cosine, and Hamming distance metrics.
- Metadata & Partition Filtering: Combine vector search with traditional SQL filtering on metadata columns and use partition keys for multi-tenant or temporal data.
- Use Case: Build a lightweight semantic search engine for a local application, storing text embeddings alongside document metadata in a single SQLite database, enabling fast and relevant content retrieval.
Quick Start
Show me how to create a vec0 table in SQLite to store 768-dimension float embeddings and perform a basic KNN query.