← Back to Leaderboard
Ssqliteai

sqliteai/sqlite-vector

Embedded vector search for local RAG with a C extension for SQLite.

Engineering Health (Methodology)
A+ · 88/100
Maintenance Activity
● Updated 3d ago
Latest Release
1.2.0
Commercial License Check
Apache-2.0 · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance35/35
Fork Adoption13/25
Release Cadence20/20
License Clarity20/20
Self-HostedLocal AI
Total Stars
★ 1,230
24h Growth
+0
7d Growth
+0
Forks
55

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

sqliteai/sqlite-vector Star History (2025-07-24 - 2026-12-03) ALL-TIME STAR HISTORY (2025-07 – 2026-12) +1.2k in 497d · avg +2/day 1.3k 650 0 2025-07-24: ★ 12025-08-30: ★ 282025-10-04: ★ 3142025-11-08: ★ 3662025-12-13: ★ 4372026-01-17: ★ 5222026-02-21: ★ 6692026-03-28: ★ 7902026-05-02: ★ 8662026-06-06: ★ 9362026-07-11: ★ 9982026-08-15: ★ 1,0772026-09-19: ★ 1,1452026-10-24: ★ 1,1882026-12-03: ★ 1,230 ★ 1.2k 2025-07 2026-03 2026-12

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

SQLite-Vector is a C extension loaded into the application's SQLite runtime, not a separate database process. Embeddings are fixed-dimension BLOBs in ordinary tables, so the application can keep vectors beside document chunks and metadata. vector_init configures the type, dimensions, and distance metric. vector_full_scan searches the original vectors without any index build; vector_quantize builds a separate compact representation for vector_quantize_scan to search.

The quantized path can stream from the database or read an in-process buffer populated by vector_quantize_preload. Top-k scan results carry rowids for joining back to application data. Omitting k exposes a streaming form so SQL can filter and limit the returned rows; filtering after a fixed top-k scan is not equivalent to finding the top k within that filter. TurboQuant scores packed codes with SIMD lookup tables rather than reconstructing full vectors.

Key Capabilities & Differentiators

Stored formats include Float32, Float16, BFloat16, Int8, UInt8, and 1-bit vectors. The extension supports L2, squared L2, L1, cosine, and dot product, plus Hamming for 1-bit vectors only. For unit-length Float32 vectors, normalized=1 reduces cosine distance to 1 - dot; it asserts that the inputs are normalized rather than normalizing them. Quantization is a separate choice: INT8, UINT8, 1BIT, or 2-, 3-, and 4-bit TurboQuant.

On Apple M5 Pro with NEON, the file-backed benchmark scans one million 768-dimensional vectors with cosine and k=20. Exact Float32 takes 484.4 ms/query. INT8 reports 37.6 ms/query preloaded at 740 MB and 114.4 ms/query streamed at 30 MB, both at 99.5% recall@20 relative to exact search. Preloaded TURBO4 uses a 378 MB index and returns 81.8% recall@20 at 151.5 ms/query. These are best-of-20 timings on synthetic vectors, not production tail-latency or recall estimates.

Trade-offs & Limitations

Compared with a managed service such as Pinecone, SQLite-Vector keeps retrieval in the application and can operate offline without a network call to a separate vector service. The trade-off is that the application owns database placement, backups, and capacity planning. The documented execution paths scan vectors rather than pruning most of the corpus with an ANN index, so CPU and bytes scanned grow with corpus size. The streamed benchmark benefits from a warm OS page cache, which is outside its reported memory figure; storage bandwidth can dominate on devices that cannot cache the index.

For cosine, set qtype=INT8 explicitly: the automatic default can choose UINT8 for non-negative data, and the translation used by UINT8 changes angles. On the synthetic benchmark, UINT8 delivers 33.8% recall@20 versus 99.5% for INT8 at the same index size. TurboQuant saves space relative to INT8 but is slower and less accurate in that test. Use 1BIT for candidate filtering with full-precision reranking rather than final ranking, and treat INT8/UINT8 scan scores as ranking values, not original-space distances.

Hardware & Deployment Guide

Use a compatible SQLite runtime with extension loading enabled, then load the matching native binary with .load ./vector in the SQLite CLI or load_extension from SQL. Direct embedding is also supported. Prebuilt native targets include x86 and ARM on Linux and macOS, x86 on Windows, and Android and iOS. For browsers, @sqliteai/sqlite-wasm bundles SQLite with the vector extension enabled rather than loading a desktop library at runtime.

Release 1.2.0 lists sqlite_vector for Flutter/Dart, @sqliteai/sqlite-vector for Node, and @sqliteai/sqlite-wasm for WASM; the same package channels appear in 1.1.0 and 1.1.2. Swift Package integration requires SQLite with extension loading enabled. The local retrieval path needs no managed account or GPU. For a memory-constrained deployment, start with a file-backed database and streaming, then test cold-cache behavior and decide whether preloading is worth the extra residency.

Storage: Fixed-dimension vector BLOBs live in ordinary SQLite tables alongside application data.
Execution: Exact scans need no prebuilt vector index; quantized scans read a separately built compact representation.
Quantization: TurboQuant packs 2, 3, or 4 bits per dimension plus one scale per vector and scores the codes with SIMD lookup tables.
Memory and latency: On Apple M5 Pro with NEON, INT8 preload and streaming report 37.6 ms at 740 MB and 114.4 ms at 30 MB, respectively, with 99.5% recall@20 in both modes.
Metric choice: Use explicit INT8 for cosine to avoid the unsigned fallback on non-negative data; 1BIT is Hamming-only and best evaluated as a candidate filter.
Packaging: Native artifacts cover desktop and mobile, with Node, WASM, Swift, and Flutter/Dart integration paths.
Best For

Offline RAG, on-device semantic search, and SQLite-backed applications that want to retrieve vectors and metadata together and can validate scan latency and recall on their own data.

Skip If

You need a shared managed retrieval tier, ANN candidate pruning, or predictable tail latency on a corpus that is too large to scan within your storage and CPU budget.

Reviewed on 2026-12-02 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

Self-HostedLocal AI
pip install sqliteai-vector

Comparison vs. Top RAG, Data & Memory Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
sqlite-vector ★1.2k—CApache-2.0Embedded vector search for local RAG with a C extension for SQLite.
pgvector23.9k+96C—PostgreSQL extension for exact and approximate vector search alongside relationa
qdrant35.9k+135RustApache-2.0Rust vector database for filtered and hybrid RAG retrieval
LightRAG41k+110PythonMITGraph-backed RAG for cross-document retrieval and multimodal indexing

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/sqliteai/sqlite-vector.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

sqliteai/sqlite-vector Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about sqlite-vector

How do I add vector search to an existing SQLite schema?

Load the extension, store fixed-dimension embeddings as BLOBs in an ordinary table, and register the column with vector_init. Use vector_full_scan for exact retrieval or build a compact representation with vector_quantize and query it with vector_quantize_scan. Join results back to the source table by rowid.

Do I need a GPU, and is 30 MB a realistic memory budget?

The search path runs on the CPU with SIMD where available; it does not require a GPU or VRAM. The published million-vector INT8 test reports 30 MB for streaming versus 740 MB for preloading, but that memory column excludes the OS page cache. Measure whole-application memory, cold-cache latency, and concurrent throughput on your target device. Budget separately for any embedding model.

Can I ship it in a commercial app or self-host it?

Yes. Apache-2.0 permits commercial use and self-hosting without a managed account. When redistributing the extension, comply with the license's applicable requirements, including providing a copy of the license and retaining required notices. Check any separately bundled runtime or package dependencies on their own terms.

When should I choose SQLite-Vector instead of Pinecone?

Choose SQLite-Vector when retrieval should live in the application, data is already in SQLite, or offline operation matters. Consider a managed service such as Pinecone when multiple clients need a shared vector service and you want the provider to operate it. Evaluate filtered recall, tail latency, concurrency, and operational ownership before switching; the local scan benchmark is not a head-to-head comparison.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining sqliteai/sqlite-vector? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature sqliteai/sqlite-vector on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare