⚠️ Early Beta: Proximum is under active development. APIs may change before 1.0 release. Feedback welcome!
📋 Help shape Proximum! We'd love your input. Please fill out our 2-minute feedback survey.
A high-performance, embeddable vector database for Clojure and Java with Git-like versioning and zero-cost branching.
Unlike traditional vector databases, Proximum brings persistent data structure semantics to vector search:
Perfect for RAG applications, semantic search, and ML experimentation where you need to track versions, A/B test embeddings, or maintain reproducible search results.
(require '[proximum.core :as prox])
;; Create identifier of the underlying storage with (random-uuid)
(def store-id #uuid "465df026-fcd3-4cb3-be44-29a929776250")
;; Create an index - feels like Clojure!
(def idx (prox/create-index {:type :hnsw
:dim 384
:store-config {:backend :memory
:id store-id}
:capacity 10000}))
;; Use collection protocols
(def idx2 (assoc idx "doc-1" (float-array (repeatedly 384 rand))))
(def idx3 (assoc idx2 "doc-2" (float-array (repeatedly 384 rand))))
;; Search for nearest neighbors
(def results (prox/search idx3 (float-array (repeatedly 384 rand)) 5))
; => ({:id "doc-1", :distance 0.234} {:id "doc-2", :distance 0.456} ...)
;; Git-like branching
(prox/sync! idx3)
(def experiment (prox/branch! idx3 "experiment"))
import org.replikativ.proximum.*;
// Create index with builder pattern
try (ProximumVectorStore store = ProximumVectorStore.builder()
.dimensions(384)
.storagePath("/tmp/vectors")
.build()) {
// Add vectors (immutable - returns new store)
store = store.add(embedding1, "doc-1");
store = store.add(embedding2, "doc-2");
// Search for nearest neighbors
List<SearchResult> results = store.search(queryVector, 5);
// => [SearchResult{id=doc-1, distance=0.234}, ...]
// Git-like versioning
store.sync(); // Create commit
UUID snapshot1 = store.getCommitId();
store = store.add(embedding3, "doc-3");
store.sync();
// Time travel: Query historical state
ProximumVectorStore historical = ProximumVectorStore.connectCommit(
Map.of("backend", ":file", "path", "/tmp/vectors"), snapshot1);
historical.search(queryVector, 5); // Only sees doc-1, doc-2!
// Branch for experiments
ProximumVectorStore experiment = store.branch("experiment");
}
{:deps {org.replikativ/proximum {:mvn/version "LATEST"}}}
[org.replikativ/proximum "LATEST"]
<dependency>
<groupId>org.replikativ</groupId>
<artifactId>proximum</artifactId>
<version>LATEST</version>
</dependency>
implementation 'org.replikativ:proximum:LATEST'
Every sync() creates a commit. Query any historical state:
index.sync(); // Snapshot 1
// ... make changes ...
index.sync(); // Snapshot 2
// Time travel to earlier state
ProximumVectorStore historical = index.asOf(commitId);
Use Cases: Audit trails, debugging, A/B testing, reproducible results
Fork an index for experiments without copying data:
index.sync();
ProximumVectorStore experiment = index.branch("new-model");
// Test different embeddings
experiment.add(newEmbedding, "doc-1");
// Merge or discard - original unchanged
Use Cases: A/B testing, staging, parallel experiments
import org.replikativ.proximum.spring.ProximumVectorStore;
@Bean
public VectorStore vectorStore() {
return ProximumVectorStore.builder()
.dimensions(1536)
.storagePath("/data/vectors")
.build();
}
📖 Spring AI Integration Guide | Spring Boot RAG Example
import org.replikativ.proximum.langchain4j.ProximumEmbeddingStore;
EmbeddingStore<TextSegment> store = ProximumEmbeddingStore.builder()
.dimensions(1536)
.storagePath("/data/embeddings")
.build();
📖 LangChain4j Integration Guide
SIFT-1M (1M vectors, 128-dim, Intel Core Ultra 7):
| Implementation | Search QPS | Insert (vec/s) | p50 Latency | Recall@10 |
|---|---|---|---|---|
| hnswlib (C++) | 7,849 | 18,205 | 131 µs | 98.32% |
| Proximum | 3,750 (48%) | 9,621 | 262 µs | 98.66% |
| lucene-hnsw | 3,095 (39%) | 2,347 | 333 µs | 98.53% |
| jvector | 1,844 (23%) | 6,095 | 557 µs | 95.95% |
| hnswlib-java | 1,004 (13%) | 4,329 | 1,041 µs | 98.30% |
Proximum metrics:
Key features:
API Guides:
Integration Guides:
Advanced Topics:
Examples:
Browse working examples in examples/:
JVM Options Required:
--add-modules=jdk.incubator.vector
--enable-native-access=ALL-UNNAMED
EPL-2.0 (Eclipse Public License 2.0) - see LICENSE
We welcome contributions! See CONTRIBUTING.md for:
Built with ❤️ by the replikativ team
Can you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |