antgroup/vsag

vsag is a vector indexing library used for similarity search.

What it solves

Finding similar items in huge collections of vectors (like embeddings) quickly, even when the data does not fit in memory. VSAG provides indexing algorithms that trade a small amount of accuracy for large speed gains, so applications can search millions of vectors in milliseconds rather than seconds.

How it works

VSAG builds indexes from vectors using graph-based and other efficient algorithms. It offers two headline index types: SINDI for sparse vectors (where most coordinates are zero) and HGraph for dense vectors. The library can automatically generate tuning parameters based on the data's dimensions and scale, so developers do not need to understand the internal algorithm details. It is written in C++ and provides Python (pyvsag) and Node.js/TypeScript (vsag) bindings. The API is simple: create an index, build it from vectors, then run a k-nearest-neighbor search.

Who it's for

Developers building applications that need fast similarity search over large embedding sets — for example, recommendation systems, search engines, or retrieval-augmented generation pipelines. It is also useful for database teams integrating vector search into their products; the README lists OceanBase, TuGraph, GreptimeDB, Hologres, and PolarDB as users.

Highlights

  • C++ core with Python and Node.js/TypeScript bindings.
  • SINDI sparse index: over 166% higher QPS than the prior state-of-the-art (Zilliz) at 98% recall in internal tests on a 40-core CPU.
  • HGraph dense index: more than 100% higher QPS than Glass and over 300% higher than HNSWLIB at 90% recall on the GIST dataset (ann-benchmarks).
  • Automatic parameter generation based on data dimensions and scale.
  • C++17 public API, CMake integration, and source build options.
  • Active roadmap including GPU-accelerated construction, hybrid dense-sparse search, and lightweight deployment.
  • Open source, with a community Discord and contribution guidelines.

Related

  • Project
  • Project
  • Project
  • Project
  • Project