Skip to main content
Supabase provides powerful AI capabilities through pgvector, vector storage, and integration with AI frameworks. Build semantic search, recommendation systems, and RAG applications at scale.

Key Features

Vector Embeddings

Store and query high-dimensional vectors for semantic search

Similarity Search

Find similar items using cosine, L2, or inner product distance

pgvector Extension

Native PostgreSQL extension with full SQL support

AI Integrations

Works with OpenAI, Anthropic, Hugging Face, and more

What are Vector Embeddings?

Vector embeddings are numerical representations of data that capture semantic meaning. Similar items have similar vectors.

Use Cases

Search by meaning, not just keywords. Find documents that match the intent of a query even if they use different words.
Recommend products, content, or users based on similarity to past interactions or preferences.
Build chatbots that answer questions using your own data by retrieving relevant context before generating responses.
Detect similar or duplicate content, classify images, or identify inappropriate material.

Architecture Options

Supabase offers three ways to work with vectors:
Store vectors directly in PostgreSQL tables with full SQL support.
Best for: Transactional workloads, complex queries with SQL

Getting Started

1

Enable pgvector

Enable the vector extension in your database:
2

Create a table

Create a table to store vectors:
3

Generate embeddings

Use OpenAI or another provider to generate embeddings:
4

Store and search

Store embeddings and perform similarity search:

Next Steps

Vector Embeddings

Learn how to generate and store embeddings

Similarity Search

Build semantic search functionality

pgvector Guide

Deep dive into the pgvector extension

AI Examples

Explore complete AI application examples