RAG

Vector database

A vector database stores embeddings and searches for nearby vectors.

Query vectornearestnearestnearestAn index finds close vectors without comparing all of them.
A vector database stores embeddings and searches for nearby vectors. Values shown in the worked visual are illustrative unless the labels state otherwise.

How it works

It combines an approximate-nearest-neighbor index with metadata, filtering, and persistence. Retrieval quality still depends on embeddings and document preparation.

A concrete example

Illustrative: search 10 million 768-dimensional vectors and return the nearest 20 candidates.

Do not confuse it with Relational database

vector search ranks geometric similarity; relational queries match structured predicates and joins.

Study the full lesson