Skip to content

[diskann] Add note on the selection of PruneKind in graph::config::Builder.#734

Merged
hildebrandmw merged 2 commits intomainfrom
mhildebr/builder-docs
Feb 6, 2026
Merged

[diskann] Add note on the selection of PruneKind in graph::config::Builder.#734
hildebrandmw merged 2 commits intomainfrom
mhildebr/builder-docs

Conversation

@hildebrandmw
Copy link
Contributor

Add a note to diskann::graph::config::Builder::new() highlighting the conversion from diskann_vector::distance::Metric to diskann::graph::config::PruneKind.

Incorrectly selecting PruneKind can have a profoundly negative impact on recall.

@hildebrandmw hildebrandmw requested review from a team and Copilot February 6, 2026 17:59
@hildebrandmw hildebrandmw added the documentation Improvements or additions to documentation label Feb 6, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds developer-facing documentation to diskann::graph::config::Builder::new() to warn that selecting the wrong PruneKind for a given distance metric can significantly harm graph quality/recall, and shows an example of deriving PruneKind from diskann_vector::distance::Metric.

Changes:

  • Add a rustdoc “Note” section to Builder::new() explaining that PruneKind selection depends on the distance function.
  • Add a rustdoc example showing how to convert Metric into PruneKind when constructing a config::Builder.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov-commenter
Copy link

codecov-commenter commented Feb 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.31%. Comparing base (f3fcaae) to head (1a6ae7b).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #734      +/-   ##
==========================================
+ Coverage   89.01%   90.31%   +1.30%     
==========================================
  Files         428      428              
  Lines       78294    78294              
==========================================
+ Hits        69692    70710    +1018     
+ Misses       8602     7584    -1018     
Files with missing lines Coverage Δ
diskann/src/graph/config/mod.rs 98.07% <ø> (ø)

... and 39 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@hildebrandmw hildebrandmw merged commit 3055358 into main Feb 6, 2026
20 checks passed
@hildebrandmw hildebrandmw deleted the mhildebr/builder-docs branch February 6, 2026 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants