pgvector

Integrate vector similarity search into PostgreSQL using the pgvector extension.

6|1|Updated Feb 27, 2026
One-click install
npx skills add https://github.com/RepairYourTech/cfsa-antigravity --skill pgvector-repairyourtech
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pgvector
Source: https://github.com/RepairYourTech/cfsa-antigravity/tree/main/.agent/skill-library/stack/databases/pgvector
Command: npx skills add https://github.com/RepairYourTech/cfsa-antigravity --skill pgvector-repairyourtech

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and scripts (resource) components.

What problem does it solve?

This Skill enables adding powerful vector similarity search directly into your existing PostgreSQL database, eliminating the need for a separate vector store and simplifying your architecture.

Core Features & Use Cases

  • Vector Column Types: Store embeddings efficiently within PostgreSQL.
  • Indexing: Supports HNSW and IVFFlat for fast similarity lookups.
  • Hybrid Queries: Seamlessly combine SQL filtering and sorting with vector similarity search.
  • Use Case: Integrate semantic search into your existing application by storing product descriptions as embeddings alongside product data in PostgreSQL, allowing users to find products using natural language queries.

Quick Start

Use the pgvector skill to create a vector column and add a HNSW index to your documents table.

Frequently Asked Questions about pgvector

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add vector similarity search to an existing PostgreSQL database?

You can add vector similarity search to PostgreSQL by installing the pgvector extension to store embeddings in vector columns and perform similarity lookups directly alongside relational data. This eliminates the need for a separate vector database.

What is the best way to index vector embeddings in PostgreSQL for RAG pipelines?

The best way to index vector embeddings in PostgreSQL for RAG pipelines is using HNSW or IVFFlat indexing strategies. These indexes facilitate fast similarity lookups while co-locating embeddings with relational data.

Can I combine SQL filtering with vector similarity search in PostgreSQL?

Yes, you can combine SQL filtering with vector similarity search in PostgreSQL using hybrid queries. This allows you to seamlessly apply standard SQL sorting and filtering alongside vector distance operators.

Do I need a separate vector store for embeddings if I already use PostgreSQL?

You do not need a separate vector store for embeddings if you use PostgreSQL. By using the pgvector extension, you can co-locate embeddings directly within your existing database, simplifying your architecture.

How do HNSW and IVFFlat indexing strategies compare for vector search?

HNSW and IVFFlat are both supported indexing strategies for vector search in PostgreSQL. They enable fast similarity lookups by optimizing how vector distance operators query embedding columns within your database.