711
Dictionary

Vector Index

A data structure that makes nearest-neighbor search fast.

1 min readupdated 2026-07-04

/ quick answer

A vector index (HNSW, IVF, ScaNN) organizes embeddings so you can find the top-k neighbors in milliseconds instead of scanning every row. Trade-off: build time and memory. A data structure that makes nearest-neighbor search fast.

A data structure that makes nearest-neighbor search fast. A vector index (HNSW, IVF, ScaNN) organizes embeddings so you can find the top-k neighbors in milliseconds instead of scanning every row. Trade-off: build time and memory. In practice: pgvector's HNSW index on a 1M-row table returns top-10 neighbors in ~5ms.
Definition
A vector index (HNSW, IVF, ScaNN) organizes embeddings so you can find the top-k neighbors in milliseconds instead of scanning every row. Trade-off: build time and memory.
Example
pgvector's HNSW index on a 1M-row table returns top-10 neighbors in ~5ms.
Related Tool Stacks

/ frequently asked

What is Vector Index?

A vector index (HNSW, IVF, ScaNN) organizes embeddings so you can find the top-k neighbors in milliseconds instead of scanning every row. Trade-off: build time and memory.

What is an example of Vector Index?

pgvector's HNSW index on a 1M-row table returns top-10 neighbors in ~5ms.

Why does Vector Index matter?

A data structure that makes nearest-neighbor search fast.

What should I learn after Vector Index?

Open the related workflows and prompts further down this page: they show how this idea is applied in a real task, step by step.

/ continue exploring

Related concepts

The vocabulary this page depends on.

  • →Retrieval

    Selecting the most relevant chunks for a query before generation.

  • →RAG (Retrieval-Augmented Generation)

    Inject external knowledge into an LLM at query time.

  • →Agentic RAG

    RAG where an agent decides what to retrieve, when, and from which source — instead of a single static query.

  • →Embedding

    A numerical vector representation of text, image or audio that captures meaning for similarity search.

all dictionary →

Related workflows

Turn this into a repeatable process.

all workflows →

Related tool stacks

The tools that run it in production.

all tool stacks →

Comparisons & alternatives

Pick between the options.

all comparisons →