Skip to content

Change search_buffer_visited_set_ default from false to true - #389

Open
yuejiaointel wants to merge 1 commit into
intel:mainfrom
yuejiaointel:feature/visited-set-default-on
Open

yuejiaointel wants to merge 1 commit into
intel:mainfrom
yuejiaointel:feature/visited-set-default-on

Conversation

@yuejiaointel

Copy link
Copy Markdown
Contributor

Summary

  • The visited-set search parameter (VamanaSearchParameters::search_buffer_visited_set_) skips redundant distance recomputation for candidates already seen during a search. It defaulted to false.
  • [C API] Implement memory estimation functions for index build and search #364 fixed a bug where this flag was silently dropped on the dynamic (Mutable) index's batch search path, making it impossible to enable there at all. With that fixed, this PR flips the default so the benefit is available without callers needing to know the flag exists.

Evidence

Ran a full regression campaign via the project's CI benchmark pipeline: 2 datasets (cohere-1m, dbpedia-1536) × 2 index modes (static, dynamic) × 3 distance metrics (MIP, Cosine, L2) × 4 storage variants (uncompressed-fp16, uncompressed-fp32, LeanVec, LVQ) = 48 combinations, k=100, recall targets 0.90/0.95, comparing the flag off vs on.

  • Every single combination showed a real 1.2x–1.4x QPS gain.
  • Zero recall cost in any combination (recall delta ≤0.0005 everywhere).
  • Zero regressions or exceptions found.

Caveat

Not independently verified outside the tested range (very low k, or recall targets well below 0.90) — the existing code comment already flags this as a "high-recall or high-neighbor regime" optimization. Callers with workloads clearly outside that regime should verify for their own case and set the flag to false explicitly if needed.

Test plan

  • Full regression matrix (48 configs) via CI benchmark pipeline, all passing iso-recall calibration gates
  • CI

🤖 Generated with Claude Code

intel#364 fixed the bug where this flag was silently dropped on the
dynamic index's batch search path. With that fixed, regression
testing (48 dataset/mode/metric/variant combinations, k=100, recall
0.90-0.95) showed a consistent 1.2x-1.4x QPS gain with no recall cost
and no regressions. Flipping the default makes this available without
users needing to know the flag exists.

Not verified outside the tested range (very low k, or recall well
below 0.90) -- set explicitly to false if a workload falls outside
the high-recall/high-neighbor regime and shows a regression.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant