Search by meaning.
An open-source vector database, written in Go.
Store embeddings. Find the closest matches. Run it yourself.
Illustrative search using vector [1, 0, 0, 0], returning the two nearest matches, vector_001 and vector_002. This animation does not query a running database.
Try the index in your browser
internal/index/hnsw, the package the server uses, compiled to WebAssembly and running in this tab. Build an index, search it, and compare the answer with a full scan of every vector.
1.Build the index
Random 32-dimension vectors per batch:
2.Search it
A fresh random query, top 10, through HNSW and through a full scan.
Results show up here.
Try a search at 1,000 vectors, then add more and search again: the full scan slows down as the index grows, HNSW barely does.
Timings come from your machine and vary between runs; very small corpora can make the full scan the faster one. Read the WASM entry point.
What it does
Everything is written from scratch in Go. Each row links to a short guide with the numbers behind it.
- 01Fast similarity searchFinds the closest matches without checking every item.Read the guide ↗in the server
- 02Crash-safe writesOnce it says OK, your data survives a crash or power cut.Read the guide ↗in the server
- 03Quick restartsReloads from a saved file instead of starting over.Read the guide ↗in the server
- 04Many apps, one serverEach app gets its own space, key and limits.Read the guide ↗in the server
- 05Works from any languagegRPC, REST, a CLI and a Python client.Read the guide ↗in the server
- 06Memory for AI agentsLets Claude and other agents save and search notes.Read the guide ↗in the server
- 07CompressionStores items in about a sixteenth of the space.Read the guide ↗coming next
- 08Multiple machinesSplits one collection across several servers.Read the guide ↗coming next
What happens to your data
Saving goes to disk before anything else. Searching never waits on the disk.
- 1Your app
sends an item
- 2API
gRPC or REST
- 3Gatekeeper
checks your key
- 4Log on disk
written first, survives a crash
- 5Search graph
item is linked in
- 6Backup file
saved every 5 min
Against Qdrant, on the same machine
10,000 items, 100 searches, median of 5 runs. Hover the bars for numbers.
0.0×
up to, searches per second
0.0×
less memory
0 ms
to load 10,000 items
At the lowest effort, Qdrant gets slightly more answers right. Raise the effort and both reach 100%. How effort works
All the numbers
| efSearch | recall@10 | queries/s | p50 ms | p95 ms | RSS MB |
|---|---|---|---|---|---|
| 10 NuclaDB | 0.932 | 13,914 | 0.07 | 0.09 | 45.8 |
| Qdrant | 0.959 | 7,624 | 0.13 | 0.17 | 116.1 |
| 20 NuclaDB | 0.981 | 13,966 | 0.07 | 0.09 | 45.8 |
| Qdrant | 0.989 | 7,451 | 0.13 | 0.15 | 116.2 |
| 50 NuclaDB | 0.996 | 10,653 | 0.09 | 0.11 | 45.9 |
| Qdrant | 0.998 | 7,051 | 0.14 | 0.16 | 116.3 |
| 100 NuclaDB | 0.998 | 7,542 | 0.13 | 0.16 | 45.9 |
| Qdrant | 1.000 | 6,465 | 0.15 | 0.17 | 116.5 |
| 200 NuclaDB | 1.000 | 5,822 | 0.17 | 0.21 | 45.9 |
| Qdrant | 1.000 | 5,512 | 0.18 | 0.22 | 116.6 |
How it was built
Short write-ups on the choices that mattered.
Run it on your machine
One binary, no other services to set up.
Installs the server and CLI, then runs a short demo.
curl -fsSL https://raw.githubusercontent.com/Rakshit-gen/NuclaDB/main/install.sh | sh nucladb-cli quickstart