Repolode
philippgille

philippgille/chromem-go

Embeddable vector database for Go with a Chroma-like interface, no third-party dependencies, and optional on-disk persistence.

Open-source alternative to:Pinecone

Stars
1,075
Forks
78
Open issues
21
Last commit
2 months ago

What is it?

chromem-go is a vector database that runs inside a Go program, the way SQLite runs inside an application, so there is no separate server to install or maintain. It stores documents with their embeddings, and can create those embeddings itself through providers such as OpenAI, Ollama, Cohere, or Mistral, or accept embeddings you already computed.

It is aimed at retrieval augmented generation (RAG), semantic search, and similar features in small-to-medium workloads rather than millions of documents. Search is exhaustive nearest neighbor search using cosine similarity, and queries can be filtered by metadata or by document text containing or not containing a string. Data lives in memory by default, with optional immediate persistence to files and export/import of the whole database for backups.

The API mirrors Chroma's core methods (add, query, get, create and delete collections) while adding more Go-idiomatic alternatives. The project is in beta and may introduce breaking changes before v1.0.0.

Key features

  • 01Runs embedded in a Go application with no external dependencies or server.
  • 02Creates embeddings through OpenAI, Azure OpenAI, Ollama, Cohere, Mistral, and other providers, or accepts precomputed vectors.
  • 03Exhaustive cosine similarity search with metadata and document content filters.
  • 04In-memory storage with optional immediate file persistence.
  • 05Whole-database export and import, optionally compressed and encrypted.

Use cases

  • Adding RAG-based question answering to a Go service without deploying a separate vector database.
  • Semantic search over a small or medium set of documents inside a CLI or desktop tool.
  • Prototyping embedding-based features in Go before choosing a larger database.

Quick start

  1. 1

    Install the library with go get

    go get github.com/philippgille/chromem-go@latest
  2. 2

    Import chromem-go and create an in-memory DB and collection, then add documents and query (see the minimal example)

Things to know

  • The project is in beta and may introduce breaking changes before v1.0.0.
  • Designed for simplicity and small-to-medium scale, not millions of documents.
  • Default embedding uses OpenAI and needs an API key unless you configure another provider.

In collections

Topics

FAQ

What is chromem-go?
Embeddable vector database for Go with a Chroma-like interface, no third-party dependencies, and optional on-disk persistence. chromem-go is a vector database that runs inside a Go program, the way SQLite runs inside an application, so there is no separate server to install or maintain. It stores documents with their embeddings, and can create those embeddings itself through providers such as OpenAI, Ollama, Cohere, or Mistral, or accept embeddings you already computed.
Is chromem-go free to use? What license does it have?
chromem-go is open source under the MPL-2.0 license. Check the license terms before using it in commercial products.
Is chromem-go still maintained?
Updated within 6 months. The last commit to chromem-go was on Sep 6, 2026.
What can I use chromem-go for?
Adding RAG-based question answering to a Go service without deploying a separate vector database. Semantic search over a small or medium set of documents inside a CLI or desktop tool. Prototyping embedding-based features in Go before choosing a larger database.
How do I install chromem-go?
Install the library with go get: go get github.com/philippgille/chromem-go@latest Import chromem-go and create an in-memory DB and collection, then add documents and query (see the minimal example)
Where can I get chromem-go?
The source code and installation instructions are on GitHub: https://github.com/philippgille/chromem-go

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects