postgres-semantic-search

Set up PostgreSQL semantic and hybrid search with pgvector and ParadeDB.

58|18|Updated Jan 11, 2026
One-click install
npx skills add https://github.com/laguagu/claude-code-nextjs-skills --skill postgres-semantic-search
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: postgres-semantic-search
Source: https://github.com/laguagu/claude-code-nextjs-skills/tree/main/skills/postgres-semantic-search
Command: npx skills add https://github.com/laguagu/claude-code-nextjs-skills --skill postgres-semantic-search

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires openai, @supabase/supabase-js, drizzle-orm, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This skill enables PostgreSQL-based semantic and hybrid search using pgvector and ParadeDB.

Core Features & Use Cases

  • Semantic search: leverage pgvector to retrieve meaning-based results from documents stored in PostgreSQL.
  • Hybrid search: combine full-text search with vector similarity (BM25/RRF) for robust ranking, including ParadeDB as an Elasticsearch alternative.
  • Scalability: supports index types (HNSW, IVFFlat) and large datasets, enabling efficient search in product catalogs, documents, and knowledge bases.
  • Use Case: build a knowledge-base search for a software team that returns contextually relevant articles and code references.

Quick Start

Begin by enabling pgvector in PostgreSQL, optionally install ParadeDB, create the embedding column, and run the included SQL scripts to set up semantic search functions and indexes. Use the provided embeddings script to generate embeddings with OpenAI and store them in your vector columns, then run semantic or hybrid searches against your data.

Frequently Asked Questions about postgres-semantic-search

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

FAQPage Schema
How do I set up semantic search in PostgreSQL using pgvector?

To set up semantic search in PostgreSQL, you enable the pgvector extension, create an embedding column, and use provided scripts to generate OpenAI embeddings and store them in your vector columns for retrieval.

Can I combine full-text search with vector similarity in PostgreSQL?

Yes, you can implement hybrid search in PostgreSQL by combining full-text search with vector similarity using BM25 and Reciprocal Rank Fusion (RRF) for robust document ranking.

Does ParadeDB work with pgvector for scalable retrieval?

ParadeDB integrates with pgvector to enable scalable retrieval, functioning as an Elasticsearch alternative for hybrid search workflows within your existing PostgreSQL environment.

What is the best way to index large datasets for vector search in PostgreSQL?

The best way to index large datasets for vector search is using HNSW or IVFFlat index types, which enable efficient similarity queries across product catalogs and knowledge bases.

Do I need OpenAI and drizzle-orm to generate embeddings for Supabase?

Yes, the embedding scripts require OpenAI for generating vector embeddings and drizzle-orm with @supabase/supabase-js to interact with and store data in your Supabase PostgreSQL database.