MerchantryTidbits

rag-retrieval / library

SQLite-Vector

Capability: SQLite-Vector

Use it when

  • A mobile or edge app needs offline semantic search over embeddings and running a separate vector database server is not an option
  • You want vector similarity queries directly in an existing SQLite schema without virtual tables, hours-long index builds, or an external service

What it solves

Not the fit when

  • Production use unless the embedding application is an OSI-approved open source project or you have a commercial license; the repository uses a custom Elastic-based license.
  • Distributed vector-database requirements such as replication, horizontal sharding, and tenant isolation.
  • Assuming repository benchmarks generalize: its documented 38.27x result uses paired scan settings with recall@10 of 0.48 and roughly 310 MB RSS.
  • Using 2-bit quantization without measuring recall and memory on the target embeddings.
  • managed multi-tenant vector service
  • billion-scale ann index tuning
  • embedding generation itself

Install

Download the prebuilt extension for your platform from the GitHub releases page and load it with .load ./vector or SELECT load_extension('./vector'); alternatively pip install sqliteai-vector (Python), implementation 'ai.sqlite:vector:0.9.80' (Android Gradle), the Swift package for iOS, flutter pub add sqlite_vector, or the @sqliteai/sqlite-wasm npm package for browsers

Invoke

Store vectors as BLOBs in ordinary tables, call SELECT vector_init('table','column','type=FLOAT32,dimension=384') with a distance metric (L2, COSINE, DOT, L1, HAMMING), optionally vector_quantize(..., 'qtype=TURBO,qbits=4'), then run nearest-neighbor queries by joining vector_quantize_scan('table','column', ?, k) on rowid

Alternatives

No reviewed alternatives recorded yet.