Vector database

A store that indexes embeddings so the nearest ones to a query can be found quickly.

Once documents are embedded, you need to search millions of vectors fast. Vector databases index them for approximate nearest-neighbour lookup, trading a little accuracy for a large speed gain.

Common options include pgvector inside Postgres, plus dedicated services. The choice matters less than chunking strategy, which is usually what actually determines retrieval quality.