Skip to content

Vector Database in Practice

Introduction

  • Source: Qdrant、Chroma、Pinecone
  • Prerequisites: Python basics, understanding of Embedding concepts
  • Programming language: Python
  • Course difficulty: 🌟🌟
  • Estimated study hours: 10+

Vector databases are the "memory" component of RAG systems. Traditional databases store structured data (rows and columns); vector databases store vectors (Embeddings) — numerical semantic representations of text, images, and other content. Their core capability: given a query, quickly find the most semantically similar vectors.

This capability is called "Approximate Nearest Neighbor search" (ANN) — the underlying engine that lets RAG systems quickly retrieve relevant knowledge. Without a vector database, RAG would need to brute-force scan all documents — completely impractical at scale.

Course Resources

Resource Summary

Comparison of major vector databases:

Database Open Source Managed Service Characteristics Best For
Chroma ✅ ✅ Pure Python, zero config, in-memory/persistent Local development, prototyping
Qdrant ✅ ✅ Rust implementation, high performance, supports filtered + vector hybrid search Production environments
Milvus ✅ ✅ Distributed architecture, billion-scale vectors Large-scale vector search
Weaviate ✅ ✅ GraphQL API, rich built-in modules Flexible query requirements
Pinecone ❌ ✅ Fully managed, zero ops Fast time to market, no ops overhead
pgvector ✅ ✅ PostgreSQL extension Already using PG, don't want new components

Hands-on tutorials:

Embedding model selection:

Notes

Recommended path: Chroma (local development) → Qdrant (production deployment). Chroma requires no services to install — just pip install and go, perfect for learning. Qdrant single-node edition starts with one Docker command, feature-complete and a solid production choice.

pgvector is also worth watching — if your project already uses PostgreSQL, adding one extension gives you vector search without introducing any new components.

Three key concepts to understand: Embedding (text → vector), ANN search (quickly finding similar vectors), and metadata filtering (vector similarity + structured condition hybrid queries).