NuclaDB

Search by meaning.

An open-source vector database, written in Go. Store embeddings. Find the closest matches. Run it yourself.

46 MB for 10K vectors13,900 searches/seczero vendored engines
nucladb / vector search
Example · 4 dimensions

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.

dim=32 · cosine · M=16 · efConstruction=100 · efSearch=60loading engine…

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 happens to your data

Saving goes to disk before anything else. Searching never waits on the disk.

  1. 1
    Your app

    sends an item

  2. 2
    API

    gRPC or REST

  3. 3
    Gatekeeper

    checks your key

  4. 4
    Log on disk

    written first, survives a crash

  5. 5
    Search graph

    item is linked in

  6. 6
    Backup 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

NuclaDB Qdranthigher is better
13,914
7,624
13,966
7,451
10,653
7,051
7,542
6,465
5,822
5,512
effort 10effort 20effort 50effort 100effort 200

At the lowest effort, Qdrant gets slightly more answers right. Raise the effort and both reach 100%. How effort works

All the numbers
efSearchrecall@10queries/sp50 msp95 msRSS MB
10 NuclaDB0.93213,9140.070.0945.8
Qdrant0.9597,6240.130.17116.1
20 NuclaDB0.98113,9660.070.0945.8
Qdrant0.9897,4510.130.15116.2
50 NuclaDB0.99610,6530.090.1145.9
Qdrant0.9987,0510.140.16116.3
100 NuclaDB0.9987,5420.130.1645.9
Qdrant1.0006,4650.150.17116.5
200 NuclaDB1.0005,8220.170.2145.9
Qdrant1.0005,5120.180.22116.6

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