← 返回横评对比台philippgille/chromem-go(工程健康 B 60/100)vs pgvector/pgvector(工程健康 B+ 71/100)多日涨星趋势对比。
开源 AI 头对头选型横评 (2026)
chromem-go vs pgvector
同属「知识库 / 爬虫 / 记忆层」赛道的横向对比:pgvector/pgvector 在总 Star 规模(★ 23.9k)与近期 7 日涨星势头上均处于领先;协议方面分别为 MPL-2.0 · 弱传染协议 与 自定义 / 待核查。
Star 净增曲线叠加对比(可嵌入文章 / README)
基于 RepoForAI 每 6 小时独立快照,支持自动适配 GitHub 深浅色主题。
核心指标横向对比
| 评估维度 | philippgille/chromem-go | pgvector/pgvector |
|---|---|---|
| 总 Star 规模 | ★ 1,077 | ★ 23,928 |
| 24h / 7d 增速 | +0 / +1 | +13 / +96 |
| 7 日涨星曲线 | ||
| 工程健康评分 | B · 60/100 | B+ · 71/100 |
| 部署形态标签 | GitHub Source | Docker · Self-Hosted |
| 主要语言栈 | Go | C |
| 商用协议评估 | MPL-2.0 · 弱传染协议 | 自定义 / 待核查 |
| 维护活跃度 | 2 个月前更新 | 今天刚更新 |
| 最新版本 | v0.7.0 | 主分支持续更新 |
| 典型适用场景 | 单进程 Go 应用需要 RAG 或语义搜索,语料能装入内存,且精确扫描实测满足时延预算 | 已经用 PostgreSQL 管理文档与业务数据的 RAG 或语义搜索系统,需要在一条 SQL 中做元数据过滤、关联查询和向量排序。先测精确检索,再按延迟目标决定是否引入近似索引 |
维护 chromem-go、pgvector 或同类竞品?在首页与 /alternatives 页置顶你的开源项目。
chromem-go · 亮点与快速安装
运行形态:Go 1.21 模块,不依赖第三方 Go 库,无需启动独立数据库进程。
检索机制:并发执行精确余弦相似度扫描,支持元数据等值过滤和正文
$contains、$not_contains 条件。向量接入:支持托管与本地嵌入服务,可注入
EmbeddingFunc,也可直接写入已有向量。本地持久化:集合和文档分别写入 gob 文件,可选 gzip;查询数据仍驻留内存。
import chromadb # setup Chroma in-memory, for easy prototyping. Can add persistence easily! client = chromadb.Client() # Create collection. get_collection, get_or_create_collection, delete_collection also available! collection = client.create_collection("all-my-documents") # Add docs to the collection. Can also update and delete. Row-based API coming soon! collection.add( documents=["This is document1", "This is document2"], # we handle tokenization, embedding, and indexing automatically. You can skip that and add your own embeddings as well metadatas=[{"source": "notion"}, {"source": "google-docs"}], # filter on these! ids=["doc1", "doc2"], # unique for each doc ) # Query/search 2 most similar results. You can also .get by id results = collection.query( query_texts=["This is a query document"], n_results=2, # where={"metadata_field": "is_equal_to_this"}, # opt
pgvector · 亮点与快速安装
接入方式:逐库启用
vector 扩展,通过现有 PostgreSQL 连接以 SQL 查询 embedding。复制与恢复:向量变更写入 PostgreSQL WAL,支持复制和时间点恢复。
HNSW:多层图无需训练,可通过
m、ef_construction 和 hnsw.ef_search 调节构建与搜索。IVFFlat:先装载有代表性的数据,再构建分桶索引;
ivfflat.probes 控制查询扫描的桶数。docker pull pgvector/pgvector:pg19-trixiechromem-go vs pgvector 常见问题 (FAQ)
chromem-go 和 pgvector 在开源协议与商用合规上有什么区别?
philippgille/chromem-go 采用 MPL-2.0 · 弱传染协议(文件级开源协议,允许作为独立库在商业闭源项目中链接调用。);pgvector/pgvector 采用 自定义 / 待核查(非标准或自定义协议,商用部署前建议前往 GitHub 查看 LICENSE 原文。)。
2026 年 chromem-go 与 pgvector 哪个社区增长更快?
按 RepoForAI 实时快照,chromem-go 总 Star 1,077(7日 +1),pgvector 总 Star 23,928(7日 +96),近期增速由 pgvector 领先。
团队技术选型时该如何二选一?
适合选用 chromem-go(Go):单进程 Go 应用需要 RAG 或语义搜索,语料能装入内存,且精确扫描实测满足时延预算;适合选用 pgvector(C):已经用 PostgreSQL 管理文档与业务数据的 RAG 或语义搜索系统,需要在一条 SQL 中做元数据过滤、关联查询和向量排序。先测精确检索,再按延迟目标决定是否引入近似索引。