Vector DB (Vector Database)
Specialized storage for fast search of nearest semantic vectors. The heart of any RAG system.
Why is it needed
A regular database searches for exact matches: «cat» won’t find «kitten». A vector database stores embeddings and can search by semantic proximity.
| Regular Database (SQL) | Vector Database | |
|---|---|---|
| Search Type | Exact Match | Semantic |
| «kitten» by the query «cat» | Won’t find | Will find |
| Application | Structured data | RAG, semantic search |
How it works
- Each document is turned into a vector.
- Vectors are stored in the database.
- When a query is made, its vector is compared to the stored ones.
- The database returns the closest by cosine similarity.
Which one to choose
| Database | When to choose |
|---|---|
| Qdrant | Production, metadata filters |
| Pinecone | Managed cloud |
| ChromaDB | Prototypes |
| FAISS | Local search |
| Weaviate | Out-of-the-box hybrid search |
| Milvus | Large scale |