# microsoft/SPTAG

A distributed approximate nearest neighborhood search (ANN) library which provides a high quality vector index build, search and distributed online serving toolkits for large scale vector search scenario.

Repository: https://github.com/microsoft/SPTAG
Canonical: https://ross.abutalabs.com/products/sptag
Language: C++
License: MIT
License Family: permissive
Topics: space-partition-tree, neighborhood-graph, vector-search, fresh-update, distributed-serving, approximate-nearest-neighbor-search
Last push: 2026-08-21T05:25:04+00:00

## Health v2 (maintenance only)
Score: 76/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 98, release rhythm 35, longevity 100
- inputs: {"age_days": 2912, "days_push": 12, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 5012, forks 620 (observed 2026-08-28T04:09:04.634824+00:00)

## What it is
SPTAG is a C++ library from Microsoft for large-scale approximate nearest neighbor (ANN) vector search, offering kd-tree/balanced k-means tree plus relative neighborhood graph index structures. It supports online vector insertion and deletion (fresh update) and distributed online serving across multiple machines.

## Use cases
- build a vector index over billions of embeddings for similarity search
- serve nearest neighbor queries across multiple machines
- support online insertion and deletion of vectors without full reindexing
- power semantic search or recommendation retrieval with L2 or cosine distance
- integrate ANN search into a C++ or Python application

## When to choose
- you need billion-scale vector search with high recall and low latency
- you require distributed online serving of vector queries
- you need incremental updates (insert/delete) on a live index
- you want a battle-tested Microsoft research library with MIT licensing

## When to avoid
- you need a turnkey managed vector database with filtering and CRUD APIs
- your dataset is small enough that brute-force or simpler libraries (FAISS, Annoy) suffice
- you cannot build C++ dependencies like SPDK, Boost, and SWIG
- you need heavy relational query support on top of vector search

## Facets
- artifact type: library
- maturity: active
- function: search-engine, vector-database, machine-learning
- domain: machine-learning, databases, big-data
- platform: cpp, python
- tags: approximate-nearest-neighbor, vector-search, ann, distributed-serving, kd-tree, neighborhood-graph, fresh-update, microsoft-research, search, linux, docker

## Member repositories
- microsoft/SPTAG (main) score 76

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:04.634824+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:17:32.979522+00:00, confidence not recorded.
  - readme: https://github.com/microsoft/SPTAG (fetched 2026-08-28T04:09:04.634824+00:00, sha 2b9ffb342cf6)
- Data as of 2026-08-30T08:39:29.467469+00:00.
