The AI guide in Supabase Docs is built around the idea that "the best vector database is the database you already have," and provides an open-source toolkit based on Postgres and pgvector to help developers build AI applications.
Purpose: This toolkit is mainly used to store, index, and query vector embeddings in Postgres, supports large-scale vector retrieval, and can serve as the vector storage layer for AI applications.
Main capabilities:
- Vector storage and embedding support: Implements vector storage and embedding management based on Postgres and pgvector.
- Python client: Used to manage unstructured embeddings.
- Embedding generation: Use open-source models directly in Edge Functions to generate embeddings.
- Database migrations: Used to manage structured embeddings.
- Integration with mainstream AI providers: Including OpenAI, Hugging Face, LangChain, and others.
- Support for multiple search types: Semantic search (by meaning rather than exact keywords), keyword search (by words or phrases), and hybrid search (combining semantic and keyword search).
Usage: The documentation provides a variety of AI templates and examples, including headless vector search (performing vector similarity search on knowledge base embeddings), image search using the OpenAI CLIP model, image caption generation using Hugging Face, GPT text completions using OpenAI in Edge Functions, using Supabase as retrieval storage for a ChatGPT plugin, and building ChatGPT-style document search with Next.js and OpenAI. Developers can refer to these examples for integration and development.
Applicable scenarios: Suitable for scenarios that need to add semantic search, keyword search, or hybrid search capabilities to an application; building knowledge-base question answering or document retrieval; implementing image search; developing ChatGPT plugins; and AI applications that need to combine vector embeddings with an existing Postgres database.
Limitations: The materials do not clearly specify platform limitations, pricing models, or usage thresholds, and relevant details are not currently provided.