Skip to main content

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:

Configure the integration

To connect Vectorize to your Supabase database:

  1. Click Vector Databases from the main menu.

  2. Click New Vector Database Integration from the Vector Databases page.

  3. Select the Supabase card.

    Supabase Card

  4. Enter the parameters in the form using the Supabase Parameters table below as a guide, then click Create Supabase Integration.

    Create Supabase Integration

Supabase Parameters

FieldDescriptionRequiredWhere to find it
NameA descriptive name to identify the integration within Vectorize.YesChoose any name that helps you remember what this connection is for.
HostThe hostname of your Supabase PostgreSQL database.YesYou can find this in the connect tab under the Session Pooler section.
PortThe port number to connect to your database.YesUsually 5432 for Supabase
DatabaseYour database name.YesYou can either choose and existing database or we will automatically create one for you if it doesn't exist.
UsernameThe username used to connect to your database.YesYou can find this in the connect tab under the Session Pooler section.
PasswordThe password for your database user.YesThis 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'. Configure Supabase in Pipeline

Configuring the Supabase integration in a RAG Pipeline

The Supabase integration has two parts:

  1. Authentication: This connects to your Supabase database and can be reused across multiple pipelines.
  2. 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.

Configure Supabase in Pipeline

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.

Was this page helpful?