⚠️ 待更新·2026-08-29核验 · 更新时间待核验 · 本文信息可能已过期,请以官方文档为准
更新时间:2026-08-29 · 核验状态:待更新 · 官方溯源待补
引言
检索增强生成(RAG)离不开向量库。免费方案按部署形态分三类:托管云免费层、Serverless 入门层、自部署开源库。本文按数据规模给出推荐路径。
主流方案
| 方案 |
免费额度 |
部署形态 |
| Supabase pgvector |
500MB |
托管 Postgres |
| Qdrant Cloud |
1GB 集群 |
托管 |
| Pinecone Starter |
1 索引、10 万向量 |
Serverless |
| Weaviate WCS |
14 天沙箱 |
托管 |
| Chroma |
无限 |
自部署 |
| Milvus Lite |
无限 |
嵌入式 |
调用示例(Qdrant Cloud)
from qdrant_client import QdrantClient
from qdrant_client.models import Distance, VectorParams, PointStruct
client = QdrantClient(url="https://xxx.aws.cloud.qdrant.io", api_key="...")
client.recreate_collection(
collection_name="docs",
vectors_config=VectorParams(size=1536, distance=Distance.COSINE))
client.upsert(collection_name="docs",
points=[PointStruct(id=1, vector=[0.1]*1536, payload={"text": "hello"})])
hits = client.search(collection_name="docs", query_vector=[0.1]*1536, limit=5)
选型建议
<10 万向量用 Supabase pgvector 最省心;10 万–100 万用 Qdrant Cloud 或 Pinecone Starter;>100 万自部署 Chroma/Milvus。迁移走 LangChain VectorStore 接口避免锁定。
⚠️ Pending Update · 2026-08-29 Verification · Content may be outdated, please refer to official docs
Updated: 2026-08-29 · Status: Pending Verification
Introduction
Retrieval-Augmented Generation (RAG) needs a vector store to hold embeddings and answer similarity queries. Free options fall into three deployment shapes: managed cloud free tiers, serverless starter tiers, and self-hosted open-source libraries. The right choice depends less on feature checklists than on your data scale and operational appetite — a 50K-vector prototype and a 10M-vector production index point to very different tools, and over-engineering the former or under-engineering the latter are equally common mistakes. Hybrid filtering is another dimension worth knowing: Qdrant, Weaviate, and pgvector all support pre-filtering by metadata before vector search, which lets you restrict results to a tenant, a date range, or a document set without a second query. Pinecone's serverless tier also supports this, but the syntax differs, so choosing a store with familiar filter semantics can save real engineering time when your schema grows complex.
Mainstream Options
| Option |
Free Quota |
Deployment |
| Supabase pgvector |
500MB database |
Managed Postgres |
| Qdrant Cloud |
1GB cluster (~50K vectors) |
Managed |
| Pinecone Starter |
1 index, 100K vectors, 1536 dim |
Serverless |
| Weaviate WCS |
14-day sandbox |
Managed |
| Chroma |
Unlimited (local resources) |
Self-hosted |
| Milvus Lite |
Unlimited (local resources) |
Embedded |
Call Example (Qdrant Cloud)
from qdrant_client import QdrantClient
from qdrant_client.models import Distance, VectorParams, PointStruct
client = QdrantClient(url="https://xxx.aws.cloud.qdrant.io", api_key="...")
client.recreate_collection(
collection_name="docs",
vectors_config=VectorParams(size=1536, distance=Distance.COSINE))
client.upsert(collection_name="docs",
points=[PointStruct(id=1, vector=[0.1]*1536, payload={"text": "hello"})])
hits = client.search(collection_name="docs", query_vector=[0.1]*1536, limit=5)
Selection Guide
For fewer than 100K vectors, Supabase pgvector is the least-friction choice — you reuse a managed Postgres instance and query with standard SQL, avoiding a separate component to operate, and most teams already have Postgres skills. Between 100K and 1M vectors, Qdrant Cloud or Pinecone Starter hit the sweet spot of managed convenience and adequate capacity. Above 1M vectors or when throughput matters, self-host Chroma or Milvus, or upgrade to a paid tier. To avoid lock-in, access your store through a standard interface like LangChain's VectorStore abstraction, so you can swap the backend without rewriting application code when scale or pricing forces a migration. Finally, measure recall against a brute-force baseline before trusting any vector store for production. Approximate nearest neighbor search trades recall for speed, and the default tuning on managed tiers prioritizes latency, which can silently drop relevant results. A small test set with known ground truth, compared against exact search, tells you whether your store's defaults are acceptable or need tightening — and this check is free regardless of which tier you use.