Lantern is an open-source PostgreSQL extension that adds vector storage, embedding generation and fast approximate nearest-neighbour search to a database you already run. It introduces the lantern_hnsw index type — an HNSW (Hierarchical Navigable Small World) implementation built on the usearch library — so ORDER BY … LIMIT queries over vector columns are answered by an index scan instead of a sequential scan. Everything stays in SQL, and the latest release is v0.5.0 (November 2024).
real[] or vector columns and query them with the SQL you already write, with no separate query language or client.lantern_hnsw) — Approximate nearest-neighbour search built on usearch, tunable with the M, ef and ef_construction parameters.<-> for L2 squared, <=> for cosine and <+> for Hamming distance, with matching operator classes for real[], vector and integer[] columns.Adding a second datastore for similarity search means syncing data, keeping two systems consistent and running two sets of infrastructure. Lantern puts vector search inside PostgreSQL: embeddings sit next to the rows they describe, vectors can be joined with relational data in a single statement, and your existing backup, monitoring and access-control setup keeps working. It covers the same ground as pgvector, with an HNSW index and helpers for generating embeddings in-database.
Self-hosted PostgreSQL extension — PostgreSQL 11, 12, 13, 14, 15 and 16 on Linux and macOS, installed with the official Docker image, Homebrew, precompiled binaries or a source build.
AGPL-3.0 (GNU Affero General Public License v3.0) — source at github.com/lanterndata/lantern