Data substrate

pgvector

The Postgres extension that adds vector types and similarity indexes to the database you already run — the pragmatic default for embedding search below very large scale.

Operating principle

Production AI is a system: context, tools, permissions, traces, evals, and feedback loops around the model.

What it is

pgvector is an open-source Postgres extension: a vector column type, distance operators (cosine, L2, inner product), and HNSW or IVFFlat indexes for fast approximate search. Embeddings live in the same database as the rows they describe, with joins, transactions, and access control included.

Why it matters

A dedicated vector database is another system to deploy, govern, sync, and pay for — and the sync is where retrieval bugs breed. With pgvector, the metadata filter, the permission check, and the similarity search are one SQL query against one source of truth.

How we use it

pgvector with HNSW indexes is the only vector store in our production stack. Retrieval chunks, identity vectors, and memory embeddings all live in Postgres, and hybrid search fuses the vector leg with Postgres full-text ranking at query time.

Related resources