AI Tools Developer Tools

PathSeer Vector Search: How Weaviate Handles Filtered Queries

Weaviate 1.40 adds PathSeer vector search, a filter strategy that mixes distance-first and filter-first steps and works on existing HNSW indexes.

Network graph illustrating PathSeer vector search finding a path through filtered nodes
AI-generated editorial illustration.

Searching for books about architecture published after 2000 combines a meaning-based search with a hard rule. PathSeer vector search is a new way for Weaviate, a vector database, to handle exactly that kind of query. Weaviate’s blog describes it as a filter strategy introduced in version 1.40.

What is filtered vector search?

Filtered vector search pairs a semantic query with structured criteria such as a date range or a language. Weaviate’s blog argues this is probably the most popular query type in vector search use cases.

Vector databases often use HNSW, a graph of vectors where a search hops from neighbor to neighbor toward the closest matches. Filters complicate that walk, because many nodes on the route may not match the criteria.

Why did earlier strategies fall short?

Weaviate describes two families of approach. Filter-aware methods require filters to be defined upfront. They perform well on low-cardinality static data but struggle when filters or even the schema change over time.

Filter-agnostic methods, such as ACORN, explore the neighbor graph without knowing the filters in advance. Weaviate says it shipped ACORN as an HNSW filter strategy in late 2024, and it became the default in 1.34.

According to Weaviate, ACORN does well when filters are negatively correlated. It loses recall on very sparse filters, and above 40% selectivity its two-hop expansion costs more than it saves. Weaviate therefore restricted ACORN by selectivity.

What is the choice between distance first and filter first?

The PathSeer paper names two ways to treat each neighbor during the graph walk.

  • Distance first: compute the distance to every neighbor and check the filter later. Weaviate equates this with its sweeping strategy. The graph never disconnects, but at low selectivity many calculations are wasted on nodes that fail the filter.
  • Filter first: check the filter on every neighbor and compute distances only for matches. Weaviate equates this with ACORN. It saves distance work but can disconnect the graph and reduce recall.

The paper measured both on six workloads and found a practical choice varied by dataset. Weaviate also notes that its filter check is a fast bitmap lookup of around 17 nanoseconds, while a distance computation costs roughly 50 to 110 nanoseconds.

How does PathSeer work?

PathSeer decides the strategy node by node instead of committing to one. In the original paper, each node’s neighbor list is split into a sparse zone, always explored distance first, and an expanding zone of extra neighbors, explored filter first until a budget runs out.

The paper’s authors, from Tsinghua University, report in their Faiss implementation 1.2 to 13.5 times the throughput of plain HNSW and 1.6 to 10.6 times that of ACORN. These figures apply at 90% recall@10 across selectivities from 100% down to 0.1%.

The Weaviate version

Zhiyue Li, a paper author, created the original Weaviate pull request. Weaviate says its modified approach drops the separate neighbor lists, so PathSeer works with ordinary HNSW indexes. A filter strategy can therefore change on an existing index without a rebuild.

The Weaviate version has two phases:

  • Two-hop burst: while the candidate heap holds fewer entries than the ef setting, each explored node also adds matching neighbors from two hops away. This stops once the heap is full.
  • Skipping distances: once the heap is full, a non-matching node’s non-matching neighbors are skipped with no distance computed. A matching node has all its neighbors measured, so non-matching nodes beside matching ones act as bridges across empty regions. Skipped nodes are not marked as visited, so other paths can still reach them.

What do the benchmarks show?

Weaviate ran tests on a Weaviate 1.40 build on a 16-vCPU, 60 GB Google Cloud machine, using its own benchmarker tool. The flat search cutoff was disabled so filtered graph search could be tested even where a brute-force scan would normally take over.

The datasets were Cohere v3 embeddings from BEIR, a Sphere DPR set of 1 million embeddings with random categories, and a 10 million passage Wikipedia set with 27 generated filters.

  • On the BEIR Cohere data, Weaviate says PathSeer matches or beats both sweeping and ACORN at every selectivity range.
  • When the query vector sits inside the filter region, a case where sweeping previously beat ACORN, PathSeer outperformed both.
  • On the 10 million passage set, PathSeer clearly outperformed ACORN and exceeded sweeping on topical filters.

Weaviate notes that at 0.1% selectivity it would normally switch to brute-force search, with a default cutoff of 40,000 objects, and that this is the better choice at that size. The excerpt’s account of conjunction filters, which combine a topical filter with a range on an unrelated field, is cut off, so those results are not covered here.

Who is affected?

The change concerns teams running Weaviate with filtered queries, such as semantic search limited by date, language, or tenant. All results come from Weaviate’s own benchmarks and the paper authors’ tests, so independent comparisons are not part of the evidence so far.

Sources