Lightweight Retrieval-Augmented Generation (RAG) toolkit in 3 lines.
Project description
retrievify
Lightweight Retrieval-Augmented Generation (RAG) toolkit in 3 lines.
from retrievify import RAG
rag = RAG().fit("docs/", patterns=["*.pdf","*.md","*.txt"])
print(rag.ask("What are the core contributions?"))
Why retrievify?
- ⚡ Fast local embeddings (MiniLM) by default
- 🧱 Smart chunking & FAISS/Annoy vector stores (Windows-friendly)
- 🧩 Optional LLM generation hook (OpenAI/Ollama)
- 🛠️ CLI for quick indexing and querying
Install
pip install retrievify
# If FAISS is tricky on Windows, use Annoy:
pip install annoy
Quickstart
from retrievify import RAG
rag = RAG().fit("docs/")
res = rag.ask("What are the key limitations?", k=5)
print(res["evidence"][0])
CLI
retrievify index ./docs --pattern "*.pdf,*.md"
retrievify query ./docs -q "evaluation pipeline" -k 5 --generate
LLM (optional)
Set env var for OpenAI first:
$env:OPENAI_API_KEY="sk-..."
Then:
from retrievify import RAG
rag = RAG({"generation": True, "llm_backend": "openai"}).fit("docs/")
print(rag.ask("Summarize the paper")["answer"])
Roadmap
- Cross-encoder re-ranking
- HTML/URL loaders & deduplication
- Simple retrieval eval (Recall@k, MRR, NDCG)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
retrievify-0.1.3.tar.gz
(9.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file retrievify-0.1.3.tar.gz.
File metadata
- Download URL: retrievify-0.1.3.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea7b89fb7a6569f8427913d7127311b6f56d4472ce4f7cdb5225e75453f55262
|
|
| MD5 |
787908698d658ed2894435442e6b665a
|
|
| BLAKE2b-256 |
baa3bffa936266e6ff45769d52f9812be535d35885abe0d510aae3403a5d1f71
|
File details
Details for the file retrievify-0.1.3-py3-none-any.whl.
File metadata
- Download URL: retrievify-0.1.3-py3-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
51839152662fe45c419037eb0ad81d5f63f2b8bc2461f7a833fd7124845ad4a8
|
|
| MD5 |
48692489348a25d6068c4ca9bbecddfd
|
|
| BLAKE2b-256 |
c4c91d533d6e167d2437cc58af50e006533dbc764c3ca62024a9e152f2c2bf46
|