Skip to main content

ANN_MIN_VECTORS

Constant ANN_MIN_VECTORS 

Source
pub const ANN_MIN_VECTORS: usize = 2_500;
Expand description

Minimum corpus size before an HNSW graph is worth building and caching. Below this, exact SIMD brute force is faster and exact (no recall loss). At 2500, a medium codebase (~7k chunks for lean-ctx itself) enters the HNSW path and gets sub-linear dense search; brute force remains the default for smaller projects where it is both simpler and just as fast.