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
Keyed within-radius operator for vector distances in deployed rules (VV5b) #413
Part of epic #305. Split from #327 (VV5), whose top-k part keeps hnsw_nearest in deployed rules as a keyed view.
Problem. A persistent rule that keeps the candidates within a distance of each query vector (within_radius<R, Id, D> over a distance such as D = cosine(QV, V)) is not maintained: it is refused with inputlayer_views_pending{reason="vector"} and every read evaluates it, comparing every query vector with every candidate. Distance functions in deployed rules arrive with VV1 (#323).
Target. A keyed within-radius operator in the view maintainer, beside the top-k operator of #327 (src/view_maintainer/nearest.rs): per distinct query key the candidates within radius R, with their distances; on query-key insert or change one radius search of the index (exact below engine.vector_exact_rows); on candidate insert or vector change an exact distance check against every key (O(keys)); on candidate delete removal from the keys holding it, with no refill. Row-level deltas at the commit's revision; distances computed with the index's own measure, so a view and a read agree to the bit; semantics and event table in vectors.mdx next to the top-k one.
Acceptance. Oracle on random histories (query-key inserts/changes, candidate inserts/deletes/updates): exact-mode results equal recompute at every revision; the operator's state equals a fresh evaluation after every event; candidate insert with 10,000 keys <= 10 ms p50 and query-vector change <= 3 ms p50 at 1M x 384-dim on the benchmark host.
Size M. Dependencies VV1 (#323), #327 (top-k operator). Order slot 8.
Activity
jsam commentedon Oct 10, 2026
The keyed within-radius operator landed in https://github.com/inputlayer/inputlayer-symbolic/pull/106, https://github.com/inputlayer/inputlayer-symbolic/pull/109 and its insert bar is met at 1M. The query-vector change measured 4.9 ms against a 3 ms bar. Remaining work continues in https://github.com/inputlayer/inputlayer-symbolic/issues/133.