ksdb: built because existing vector databases were not enough
when i was building ai products, i realised something simple: vector databases are great for storing embeddings, but real products need more than just embeddings.
you don’t just “search semantically”. you also need:
- keyword relevance
- metadata filtering
- document deduplication
- relationships between entities
- handling scanned pdfs
- performance at scale
- self-hosting + full control
there wasn’t one system that did all of this well. so i built ksdb.
what ksdb does
ksdb started as a high-performance vector database and evolved into an intelligent document engine. you add documents, and ksdb automatically handles:
- fast ingestion and vector indexing
- gpu accelerated embeddings
- hybrid search (semantic + keyword, fused)
- metadata storage and filtering
- smart deduplication
- knowledge graph extraction
- ocr for scanned documents
- restful api + python sdk
- docker + postgres + s3 storage support
so instead of connecting 6 different services to build ai retrieval, you can just run ksdb.
why i built it
i wanted a database that helps ship ai products, not just run benchmarks. real use cases look like:
- customer support knowledge base
- enterprise document search
- rag systems with structured + unstructured data
- compliance and legal document retrieval
- research knowledge graphs
- private self-hosted ai workloads
these systems need: speed + accuracy + structure + privacy. ksdb is my attempt to bring all of that under one engine.
under the hood
- embeddings → gpu accelerated models
- semantic search → hnsw index
- keyword search → full text indexing
- hybrid ranking → reciprocal rank fusion
- metadata → postgres with json fields
- storage → s3 compatible object storage
- knowledge graphs → automatic entity + relation extraction using nlp
- ocr → works on scanned pdfs and images
- api → rest + sdk, chromadb-compatible client
basically: a clean developer experience on top of a powerful architecture.
how to try it
install:
```bash
pip install ksdb
```
or run from source:
```bash
git clone https://github.com/Kulraj69/KSDB
cd KSdb
pip install -e .
```
start:
```bash
python -m ksdb.cli run
```
now you can create a collection, add documents and query using python or rest api.
my vision for ksdb
vector search alone was phase one of ai retrieval. the next phase is intelligent retrieval. documents are not just embeddings. they have meaning, structure, entities, intent and relationships. retrieval systems should understand that.
ksdb is the first step in that direction. i don’t think this is the final version. i want to push ksdb way further — more structure, more reasoning, more speed.
but the goal stays the same: ai products should be fast to build, accurate to retrieve, and safe to deploy.