From 55e0595da7e91bab412fad0e53035cc2b4715afb Mon Sep 17 00:00:00 2001 From: Mark Hildebrand Date: Fri, 6 Feb 2026 09:56:31 -0800 Subject: [PATCH 1/2] Expand docs on selection of `PruneKind`. --- diskann/src/graph/config/mod.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/diskann/src/graph/config/mod.rs b/diskann/src/graph/config/mod.rs index 65a413ada..63b6d473f 100644 --- a/diskann/src/graph/config/mod.rs +++ b/diskann/src/graph/config/mod.rs @@ -555,6 +555,24 @@ impl Builder { /// Construct a new builder with the basic values. /// /// All other parameters will use their default values. + /// + /// # Note + /// + /// The choice of [`prune_kind`](PruneKind) is distance-function-dependent and can have a + /// profoundly negative impact on the graph quality if chosen incorrectly. When in doubt + /// prefer to use [`diskann_vector::distance::Metric`]'s conversion function like the + /// example below: + /// ```rust + /// use diskann::graph::{Config, config}; + /// use diskann_vector::distance::Metric; + /// + /// let _ = config::Builder::new( + /// 10, + /// config::MaxDegree::default_slack(), + /// 20, + /// (Metric::L2).into() + /// ); + /// ``` pub fn new( pruned_degree: usize, max_degree: MaxDegree, From 1a6ae7b1f76bec39d2c3a735766d9b249272f5a6 Mon Sep 17 00:00:00 2001 From: Mark Hildebrand Date: Fri, 6 Feb 2026 10:52:35 -0800 Subject: [PATCH 2/2] Update diskann/src/graph/config/mod.rs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- diskann/src/graph/config/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/diskann/src/graph/config/mod.rs b/diskann/src/graph/config/mod.rs index 63b6d473f..502c56530 100644 --- a/diskann/src/graph/config/mod.rs +++ b/diskann/src/graph/config/mod.rs @@ -563,7 +563,7 @@ impl Builder { /// prefer to use [`diskann_vector::distance::Metric`]'s conversion function like the /// example below: /// ```rust - /// use diskann::graph::{Config, config}; + /// use diskann::graph::config; /// use diskann_vector::distance::Metric; /// /// let _ = config::Builder::new(