# pg_vectorize: a VectorDB on Postgres

A Postgres server and extension that automates turning table text into embeddings and provides hooks into popular LLMs, for full-text, semantic and hybrid search.

pg_vectorize automates the transformation and orchestration of text into embeddings on top of Postgres, making it straightforward to set up and maintain vector search, full-text search and hybrid search, and to build retrieval-augmented generation or search engines directly on Postgres data. It builds on pgvector for vector similarity search, pgmq for background-worker orchestration, and SentenceTransformers for embedding generation.

It offers two ways to use it: an external HTTP server, recommended for managed databases, that exposes endpoints for creating an embedding job and searching; and a Postgres extension with SQL functions such as vectorize.table() and vectorize.search() for direct SQL use, which needs filesystem access to Postgres. An embedding job continuously watches its source table for new or updated rows once created, and the HTTP mode is run locally with Docker Compose.

Website: https://chuckhend.github.io/pg_vectorize/
