AnnVectorIndexType
Enums · AiDotNet.RetrievalAugmentedGeneration.VectorSearch.Indexes
The approximate-nearest-neighbour structure backing an AnnVectorIndex.
Mirrors the FAISS index families but runs entirely on the AiDotNet Tensors stack.
For Beginners
This is the speed/memory/accuracy trade-off.
- Flat — exact brute-force. Perfectly accurate, no training. Best for small/medium sets.
- Ivf — clusters vectors and only scans the closest clusters. Much faster on large sets; approximate; trained.
- Pq — product quantization: compressed codes searched with asymmetric distance. Tiny footprint; trained.
- IvfPq — IVF over PQ-compressed residuals (FAISS’s workhorse). Smallest + fast; most approximate; trained.
Fields
| Field | Summary |
|---|---|
AnnVectorIndexType Flat |
Exact brute-force scan. |
AnnVectorIndexType Ivf |
Inverted file (coarse k-means) — probe the nearest lists only. |
AnnVectorIndexType IvfPq |
IVF over PQ-compressed residuals. |
AnnVectorIndexType Pq |
Product quantization — compressed codes + ADC search. |
int value__ |