Chapter 11 · Retrieval and memory
Vector databases
A vector database stores embeddings and finds the nearest ones to a query quickly.
Chapter 11 · Retrieval and memory
A vector database stores embeddings and finds the nearest ones to a query quickly.
Every stored document is a point on the map.
A vector database keeps points and answers one question fast: which stored points are closest to this one?
You met embeddings: a list of numbers that captures meaning. A document, a photo or a song can each get one. Similar things get nearby vectors.
Search the map, add your own sentence and watch it land on the ring of topics, then switch on the index and compare how many documents were checked.
A teaching toy: vectors are hand-made over 8 topics and the map flattens them onto a ring. Words this tiny model does not know add nothing, so a document of unknown words sits in the middle. Real databases hold learned vectors with hundreds of dimensions and use smarter indexes.
What does a vector database mainly do?
Why use an index?
What is the trade-off of approximate search?