You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 75156bc
Browse filesBrowse the repository at this point in the historyBrowse files
fix(knowledge): recover vector candidates an HNSW post-filter discards (#7971)
* fix(knowledge): recover vector candidates an HNSW post-filter discards
pgvector's HNSW index post-filters by construction, so a visibility predicate
can only discard neighbours the graph walk already committed to. When the
documents a caller may read are a small share of the index, the traversal
returns a handful of candidates instead of its limit.
Rank the permitted set exactly when the traversal comes back underfilled and a
bounded probe says that set is small enough to afford. A traversal that fills
its limit is returned untouched, so a scope the graph serves well pays nothing.
Bound the probe by documents examined rather than chunks accumulated, and give
it its own sub-budget so deciding against a rescue can never cost the leg its
results.
Retune the scan settings so the tuple budget sits an order of magnitude above
the beam, which is what lets the iterative scan iterate at all, and so the
narrower beam lowers the leg's uninterruptible floor.
* test(knowledge): cover the capped step budget
* fix(knowledge): require an enabled chunk when a tag filter decides a document
A document whose only tagged chunk is disabled could be admitted by the probe
and then discarded by ranking, spending the probe's document bound on a
document that can contribute no candidate.
Update the KB block fan-out integration test to the strategy it now exercises:
a scope too small to fill the traversal probes once and rescues once.
0 commit comments