Supabase Vector
ActiveDescription
Supabase's built-in pgvector search, turning Postgres into a RAG database.
Key Features
- pgvector — Native Postgres vector type and indexes
- Hybrid search — Vector + full-text + scalar filters in a single SQL query
- Realtime — Document changes pushed to clients via Realtime
- RLS — Row-level security policies protect multi-tenant data
- Edge Functions — Deno edge functions for embedding generation
- Auth + Storage — Built-in auth and file storage
Use Cases
💡 Provide a one-stop backend plus vector search for SaaS apps.
💡 Quickly build a document RAG system with auth.
💡 Fuse traditional SQL business logic with vector search in the same DB.
Categories
Quick Start
# Enable vector in SQL
create extension vector;
create table docs (id bigserial primary key, content text, embedding vector(1536));
# Query via the Supabase JS client
const { data } = await supabase.rpc('match_docs', {
query_embedding: embedding, match_count: 5,
});