ChuckHend/pg_vectorize
Full-text and semantic search on any Postgres
What it solves
pg_vectorize transforms Postgres into a VectorDB by automating the process of turning text into embeddings and managing the search orchestration. It simplifies the creation of Retrieval-Augmented Generation (RAG) and search engines by handling the maintenance of vector search, full-text search, and hybrid search within the database environment.
How it works
The project provides two deployment modes:
- HTTP Server: A standalone service that connects to Postgres and exposes a REST API to create embedding jobs and perform searches. This is recommended for managed databases where extensions cannot be installed.
- Postgres Extension: An in-database implementation that allows users to use SQL functions like
vectorize.table()andvectorize.search()for a direct SQL experience.
It leverages pgvector for similarity search, pgmq for background worker orchestration, and SentenceTransformers for generating embeddings.
Who it’s for
Developers building RAG applications or search engines who want to use Postgres as their primary vector store and automate the embedding pipeline.
Highlights
- Hybrid Search: Supports semantic, full-text, and hybrid search capabilities.
- Automated Maintenance: Continuously watches for updates or new data to ensure embeddings are updated.
- Flexible Deployment: Offers both a REST API for managed DBs and a native SQL extension for self-hosted Postgres.
- Integration: Built on top of established tools like pgvector and SentenceTransformers.