Skip to content
ai-supply.store
探索分类排行榜社区Agent APIFAQ
发布登录
catalog / Data & ETL / pgvector
⇄ConnectorData & ETLFree

pgvector

Open-source vector similarity search for PostgreSQL — store and query embeddings directly in your Postgres DB.

@ai-supply
安装量310k
评分★ 4.8
评价103
↗ 源代码仓库

pgvector

pgvector is an open-source PostgreSQL extension for vector similarity search. It adds a vector data type and operators to Postgres, letting you store embedding vectors alongside relational data and search them with exact or approximate nearest-neighbor queries — no separate vector database required.

Key Features

  • Native Postgres: use SQL, JOIN with relational data, leverage existing Postgres tooling
  • Exact and approximate search: exact KNN and IVFFlat/HNSW approximate indexes
  • Distance metrics: L2, inner product, cosine, L1, Hamming, Jaccard
  • Sparse vector support (svector) for BM25-style retrieval
  • Half-precision vectors (halfvec) to cut storage by 2×
  • Works with any ORM that supports Postgres: SQLAlchemy, Django, ActiveRecord

Quick Start

CREATE EXTENSION vector;

CREATE TABLE embeddings (
  id SERIAL PRIMARY KEY,
  content TEXT,
  embedding vector(1536)
);

CREATE INDEX ON embeddings USING hnsw (embedding vector_cosine_ops);

-- Nearest neighbor search
SELECT content, 1 - (embedding <=> '[0.1,0.2,...]') AS similarity
FROM embeddings
ORDER BY embedding <=> '[0.1,0.2,...]'
LIMIT 5;
from pgvector.sqlalchemy import Vector
# Works with SQLAlchemy, Django, and psycopg2/psycopg3

Install via ai-supply

npx ai-supply add pgvector-postgres-embeddings

Curated mirror of the open-source pgvector (PostgreSQL License). Get it from the source.

More from @ai-supply

View profile →
◐Model
llama.cpp
Pure C/C++ LLM inference library — run quantized models on CPU, Metal, CUDA and more.
↓ 900k★ 4.9
⇄Connector
vLLM
High-throughput, memory-efficient LLM inference engine with PagedAttention and continuous batching.
↓ 820k★ 4.9
◉Agent
MetaGPT
Multi-agent framework that assigns GPT roles (PM, engineer, QA) to solve complex software tasks end-to-end.
↓ 820k★ 4.8
◆Skill
NLTK
The Natural Language Toolkit — Python's foundational NLP library for tokenization, POS tagging, parsing, and corpora.
↓ 760k★ 4.7
ai-supply.store

AI 能力市场。技能、MCP、插件、智能体、数据集——人可发现,机器可消费。

api · v3.1status · all green
联系
support@ai-supply.storesecurity@ai-supply.store
市场
  • 探索
  • 分类
  • 排行榜
  • 基准测试
社区
  • 社区
  • FAQ
面向智能体
  • 快速入门 (60s)
  • 授权智能体
  • Agent API
  • OpenAPI 规范
面向开发者
  • 发布
  • 控制台
  • 收益分成
账户
  • 登录
  • 设置
法律条款
  • 条款
  • 发布者协议
  • 可接受使用政策
  • 隐私政策