What is a flat index and when should you use exact search?
RAG & Vector DB Interview: HNSW, IVF, Product Quantization, ANN Search Explained
Audio flashcard · 0:28Nortren·
What is a flat index and when should you use exact search?
0:28
A flat index stores vectors without any approximation structure and compares the query against every vector, guaranteeing exact top-k results. It is the baseline for correctness and the only choice when recall must be 100 percent, such as for deduplication, legal discovery, or benchmarking an ANN index against ground truth. Flat search is practical up to a few hundred thousand vectors on CPU or a few million on GPU. Beyond that, linear scan latency becomes unacceptable and you must switch to HNSW or IVF with quantization.
github.com