Supabase Vector Database Integration
This uide walks you through setting up a Retrieval-Augmented Generation (RAG) pipeline in Vectorize using Supabase as your vector database.
What is Supabase?
Supabase is an open-source Firebase alternative that provides a PostgreSQL database with built-in vector search capabilities. It's a great choice for beginners because it offers:
- A user-friendly interface
- Built-in authentication
- Simplified database management
- PostgreSQL compatibility with the pgVector extension
Before you Begin
Ensure you have:
- A Vectorize account (Create one free here ↗)
- A Supabase account (Create one on Supabase ↗)
- A Supabase project with the pgVector extension enabled (see the Quickstart Guide for setup instructions)
Configure the integration
To connect Vectorize to your Supabase database:
-
Click Vector Databases from the main menu.
-
Click New Vector Database Integration from the Vector Databases page.
-
Select the Supabase card.
-
Enter the parameters in the form using the Supabase Parameters table below as a guide, then click Create Supabase Integration.
Supabase Parameters
Field | Description | Required | Where to find it |
---|---|---|---|
Name | A descriptive name to identify the integration within Vectorize. | Yes | Choose any name that helps you remember what this connection is for. |
Host | The hostname of your Supabase PostgreSQL database. | Yes | You can find this in the connect tab under the Session Pooler section. |
Port | The port number to connect to your database. | Yes | Usually 5432 for Supabase |
Database | Your database name. | Yes | You can either choose and existing database or we will automatically create one for you if it doesn't exist. |
Username | The username used to connect to your database. | Yes | You can find this in the connect tab under the Session Pooler section. |
Password | The password for your database user. | Yes | This is the password you set when creating your Supabase project. |
You can find the host, and username by selecting the connect button in your Supabase project. Scrolling down to Session pooler and selection 'View parameters'.
Configuring the Supabase integration in a RAG Pipeline
The Supabase integration has two parts:
- Authentication: This connects to your Supabase database and can be reused across multiple pipelines.
- Pipeline Configuration: This specifies which table in your Supabase database to use for storing vector embeddings.
When configuring your RAG Pipeline, you'll need to specify a table name. If the table doesn't exist yet, Vectorize will automatically create it for you with the proper schema for storing vector embeddings.
Understanding pgVector
Supabase uses the pgVector extension to store and search vector embeddings. This extension:
- Adds vector data types to PostgreSQL
- Enables similarity search operations
- Supports multiple indexing methods for efficient vector search
Vectorize automatically handles the technical details of working with pgVector, so you don't need to write any SQL queries or understand the underlying implementation.
What's next?
-
If you haven't yet built a connector to your source database, go to configure a source connector and select your source data platform.
OR
-
If you're ready to start creating pipelines for vectorizing data, head to Pipeline Basics.