pgvector/pgvector-go
pgvector support for Go
What it solves
It provides Go language support for the pgvector PostgreSQL extension, allowing developers to store, query, and index vector embeddings within a PostgreSQL database using Go.
How it works
The library acts as a bridge between Go applications and the pgvector extension. It provides specialized types for vectors (including half-precision and sparse vectors) and integration wrappers for popular Go database libraries such as pgx, pg, Bun, Ent, GORM, and sqlx.
Who it’s for
Go developers building AI applications that require vector similarity search, recommendation systems, or RAG (Retrieval-Augmented Generation) workflows using PostgreSQL as their vector store.
Highlights
- Broad Library Support: Integrates with major Go ORMs and database drivers including GORM, Ent, and pgx.
- Bespoke Vector Types: Supports standard vectors, half-precision vectors for reduced storage, and sparse vectors for high-dimensional data.
- Indexing Integration: Simplifies the creation of HNSW and IVFFlat indexes for fast approximate nearest neighbor search.
- Flexible Distance Metrics: Supports L2 distance, inner product, and cosine distance queries.
Related
- Project
pgvector/pgvectorpgvector is an open-source extension that adds vector similarity search to Postgres, letting you store and query vectors (embeddings) alongside your regular data with support for exact and approximate nearest-neighbor search, multiple distance metrics, and several vector types.
- Project
pgvector/pgvector-nodepgvector-node is a library that provides support for the pgvector PostgreSQL extension in Node.js, Deno, and Bun, allowing developers to store and perform similarity searches on vector embeddings using their preferred database drivers and ORMs.
- Project
qdrant/go-clientA Go client library for the Qdrant vector search engine, providing utilities to manage collections and perform similarity searches.
- Project
ChuckHend/pg_vectorizepg_vectorize adds automatic text‑to‑embedding conversion and hybrid vector/full‑text search to PostgreSQL. It can run as a standalone HTTP service (ideal for managed DBs) or as a Postgres extension (SQL‑only). Using `pgvector` for similarity and `pgmq` for background jobs, it watches a source table, creates embeddings with Sentence‑Transformers models, and exposes simple REST or SQL APIs for RAG‑style queries.
- Project
NVIDIA/cuvscuVS is an NVIDIA GPU library for fast approximate nearest neighbor search and clustering, built on the RAFT library. It supports Python, C++, C, and Rust, and is used for semantic search (RAG, recommendations, image/text/audio search) and data mining (clustering, visualization, k-NN graphs). It installs via conda, pip, or tarball, and its key algorithm is CAGRA.