pgvector Tuning: When Filtered Vector Search Returns Nothing
On a table built as a hard case, a filtered vector search returned no rows, no error, and the plan said the index was used.
Video #50 ยท RAG and vector search
Steps in the video
Files
- common.py (44 lines)
- compare.py (30 lines)
- compose.yaml (12 lines)
Tested with
Python 3.12.15 | psycopg[binary]==3.3.6, pgvector==0.5.1, numpy==2.5.4
What this does not show
One made-up table of 20,000 rows and one query built to be a hard case, run on one laptop; no timings were measured. The Docker image tag pg17 floats: I saw pgvector 0.8.7 on Postgres 17, and a later pull may differ.
Sources
Learning IT by Example.