← Back to Leaderboard
Cphilippgille

philippgille/chromem-go

In-process Go vector database for RAG without a separate database server

View on GitHub ↗
Engineering Health (Methodology)
B · 60/100
Maintenance Activity
● Updated 2mo ago
Latest Release
v0.7.0
Commercial License Check
MPL-2.0 · Weak Copyleft

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance20/35
Fork Adoption14/25
Release Cadence11/20
License Clarity15/20
Total Stars
★ 1,077
24h Growth
+0
7d Growth
+1
Forks
81

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

philippgille/chromem-go Star History (2024-01-09 - 2026-12-04) ALL-TIME STAR HISTORY (2024-01 – 2026-12) +1.1k in 1060d · avg +1/day 1.1k 569 0 2024-01-09: ★ 12024-03-16: ★ 92024-05-25: ★ 792024-08-03: ★ 1752024-10-12: ★ 2352024-12-21: ★ 3462025-03-01: ★ 4242025-05-10: ★ 5332025-07-19: ★ 6222025-09-27: ★ 7122025-12-06: ★ 7852026-02-14: ★ 8442026-04-25: ★ 9182026-07-04: ★ 1,0142026-09-12: ★ 1,0542026-12-04: ★ 1,077 ★ 1.1k 2024-01 2025-06 2026-12

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

chromem-go is an in-process vector database. db.go, collection.go, and document.go define its database, collection, and document structure; query.go and vector.go cover retrieval and vector operations, while persistence.go handles storage. The module declares Go 1.21 and has no third-party library dependencies. Its collection API is inspired by Chroma, but it neither connects to nor requires a Chroma server.

Documents can carry precomputed embeddings or get them from the collection’s EmbeddingFunc. Text queries use that function to obtain a query vector, then rank eligible documents by cosine similarity using an exhaustive scan. Ingestion and query processing can use Go concurrency. The application owns the rest of the RAG pipeline: it decides how to prepare documents, assemble prompts, and invoke the LLM.

Key Capabilities & Differentiators

The exact cosine search supports metadata equality filters and document substring inclusion or exclusion via $contains and $not_contains. v0.7.0 adds negative-query handling that can filter regular results or subtract a negative similarity contribution. Embedding adapters cover hosted providers including OpenAI, Azure OpenAI, Vertex AI, Cohere, Mistral, Jina, and mixedbread.ai, plus local endpoints such as Ollama, llmman, and LocalAI.

The default store is in memory. Optional immediate persistence writes a gob file per collection and document, with optional gzip compression. Whole-database export/import is a separate mechanism with optional gzip and AES-GCM encryption. v0.7.0 extends export/import to object storage such as S3; it does not make object storage the live query backend.

Trade-offs & Limitations

Embedding the database avoids a retrieval-service network hop and a separate deployment, though a remote embedding provider can still add latency and cost. In the published BenchmarkCollection_Query table on a Core i5-1135G7, queries took about 0.52 ms at 1,000 documents and 39.4 ms at 100,000. Use these figures as a reference for that workload, not as end-to-end RAG latency. Exact scans do more work as the number and dimensionality of candidate vectors increase, and persistence does not remove the need to keep the data in RAM.

Pinecone is the managed alternative if the vector layer needs to be a shared service rather than a library inside one application. Chroma is a closer API reference, but the similar collection calls do not establish compatibility. Before adopting chromem-go, benchmark with your actual vector dimensions, filters, and concurrent load. If you enable immediate persistence, also test write throughput and file counts on the target filesystem.

Hardware & Deployment Guide

Build chromem-go into a Go application using the module’s declared Go 1.21 baseline. chromem.NewDB() starts an in-memory database without a database daemon or container. A nil embedding function selects OpenAI and requires OPENAI_API_KEY when generating embeddings. For an offline text-query path, configure a locally running embedding endpoint such as Ollama or supply an embedding function that runs locally. If using file persistence, give the application a writable directory on durable storage and test backup restoration.

Pin the dependency and review the changelog before upgrades: the API is beta and can change before v1.0.0. v0.5.0 added single-file database export/import with optional compression and encryption. v0.6.0 added collection document deletion and experimental WebAssembly bindings. v0.7.0 added object-storage export/import and changed the license from AGPL to MPL-2.0.

Runtime: Go 1.21 module with no third-party library dependencies or separate database process.
Search: Concurrent exhaustive cosine ranking, with exact metadata matches and $contains / $not_contains document filters.
Embeddings: Hosted and local adapters, custom EmbeddingFunc support, and ingestion of existing vectors.
Persistence: Immediate per-collection and per-document gob files, with optional gzip; the query dataset remains in RAM.
Backups: Whole-database export/import supports optional gzip and AES-GCM; v0.7.0 adds object-storage workflows such as S3.
Benchmark: About 0.52 ms at 1,000 documents and 39.4 ms at 100,000 in BenchmarkCollection_Query on a Core i5-1135G7.
Best For

A single-process Go application that needs RAG or semantic search over a corpus that fits in RAM and meets its latency target under exact scans.

Skip If

You need a shared database service across replicas, approximate nearest-neighbor indexing, or a corpus that cannot fit comfortably in application memory.

Reviewed on 2026-12-03 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

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

Comparison vs. Top RAG, Data & Memory Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
chromem-go ★1.1k+1GoMPL-2.0In-process Go vector database for RAG without a separate database server
zvec16.3k+29C++Apache-2.0In-process C++ vector database for local hybrid retrieval
txtai13.8k+33PythonApache-2.0A Python embeddings database for vector, SQL, and graph retrieval in self-hosted
LightRAG41k+110PythonMITGraph-backed RAG for cross-document retrieval and multimodal indexing

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/philippgille/chromem-go.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

philippgille/chromem-go Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about chromem-go

How do I integrate chromem-go into a Go RAG application?

Import the Go module, create a database with chromem.NewDB(), and create a collection. Use AddDocuments to load content and Query to retrieve matches. Pass a custom EmbeddingFunc or supply existing document vectors if you want to manage embedding generation yourself. Your application passes the retrieved content to the LLM.

Does it need a GPU, and how should I size the host?

The database itself does not require a GPU or VRAM. Size RAM for the resident vectors, document content, and metadata, plus working memory for concurrent queries. Size CPU capacity for exact scans. If Ollama runs on the same host, budget for its model separately; its hardware requirements depend on the chosen model and runtime settings.

Can I embed it in a proprietary product or self-host it?

v0.7.0 uses MPL-2.0, which permits commercial embedding and self-hosting. If you distribute the application, MPL-covered files, including modified versions, remain subject to the license’s source-availability requirements; separate proprietary files are not automatically covered. Check the license for the version you ship, since earlier releases used AGPL, and review any external embedding provider’s terms separately.

When should I choose chromem-go over Pinecone or Chroma?

Choose chromem-go when retrieval belongs in one Go process and your corpus fits the host’s RAM and latency budget. Consider Pinecone if you need a managed vector service shared by multiple applications. Choose Chroma if your integration depends on Chroma itself: chromem-go borrows the collection API style but is not a Chroma client or a drop-in implementation.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining philippgille/chromem-go? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature philippgille/chromem-go on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare