logo

Show HN: Raglet(open-source)–portable RAG for small text corpora (no infra)

Posted by cepstrum9 |4 hours ago |1 comments

cepstrum9 4 hours ago

There's a class of text that's too big for a context window but too small to justify a vector database. A codebase, a folder of notes, a Slack export. I built a small library - raglet - to solve this problem raglet for it. The idea is that you can create small knowledge bases - "raglets" out of local directories.

i.e

from raglet import RAGlet rag = RAGlet.from_files(["docs/", "notes.md"]) results = rag.search("what did we decide about the API design?", top_k=5) rag.save("my-notes")

Load it anywhere rag = RAGlet.load("my-notes")

Local embeddings (sentence-transformers, no API keys), saves to a plain directory you can git commit.

The benchmark numbers were more interesting than I expected: 1 MB (~262K tokens) | 3.5s build | 3.7ms search 10 MB (~2.6M tokens) | 35s build | 6.3ms search 100 MB (~26M tokens) | 6min build | 10.4ms search Honest limitations: .txt and .md only right now (PDF/DOCX is next), no file change detection, ~100 MB practical ceiling before build time gets unwieldy.

What would make this useful for your workflow? Would love to get your feedback.