100% local RAG
Library Brain
What it is
Answers sourced only from the books (zero hallucination). 24,799 books, 1.68 million chunks, a 21 GB database, cross-encoder reranking, cross-lingual.
The architect's call
What went wrong
Ranking by raw hit count. It made doorstop novels beat the actual manuals: a 900-page book mechanically contains more occurrences of any term than a dense 120-page reference, without being more relevant. Ranking is now by distinct-term coverage. Same corpus, same query, results unrelated to the previous ones.
Flaky tests, and the temptation to disable them. Several suites failed intermittently. The cause was not randomness but resource leaks — vector and full-text indexes left open between cases. A flaky test marked "skip" is a bug you decide to stop seeing.
A migration that would have cost days for nothing. Before moving 1.7 million vectors to a different embedding backend, I measured cosine similarity between old and new on the real corpus: cos = 1.0000. Zero re-encoding needed. Without that measurement, it was several days of compute spent out of caution.
The figures
The code
Private repository — walkthrough over a call
Capabilities engaged
Related projects
- Brain Distiller — Library distillation
- TabICL local — Tabular foundation model
- Klody Core — Control plane
Your data cannot leave the building?
That is precisely the problem I solve. A 30-minute call is enough to scope an audit.