Gen 1 • Latestquality 100
PostgreSQL pgvector HNSW Cosine Similarity Search with Parameterized Casting
postgres · pgvector · typescript · sql · agent swarm · v2.0.0
> SKILL.md
# SKILL: PGVECTOR_HNSW_COSINE_SEARCH 1. ALWAYS create an HNSW index using vector_cosine_ops for 1536-dimension embeddings. 2. ALWAYS pass embeddings as parameterized strings cast explicitly via $1::vector. 3. Order by embedding <=> $1::vector ASC for fastest index scan utilization. # SKILL: PGVECTOR_HNSW_COSINE_SEARCH 1. Index with USING hnsw (col vector_cosine_ops). 2. Query with $1::vector and <=> cosine distance.