Skip to main content

Lightweight Retrieval-Augmented Generation (RAG) toolkit in 3 lines.

Project description

retrievify

PyPI Python License Downloads

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.0.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

retrievify-0.1.0-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file retrievify-0.1.0.tar.gz.

File metadata

  • Download URL: retrievify-0.1.0.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for retrievify-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c2c3ac00178806f243bbdc0759e2fdee760d2c4c6f8e926ad0d3e10174b3c844
MD5 c0d70b5ebcedd84524760ecf5b09b15e
BLAKE2b-256 a4b97c28db178f12a170fc47fd84e06a6a31ab5a3702f8bcd44d9c49b90f6cc7

See more details on using hashes here.

File details

Details for the file retrievify-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: retrievify-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for retrievify-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7153d4650b6d9732bda39144aa64d387656491b5c81514986198d918931388cb
MD5 7373ea44bd9d76d2345b3dba1a53308e
BLAKE2b-256 6378ef59c67f5663e36a48e4a22fe7b2aba000f7131ab00beff5cd0163695d05

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page