Settings

Theme

Show HN: Portable RAG (Open Source)

4 points by cepstrum9 a month ago · 0 comments · 1 min read


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.

You can use it in Python 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")

It uses 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

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?

No comments yet.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection