Agent skill · AI & Agents

pgvector-semantic-search

Use this skill for setting up vector similarity search with pgvector for AI/ML embeddings, RAG applications, or semantic search. **Trigger when user asks to:** - Store or search vector embeddings in PostgreSQL - Set up semantic search, similarity search, or nearest neighbor search - Create HNSW or IVFFlat indexes for vectors - Implement RAG (Retrieval Augmented Generation) with PostgreSQL - Optimize pgvector performance, recall, or memory usage - Use binary quantization for large vector datasets **Keywords:** pgvector, embeddings, semantic search, vector similarity, HNSW, IVFFlat, halfvec, cos

Tiger Data1,796★ · +6/wk · 1 repos on radarProfile →
claude-codeApache-2.0
Install
npx skills add timescale/pg-aiguide --skill pgvector-semantic-search --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 15 KB
Bundled scripts: none
Declared author: tigerdata
Requires: Requires PostgreSQL 15+ with the pgvector extension
Path: skills/pgvector-semantic-search/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 1,806 · +10 this week
Language: Python
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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) Use this configuration unless you have a specific reason not to. - Embedding column data type: `halfvec(N)` where `N` is your embedding dimension (must match everywhere). Examples use 1536; replace with your dimension `N`. - Distance: cosine (`<=>`) - Index: HNSW (`m = 16`, `ef_construction = 64`). Use `halfvec_cosine_ops` and query with `<=>`. - Query-time recall: `SET hnsw.ef_search = 100` (goo

What's inside
Steps it walks through
  1. Golden Path (Default Setup)
  2. Core Rules
  3. Type Rules
  4. Standard Pattern
  5. HNSW Index
  6. HNSW Parameters
  7. IVFFlat Index (Generally Not Recommended)
  8. Quantization Strategies
  9. Guidelines for 1536-dim vectors
  10. Binary Quantization (For Very Large Datasets)
  11. Performance by Dataset Size
  12. Filtering Best Practices
  13. Iterative scan (recommended when filters are selective)
  14. Choose the right filtering strategy
More from pg-aiguide
All skills →
About this skill
What does the pgvector-semantic-search skill do?

Use this skill for setting up vector similarity search with pgvector for AI/ML embeddings, RAG applications, or semantic search. **Trigger when user asks to:** - Store or search vector embeddings in PostgreSQL - Set up semantic search, similarity search, or nearest neighbor search - Create HNSW or IVFFlat indexes for vectors - Implement RAG (Retrieval Augmented Generation) with PostgreSQL - Optimize pgvector performance, recall, or memory usage - Use binary quantization for large vector datasets **Keywords:** pgvector, embeddings, semantic search, vector similarity, HNSW, IVFFlat, halfvec, cos

How do I install it?

Run `npx skills add timescale/pg-aiguide --skill pgvector-semantic-search --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From timescale/pg-aiguide, a repository with 1,806 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going