Supabaseoli_riceAnnouncement
Supabase Vecs: a vector client for Postgres
Summary
Vecs is a new Python library for managing embeddings in Postgres databases that use pgvector, offering a vector-store-like interface for table creation, indexing, querying, and metadata filtering. Collections are stored in a vecs schema with an id text primary key, a vector column, and JSONB metadata; queries support cosine distance, l2 distance, and maximum inner dot product, with optional filters and returned values. A short Python workflow can create a collection, upsert records, create an index after insertion, and search by vector; the collection can also be queried without an index. With Supabase, a collection can be exposed through a public-schema view and accessed from supabase-js, while proposed preprocessing transforms and an asynchronous client remain under debate.
Context
The stated goal is to make Postgres with pgvector look and feel like a dedicated vector store while supporting ease of use, interactivity, exploratory data analysis, and search workloads. Vecs is also intended to remain useful for people who want either a visible SQL layer or a higher-level interface that hides database details.
Approach / What changed
Vecs provides a Python client for creating and indexing pgvector-backed tables, inserting or updating records, querying by supported distance measures, and filtering JSONB metadata through a lightweight DSL. Supabase deployments can expose a collection through a public-schema view. Optional preprocessing pipelines and an async client are proposed future directions, not currently functional features.
Takeaways
get_or_create_collection creates a table in the vecs schema with an id text primary key, a vector column sized to the declared dimension, and a non-null JSONB metadata column.
Collection.upsert adds a record when its user-defined identifier is new and updates the existing record when that identifier already exists.
The proposed transformation pipeline and asynchronous client are mock code only and remain subjects of debate in the referenced feature requests.
Source and freshness
- Source
- supabase.com
- Published
- Added to Yomu
- Last updated
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.