postgres-semantic-search

Solid

PostgreSQL-based semantic and hybrid search with pgvector and ParadeDB. Use when implementing vector search, semantic search, hybrid search, or full-text search in PostgreSQL. Covers pgvector indexing, hybrid FTS/BM25 + RRF, ParadeDB, reranking, halfvec, multilingual search, query translation, and domain evals. Triggers: pgvector, vector search, semantic search, hybrid search, embedding search, PostgreSQL RAG, BM25, RRF, HNSW index, similarity search, ParadeDB, pg_search, reranking, Cohere rerank, Voyage rerank, graceful fallback, iterative_scan, filtered HNSW, websearch_to_tsquery, unaccent, multilingual FTS, pg_trgm, trigram, fuzzy search, LIKE, ILIKE, autocomplete, typo tolerance, fuzzystrmatch, evaluation, benchmarking, Hit@K, MRR, halfvec cast, cross-lingual retrieval, non-English corpus, per-language indexing, query translation, RRF fusion across languages

AI & Automation 39 stars 14 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 86/100

Stars 20%
53
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# PostgreSQL Semantic Search ## Quick Start ### 1. Setup ```sql CREATE EXTENSION IF NOT EXISTS vector; CREATE TABLE documents ( id SERIAL PRIMARY KEY, content TEXT NOT NULL, embedding vector(1536) -- 1536-dim embedding -- Or: embedding halfvec(3072) -- 3072-dim embedding (halfvec = 50% memory) ); ``` ### 2. Basic Semantic Search ```sql SELECT id, content, 1 - (embedding <=> query_vec) AS similarity FROM documents ORDER BY embedding <=> query_vec LIMIT 10; ``` ### 3. Add Index (> 10k documents) ```sql CREATE INDEX ON documents USING hnsw (embedding vector_cosine_ops); ``` ### Docker Quick Start ```bash # pgvector with PostgreSQL 17 docker run -d --name pgvector-db \ -e POSTGRES_PASSWORD=postgres \ -p 5432:5432 \ pgvector/pgvector:pg17 # Or PostgreSQL 18 (latest) docker run -d --name pgvector-db \ -e POSTGRES_PASSWORD=postgres \ -p 5432:5432 \ pgvector/pgvector:pg18 # ParadeDB (includes pgvector + pg_search + BM25) docker run -d --name paradedb \ -e POSTGRES_PASSWORD=postgres \ -p 5432:5432 \ paradedb/paradedb:latest # `latest` is convenient for quick-start; pin to e.g. paradedb/paradedb:pg17 for reproducible builds ``` Connect: `psql postgresql://postgres:postgres@localhost:5432/postgres` ## Cheat Sheet ### Distance Operators ```sql embedding <=> query -- Cosine distance (1 - similarity) embedding <-> query -- L2/Euclidean distance embedding <#> query -- Negat...

Details

Author
laguagu
Repository
laguagu/claude-code-nextjs-skills
Created
4 months ago
Last Updated
yesterday
Language
TypeScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Solid

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, cosine distance, nearest neighbor, RAG, LLM, AI search Covers: halfvec storage, HNSW index configuration (m, ef_construction, ef_search), quantization strategies, filtered search, bulk loading, and performance tuning.

1,751 Updated 1 weeks ago
timescale
AI & Automation Listed

030201-pgvector-embeddings

Vector search with pgvector — embedding generation (OpenAI or hash), HNSW indexing, cosine similarity search, and enriched product JOIN queries.

1 Updated yesterday
natuleadan
AI & Automation Solid

postgres-hybrid-text-search

Use this skill to implement hybrid search combining BM25 keyword search with semantic vector search using Reciprocal Rank Fusion (RRF). **Trigger when user asks to:** - Combine keyword and semantic search - Implement hybrid search or multi-modal retrieval - Use BM25/pg_textsearch with pgvector together - Implement RRF (Reciprocal Rank Fusion) for search - Build search that handles both exact terms and meaning **Keywords:** hybrid search, BM25, pg_textsearch, RRF, reciprocal rank fusion, keyword search, full-text search, reranking, cross-encoder Covers: pg_textsearch BM25 index setup, parallel query patterns, client-side RRF fusion (Python/TypeScript), weighting strategies, and optional ML reranking.

1,751 Updated 1 weeks ago
timescale
AI & Automation Solid

agentdb-vector-search

Implement semantic vector search with AgentDB for intelligent document retrieval, similarity matching, and context-aware querying. Use when building RAG systems, semantic search engines, or intelligent knowledge bases.

57,130 Updated today
ruvnet
AI & Automation Listed

agentdb-vector-search

Implement semantic vector search with AgentDB for intelligent document retrieval, similarity matching, and context-aware querying. Use when building RAG systems, semantic search engines, or intelligent knowledge bases.

335 Updated today
aiskillstore