feat(sindi): integrate reasoning mechanism for search diagnostics#2405
feat(sindi): integrate reasoning mechanism for search diagnostics#2405LHT129 wants to merge 1 commit into
Conversation
Merge Protections🟢 All 3 merge protections satisfied — ready to merge. Show 3 satisfied protections🟢 Require kind label
🟢 Require version label
🟢 Require linked issue for feature/bug PRs
|
There was a problem hiding this comment.
Code Review
This pull request introduces search reasoning capabilities to the SINDI index by adding SearchWithRequest and integrating a ReasoningContext to record bucket selections, document visits, and filter rejections. The review feedback highlights several critical issues: potential null pointer dereferences for request.query_ and dataset_results, inefficient heap allocations and overwriting behavior in bucket selection recording, incorrect distance scaling when recording visits, and missing diagnostic records during the reordering stage.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
33e9e1f to
dd4c65d
Compare
|
All review feedback from @gemini-code-assist addressed in dd4c65d:
|
dd4c65d to
f5566ca
Compare
f5566ca to
f52f18a
Compare
f52f18a to
411aaf7
Compare
411aaf7 to
65347ab
Compare
|
/label S-waiting-on-review |
65347ab to
b359710
Compare
Add SearchWithRequest override to SINDI index to support reasoning context creation when expected_labels are provided. Track window accesses, candidate visits, and filter rejections during the search process. Attach reasoning report to search results for diagnostic analysis of sparse vector recall. Signed-off-by: LHT129 <tianlan.lht@antgroup.com> Co-authored-by: opencode <opencode@anthropic.com>
b359710 to
57b275e
Compare
Summary
Integrate the reasoning mechanism into the SINDI (Sparse Inverted Non-redundant Distance Index) to enable diagnostic analysis of sparse vector search recall.
Changes
src/algorithm/sindi/sindi.h: Added forward declaration forReasoningContext,SearchWithRequestoverride,AttachReasoningReportmethod, modifiedsearch_implandimmutable_search_implsignaturessrc/algorithm/sindi/sindi.cpp: ImplementedSearchWithRequest, added reasoning tracking in window loops (bucket selections, candidate visits, filter rejections), implementedAttachReasoningReportDesign
SINDI reasoning tracks:
Zero overhead when
reasoning_ctxis null.Related