← All examples · Home

03. IVF approximate index (M4)

Instead of scanning every row, an IVF (inverted file index) clusters the corpus with k-means (GPU-assisted assignment). A query scores centroids, picks the nprobe nearest clusters, and scans only those rows. Tune nprobe to trade recall for speed. Index builds lazily on the first query after ingest. This example is GPU-only — there is no CPU fallback for IVF.

ready.