pgvector-knowledge-patch

Document pgvector 0.7.0 to 0.8.2 API and indexing changes.

22|Updated Jan 22, 2026
One-click install
npx skills add https://github.com/Nevaberry/nevaberry-plugins --skill pgvector-knowledge-patch
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pgvector-knowledge-patch
Source: https://github.com/Nevaberry/nevaberry-plugins/tree/main/plugins/pgvector-knowledge-patch/skills/pgvector-knowledge-patch
Command: npx skills add https://github.com/Nevaberry/nevaberry-plugins --skill pgvector-knowledge-patch

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill patches gaps in model knowledge about pgvector by providing concise, verified updates to APIs, vector types, indexing options, and query patterns introduced after the model training cutoff so agents do not generate outdated or broken SQL and index designs.

Core Features & Use Cases

  • Updated Vector Types: Describes halfvec (half-precision), sparsevec (sparse storage), and bit indexing including dimensional limits and operator classes.
  • Indexing & Query Patterns: Explains expression indexes, binary quantization and re-ranking strategies, subvector extraction, L1 support for HNSW, and operator classes for distance metrics.
  • Iterative Scan Guidance: Documents iterative index scan modes, scan limits, and CTE patterns to avoid overfiltering when combining approximate search with WHERE clauses.
  • Use Case: Migrate an embedding-based search schema to pgvector 0.7+ by adding appropriate expression indexes for quantized or half-precision storage and applying iterative scan settings to maintain recall with selective filters.

Quick Start

Load the pgvector-knowledge-patch and summarize the API, new vector types, operator classes, iterative scan settings, and recommended SQL migration patterns since 0.6.x.

Frequently Asked Questions about pgvector-knowledge-patch

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

FAQPage Schema
How do I use pgvector iterative index scans to prevent overfiltering in vector search?

Use pgvector iterative index scans to repeatedly search approximate nearest neighbors when combining vector search with WHERE filters, mitigating overfiltering by expanding the search scope until enough results match the criteria.

What new vector types and operator classes are available in pgvector 0.7.0 and later?

pgvector 0.7.0 and later introduces halfvec for half-precision storage, sparsevec for sparse vectors, and bit indexing, each with specific operator classes and dimensional limits for optimized distance calculations.

How do I apply binary quantization and re-ranking in PostgreSQL vector search?

Apply binary quantization in PostgreSQL vector search using the binary_quantize function to compress embeddings, then use a re-ranking strategy to sort the filtered candidates by exact distance for improved recall and performance.

Can I use expression indexes with HNSW in pgvector for filtered queries?

Yes, you can use expression indexes with HNSW in pgvector to index quantized or subvector extractions directly, allowing the database to satisfy filtered vector queries efficiently without rescanning the base table.

How do I tune HNSW and IVFFlat indexes in pgvector 0.8.2?

Tune HNSW and IVFFlat indexes in pgvector 0.8.2 by configuring indexing parameters like m and ef_construction for HNSW, and lists and probes for IVFFlat, while selecting appropriate operator classes for L1, L2, or cosine distance.

Why does my pgvector schema migration fail when adding halfvec or sparsevec columns?

Schema migrations adding halfvec or sparsevec columns fail when exceeding dimensional limits or using incompatible operator classes, requiring you to verify vector type constraints and apply correct distance metric functions for successful indexing.