Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@aigentic/diskann

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aigentic/diskann

DiskANN/Vamana — SSD-friendly billion-scale approximate nearest neighbor search with product quantization

alpha
latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

@aigentic/diskann

DiskANN/Vamana approximate nearest neighbor search — built in Rust, runs on all platforms.

Implements the Vamana graph algorithm from "DiskANN: Fast Accurate Billion-point Nearest Neighbor Search on a Single Node" (NeurIPS 2019).

Install

npm install @aigentic/diskann

Usage

const { DiskAnn } = require('@aigentic/diskann');

const index = new DiskAnn({ dim: 128 });

// Insert vectors
for (let i = 0; i < 1000; i++) {
  const vec = new Float32Array(128);
  for (let d = 0; d < 128; d++) vec[d] = Math.random();
  index.insert(`vec-${i}`, vec);
}

// Build Vamana graph
index.build();

// Search
const query = new Float32Array(128).fill(0.5);
const results = index.search(query, 10);
console.log(results); // [{ id: 'vec-42', distance: 0.123 }, ...]

// Persist
index.save('./my-index');
const loaded = DiskAnn.load('./my-index');

Performance

MetricValue
Search latency55µs (5K vectors, 128d, k=10)
Recall@100.998
Build~6s for 5K vectors

API

See full documentation at github.com/ruvnet/ruvector.

License

MIT

Keywords

diskann

FAQs

Package last updated on 21 May 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts