What is an AI vector index?

A vector index is a data structure organising embedding vectors so those most similar to a query can be found without scanning the whole collection, usually through approximate nearest neighbour methods giving a very close result far faster than an exact one.

Unlike a vector database, which adds storage, metadata filtering, updates, backup and access management, a vector index is only the structure speeding search. Vector search is the operation run on it.

Topic
Embeddings, document processing and RAG
Also known as
ANN index

How an AI vector index works

  1. A flat index compares every vector with the query; results are exact but slow on large collections.
  2. Graph-based indexes such as Hierarchical Navigable Small World build a layered graph linking vectors to neighbours, speeding search by walking it.
  3. Cluster-based indexes such as Inverted File Index group vectors into clusters, scanning only the nearest few at query time.
  4. Quantisation compresses vectors to save memory; settings such as how many clusters or neighbours to search set the speed and accuracy balance.

In more detail

Metadata-filtered ANN

In real-world enterprise RAG, vector search is rarely purely unconditional; queries carry metadata constraints such as department, date range or clearance level. Post-filtering (applying filters after ANN retrieval) can return too few or even zero matching results, whereas naive pre-filtering can break graph connectivity in HNSW; modern engines therefore use filtered-ANN traversal (inline predicate evaluation) or partitioned indexes.

Deletes, updates and compaction

When documents are frequently updated or deleted, graph-based indexes like HNSW cannot easily remove nodes without degrading navigation paths; deletions are typically marked as soft-delete tombstones. Over time, accumulated tombstones waste memory and lower recall, requiring scheduled index compaction or background segment merges.

Disk-based graph indexes and memory budgeting

Standard HNSW keeps both vectors and graph links in RAM, creating steep memory costs at tens of millions of chunks (e.g., 10M 1536-dimensional float32 vectors require roughly 60 GB for raw vectors alone before graph overhead). Disk-backed graph algorithms such as DiskANN (Vamana) and hybrid setups combining HNSW with Scalar Quantisation (SQ8), Product Quantisation (PQ) or Binary Quantisation store compressed representations in memory and fetch full vectors from NVMe SSDs for reranking.

The evaluation metric and build and query parameters

Index accuracy is measured against exact brute-force search using Recall@k (the fraction of true top-k nearest neighbours actually returned by the approximate index). Tuning construction parameters such as HNSW's M and efConstruction alongside query-time parameters like efSearch or IVF's nprobe lets teams trace the exact Recall@k versus QPS (queries per second) Pareto frontier.

Commonly confused terms

TermHow it differs
Vector searchA vector index is the underlying organised data structure, while vector search is the query-time retrieval operation executed over that index.
Inverted indexAn inverted index maps discrete keywords or tokens to posting lists for exact/lexical matching (e.g. BM25), whereas a vector index organises continuous dense (or sparse learned) vectors by geometric proximity in high-dimensional space.

Why an AI vector index matters for on-premises AI

In in-house RAG a vector index searches millions of chunks in milliseconds; its type sets memory, disk, speed and accuracy together. Graph-based indexes often give high accuracy but need much memory; clustering and quantisation save memory at some cost to accuracy. Support for adding and deleting documents also varies by type. The right setup comes from measuring both accuracy and latency on the organisation's own data.

ON-PREMISES EXAMPLE

Indexing tens of millions of claim notes, an insurer finds a graph-based index does not fit in memory; it moves to clustering with quantisation, checking the accuracy loss on its own questions.

Common questions

How does a vector index differ from a vector database?

A vector index is the data structure that speeds search. A vector database adds storage, filtering, updates and access management.

Are approximate search results reliable?

Most settings find most of the true nearest neighbours. Accuracy is measured and can be raised through settings, at the cost of slower search.

Sources

In the glossary: Glossary, R to Z

What does this term mean for your infrastructure?

We can work out together in a technical assessment how it maps onto your data, hardware and security requirements.

Request a technical assessment →

This site sets no cookies. Visitor numbers are counted in aggregate using a cookieless method that does not identify anyone. See the Privacy Policy for details.