Skip to main content

rapid-rag

Fast local RAG - search your documents with AI, no cloud needed.

Installation

pip install rapid-rag

For PDF support:

pip install rapid-rag[pdf]

Quick Start

from rapid_rag import RapidRAG

# Create a RAG instance
rag = RapidRAG("my_documents")

# Add documents
rag.add("doc1", "The quick brown fox jumps over the lazy dog.")
rag.add_file("report.pdf")
rag.add_directory("./docs/")

# Semantic search
results = rag.search("fox jumping")
for r in results:
    print(f"{r['score']:.3f}: {r['content'][:100]}")

# RAG query with LLM (requires Ollama)
answer = rag.query("What does the fox do?", model="qwen2.5:7b")
print(answer["answer"])

CLI Usage

# Initialize a collection
rapid-rag init my_docs

# Add documents
rapid-rag add ./documents/ -c my_docs -r

# Search
rapid-rag search "query here" -c my_docs

# RAG query (requires Ollama)
rapid-rag query "What is X?" -c my_docs -m qwen2.5:7b

# Info
rapid-rag info -c my_docs

TIBET Provenance

Track every operation with cryptographic provenance:

from rapid_rag import RapidRAG, TIBETProvider

# Enable TIBET tracking
tibet = TIBETProvider(actor="my_app")
rag = RapidRAG("docs", tibet=tibet)

# All operations now create provenance tokens
rag.add_file("report.pdf")
results = rag.search("query")
answer = rag.query("Question?")

# Get provenance chain
tokens = tibet.get_tokens()
for t in tokens:
    print(f"{t.token_type}: {t.erachter}")
    print(f"  ERIN: {t.erin}")  # What happened
    print(f"  ERACHTER: {t.erachter}")  # Why

TIBET uses Dutch provenance semantics:

  • ERIN: What's IN the action (content)
  • ERAAN: What's attached (references)
  • EROMHEEN: Context around it
  • ERACHTER: Intent behind it

Features

  • Local-first: Everything runs on your machine
  • Fast: ChromaDB + sentence-transformers
  • Simple API: Add, search, query in 3 lines
  • File support: .txt, .md, .pdf
  • Chunking: Automatic with overlap
  • LLM integration: Works with Ollama
  • TIBET: Cryptographic provenance for all operations

Requirements

  • Python 3.10+
  • For LLM queries: Ollama running locally

License

MIT - Humotica

Metadata

Release files for rapid-rag 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rapid-rag 0.2.0
File Size Uploaded Provenance Actions
rapid_rag-0.2.0.tar.gz 11.7 kB Without provenance Details for rapid_rag-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for rapid-rag 0.2.0
File Interpreter ABI Platform Actions
rapid_rag-0.2.0-py3-none-any.whl Python 3 none any Details for rapid_rag-0.2.0-py3-none-any.whl

Total release size: 25.7 kB

Release files / rapid_rag-0.2.0.tar.gz

Download URL rapid_rag-0.2.0.tar.gz
Size 11.7 kB
Tags Source
SHA-256 checksum
How to use checksums
c27bea8a76be0a9d3ff167feca5a52e4ae7e55c4341f9411297ab4dade6b2069
BLAKE2b-256 checksum
How to use checksums
fb4465c1ded08efd70c3a1dc2c5b5886ef1df5ca9e7065aa7ad7197305b33157
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / rapid_rag-0.2.0-py3-none-any.whl

Download URL rapid_rag-0.2.0-py3-none-any.whl
Size 14.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5f952818e865e70ef60792c6ef0d4ebb04f7843277048a6bbf02af7a086aa94d
BLAKE2b-256 checksum
How to use checksums
b5562f44ff09dada4378be5be1ecb1769b71059a4079d8899219fd3853ce8b8b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Security for rapid-rag 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page