← Back to archive

Repo of the Day

D-Star-AI/minDB

Published: Nov 17, 2026

Open repository ↗

Extremely memory-efficient vector database

Summary

minDB is a Python vector database that combines a compressed Faiss index with disk-based reranking instead of keeping the complete vector index in memory. It is aimed at local or memory-constrained similarity-search workloads where an in-memory HNSW index would be costly. The project is not production-hardened: its README warns of untested bugs, edge cases, and possible breaking changes.

What it is useful for

minDB is useful for nearest-neighbor searches over embedding vectors when memory usage is the main constraint. It accepts vectors with arbitrary serializable metadata and supports both direct Python calls and a FastAPI server.

Search happens in two stages. The compressed Faiss index first returns preliminary_top_k candidates, defaulting to 500. minDB then retrieves those vectors from a disk-backed key-value store and reranks them to produce the final results.

The README reports a FIQA-2018 evaluation using 57,638 chunks, 648 queries, and 768-dimensional embeddings. With top_k=20 and preliminary_top_k=200, minDB recorded 0.995 recall, 5.04 ms mean latency, and 5.82 MB of RAM. The compared Chroma configuration recorded 0.923 recall, 3.95 ms latency, and 175.9 MB of RAM. These are project-reported results, and the trade-off is slightly higher latency for substantially lower memory use.

This makes minDB relevant to local RAG prototypes or other applications with sizable embedding collections but limited RAM. It is not yet a metadata-filtering database: SQL-like metadata filters are listed as a future feature.

How engineers can use it

  1. Clone the repository and run:

    pip install -r requirements.txt
    

    Follow the README’s getting-started notebook for the complete indexing and search workflow; the supplied README does not show the exact query-call signature.

  2. Initialize a minDB object. Databases are stored under ~/.mindb by default, or you can provide a custom save_path.

  3. Add vectors with db.add() or the /db/{db_name}/add endpoint. Pass a list of (vector, metadata) tuples, ensuring metadata keys and values are serializable. Remove vectors by supplying their IDs.

  4. Train the index with db.train() or /db/{db_name}/train. Automatic training occurs after the collection exceeds 25,000 vectors, while training is skipped below 5,000. Until training occurs, minDB uses a flat Faiss index that keeps full vectors in memory and performs brute-force searches, so the memory advantage is most relevant to larger collections.

  5. To expose the documented REST API, run from the main repository directory:

    uvicorn api.fastapi:app --host 0.0.0.0 --port 8000
    

Important limitations include Faiss compatibility problems on Apple M1/M2 chips and no testing yet on datasets larger than 35M vectors. The README also explicitly advises against treating the project as production-ready.