What is a vector database?

A vector database stores embeddings and finds the ones nearest to a query embedding quickly. It is the index behind semantic search and retrieval-augmented generation. It can be a dedicated product or an extension of a regular database, such as pgvector for PostgreSQL, which keeps vectors next to the rest of your data.

Nearest-neighbour search over millions of vectors uses approximate indexes such as HNSW or IVF, trading a little accuracy for a lot of speed.

For a personal library of hundreds or thousands of papers, a single Postgres database with pgvector is plenty.

Read next

The whole glossary →

Help PaperLab reach the next researcher

PaperLab is free, open source and built by one person. A star helps other researchers find it and puts each new release in your GitHub feed. The PaperLab page on LinkedIn posts a weekly breakdown of how one feature works.