Vector Embeddings & AI in Supabase

From the Supabase cheat sheet · Advanced Features · verified Jul 2026

Vector Embeddings & AI

Work with vector embeddings for AI applications

typescript
// Enable pgvector extension
CREATE EXTENSION IF NOT EXISTS vector;

// Create table with embeddings
CREATE TABLE documents (
  id serial PRIMARY KEY,
  content text,
  embedding vector(1536)
);

// Store embedding
const { data, error } = await supabase
  .from('documents')
  .insert({
    content: 'Document text',
    embedding: vectorArray
  })
🤖 Built-in vector database with pgvector
🔍 Semantic search capabilities
🎯 Perfect for RAG and AI applications
⚡ High-performance similarity search

More Supabase tasks

Back to the full Supabase cheat sheet