AgentSkillsCN

vector-databases

在“向量数据库”、“嵌入存储”、“相似性搜索”、“语义搜索”、“Chroma”、“ChromaDB”、“FAISS”、“Qdrant”、“RAG检索”、“k-NN搜索”、“向量索引”、“HNSW”、“IVF”时使用

SKILL.md
--- frontmatter
name: vector-databases
description: Use when "vector database", "embedding storage", "similarity search", "semantic search", "Chroma", "ChromaDB", "FAISS", "Qdrant", "RAG retrieval", "k-NN search", "vector index", "HNSW", "IVF"
version: 1.0.0

Vector Databases

Store and search embeddings for RAG, semantic search, and similarity applications.

Comparison

DatabaseBest ForFilteringScaleManaged Option
ChromaLocal dev, prototypingYes< 1MNo
FAISSMax speed, GPU, batchNoBillionsNo
QdrantProduction, hybrid searchYesMillionsYes
PineconeFully managedYesBillionsYes (only)
WeaviateHybrid search, GraphQLYesMillionsYes

Chroma

Embedded vector database for prototyping. No server needed.

Strengths: Zero-config, auto-embedding, metadata filtering, persistent storage Limitations: Not for production scale, single-node only

Key concept: Collections hold documents + embeddings + metadata. Auto-embeds text if no vectors provided.


FAISS (Facebook AI)

Pure vector similarity - no metadata, no filtering, maximum speed.

Index types:

  • Flat: Exact search, small datasets (< 10K)
  • IVF: Inverted file, medium datasets (10K - 1M)
  • HNSW: Graph-based, good recall/speed tradeoff
  • PQ: Product quantization, memory efficient for billions

Strengths: Fastest, GPU support, scales to billions Limitations: No filtering, no metadata, vectors only

Key concept: Choose index based on dataset size. Trade accuracy for speed with approximate search.


Qdrant

Production-ready with rich filtering and hybrid search.

Strengths: Payload filtering, horizontal scaling, cloud option, gRPC API Limitations: More complex setup than Chroma

Key concept: "Payloads" are metadata attached to vectors. Filter during search, not after.


Index Algorithm Concepts

AlgorithmHow It WorksTrade-off
FlatCompare to every vectorPerfect recall, slow
IVFCluster vectors, search nearby clustersGood recall, fast
HNSWGraph of neighborsBest recall/speed ratio
PQCompress vectorsMemory efficient, lower recall

Decision Guide

RequirementRecommendation
Quick prototypeChroma
Metadata filteringChroma, Qdrant, Pinecone
Billions of vectorsFAISS
GPU accelerationFAISS
Production deploymentQdrant or Pinecone
Fully managedPinecone
On-premise controlQdrant, Chroma

Resources