Pgvector Semantic Search
Semantic search over pgvector with halfvec storage, HNSW tuning, and binary quantization for large datasets.
- CCM score
- 71 of 100
- skills.sh installs
- 1.1K
- GitHub stars
- 1.9K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers the golden-path setup:
halfvecstorage, cosine distance, HNSW indexing, and query patterns for RAG and semantic search - Documents HNSW parameters (
m,ef_construction,hnsw.ef_search) with an ef_search recall and speed tradeoff table - Enforces Core Rules such as HNSW by default, indexing after bulk loads, concurrent index creation, and matching query operators to index ops
- Includes memory sizing guidance by RAM tier and when to switch to binary quantization with re-ranking
Install
$ npx -y skills add timescale/pg-aiguide --skill pgvector-semantic-search -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
pgvector for Semantic Search
Semantic search finds content by meaning rather than exact keywords. An embedding model converts text into high-dimensional vectors, where similar meanings map to nearby points. pgvector stores these vectors in PostgreSQL and uses approximate nearest neighbor (ANN) indexes to find the closest matches quickly—scaling to millions of rows without leaving the database. Store your text alongside its embedding, then query by converting your search text to a vector and returning the rows with the smallest distance.
This guide covers pgvector setup and tuning—not embedding model selection or text chunking, which significantly affect search quality. Requires pgvector 0.8.0+ for all features (halfvec, binary_quantize, iterative scan).
Golden Path (Default Setup)
Details
- Repository
- github.com/timescale/pg-aiguide
- Categories
- Databases, AI Agents & LLM Apps
- First seen
- Jun 3, 2026
More from timescale/pg-aiguide
All 8Similar to Pgvector Semantic Search
More Databasespostgres-hybrid-text-searchSkilltimescale/pg-aiguide417 installsHybrid search guide merging BM25 keyword and pgvector semantic results via client-side RRF fusion.
vector-index-tuningSkillwshobson/agents11.3K installsGuidance for tuning vector indexes on latency, recall, and memory, covering HNSW and quantization choices.
similarity-search-patternsSkillwshobson/agents11.3K installsReference guide for building semantic search with vector databases, covering distance metrics, index tradeoffs, and tuning.
embeddingsSkillruvnet/ruflo1.2K installsVector embeddings with HNSW search, SQLite persistence, and quantization for semantic retrieval.
vector-searchSkillruvnet/ruflo752 installsTwo vector-search paths: large-corpus HNSW search and a WASM router for up to 11 hot patterns.
Pg AiguideMCP servertimescale1.9K starsSemantic and keyword search over PostgreSQL, TimescaleDB, and PostGIS manuals, plus curated best-practice skills.