
Treasury Desk
A browser-local crypto treasury demo with payment proposals, two-of-three approvals, revision history, simulated execution and a ledger that records the result.
A command-line tool for checking how pgvector search behaves once you add filters. It measures speed, compares approximate results with exact search, and checks query plans to see whether PostgreSQL is using your HNSW index.
In an actual application, you usually need results from a particular customer, category or group of active records. Those filters can change how approximate vector search behaves. A query might finish quickly while missing some of the nearest matches that satisfy your conditions.
pgvector-filterbench runs an exact search as a reference, then tests different HNSW strategies and settings against it. You can compare how long each approach takes and how many of the exact search’s top matches it finds. That gives you something concrete to work with when adjusting the search parameters.
It also checks the query plans. PostgreSQL can choose a sequential scan, which makes a supposedly impressive HNSW result a little awkward: the index you thought you were testing wasn’t being used. The benchmark checks for that explicitly.
You can sample query vectors from your database or supply your own, then compare the standard HNSW search with strict and relaxed iterative scans. Results are written to JSON and Markdown. If you want to run it in CI, you can set thresholds so a drop in recall or unexpected index usage fails the check.
There’s a Docker demo with synthetic data if you want to see how it works before setting up a run against your own tables. The tool itself is written in Go, and prebuilt binaries are available.
The benchmark queries are read-only, although exact searches can still give the database a fair amount of work. For a larger dataset, I’d start on a replica or staging database and keep the initial test small.
Useful when you’re tuning filtered vector search and want to see what your settings actually change.
Added
rows_returned (mean and minimum) plus
short_result_runs in the JSON report, and Rows (mean/min) plus Short Sets columns in the
Markdown report. Recall and same-rank alone cannot distinguish a filter-shortened result set from
a complete but wrong one. The exact ground-truth row reports rows returned as well, which is
always k.exact for eligible samples.gate.require_full_results check that fails the gate when any measured ANN configuration
returns fewer than k.ann rows. It is disabled by default, because short filtered-HNSW result
sets are the condition the tool exists to measure.Changed
Fixed
--version and -v on the root command. Both previously failed with
unknown flag: --version, and the version was absent from --help. The flag is wired after the
embedded VERSION file is loaded so it never reports the dev placeholder, and it prints the same
string as the version command.stable version advanced to 1.27.golang.org/x/text to v0.39.0 to fix GO-2026-5970, an infinite loop on invalid
UTF-8 input in Unicode normalization, and update its golang.org/x/sync dependency.External download
Fixed
k.ann rows instead of every row returned by a larger k.exact query.plan_valid and index_used claims from the exact JSON result row.Added
External download
External download