← all repositories
philippgille/chromem-go

A vector database that compiles into your Go binary

chromem-go exists so Go applications can run vector search and RAG locally without dragging in a separate database or a pile of dependencies.

1k stars Go RAG · Search
chromem-go
Not currently ranked — collecting fresh signals.
star history

What it does

chromem-go is an in-memory vector database designed to be embedded directly into Go applications, offering a Chroma-inspired API for storing documents, generating embeddings, and performing cosine-similarity search. It handles nearest-neighbor queries, metadata filtering, and optional persistence to disk without requiring a client-server architecture or any third-party libraries. The project explicitly targets common use cases rather than massive scale, positioning itself as a lightweight, self-contained alternative to running a separate vector database service.

The interesting bit

The zero-dependency constraint is the real flex: every feature—from OpenAI and Ollama embedding integrations to AES-GCM-encrypted backups using generic io.Reader/io.Writer—is built with Go’s standard library and runtime alone. That makes it trivial to compile into a static binary or even target WebAssembly, turning vector search into just another local function call.

Key highlights

  • Ships with built-in embedding support for OpenAI, Azure, GCP Vertex, Cohere, Mistral, Jina, mixedbread.ai, Ollama, and LocalAI, plus a hook for custom functions.
  • Performs exact (brute-force) cosine-similarity search across collections, with optional metadata and content filters ($contains, exact match).
  • Persists data to gob-encoded files (optionally gzip-compressed) and supports full-database export/import with optional encryption.
  • Benchmarks on a 2020 Intel laptop show queries against 1,000 documents taking roughly 0.3 ms and 100,000 documents around 40 ms.
  • Currently supports text documents only; images and video are on the roadmap.

Caveats

  • The project is in beta and warns of breaking changes before a v1.0.0 release.
  • Search is exhaustive (FLAT index), so performance is linear with collection size; approximate nearest neighbor (HNSW/IVFFlat) is planned but not yet implemented.
  • The README notes the focus is not scale—millions of documents are explicitly out of scope.

Verdict

Ideal for Go developers who need to add RAG, semantic search, or recommendation features to a service without operational overhead. Skip it if you need to index millions of items or require advanced logical filters like $and/$or, which are still on the roadmap.

Frequently asked

What is philippgille/chromem-go?
chromem-go exists so Go applications can run vector search and RAG locally without dragging in a separate database or a pile of dependencies.
Is chromem-go open source?
Yes — philippgille/chromem-go is open source, released under the MPL-2.0 license.
What language is chromem-go written in?
philippgille/chromem-go is primarily written in Go.
How popular is chromem-go?
philippgille/chromem-go has 1k stars on GitHub.
Where can I find chromem-go?
philippgille/chromem-go is on GitHub at https://github.com/philippgille/chromem-go.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.