Skip to main content

Rag-System

Rag-System is a Python Retrieval-Augmented Generation framework with persistent Chroma storage, incremental ingestion, citations, and multi-provider LLM support.

Install

pip install Rag-System

Quick start

from Rag_System import RAG

rag = RAG()
rag.ingest("documents")

response = rag.ask("What is Retrieval-Augmented Generation?")
print(response.answer)
for citation in response.citations:
    print(citation.filename, citation.page_number)

ingest accepts a single file, a folder, a recursive glob, or a list of paths. Supported formats include PDF, TXT, Markdown, DOCX, CSV, Excel, JSON, HTML, and XML. Unchanged files are skipped; changed files are re-indexed and missing files are removed.

Public API

rag.ingest("paper.pdf")
rag.ingest("documents/**/*.pdf")
rag.ingest(["paper.pdf", "manual.md"])
rag.delete("paper.pdf")
rag.update("paper.pdf")
rag.stats()
rag.reset()
rag.compare("Compare these documents")
rag.summarize("Summarize the documents")

RAGResponse exposes answer, citations, sources, and retrieval statistics.

Configuration

Constructor options include provider, model, embedding_model, data_dir, and verbose. Environment variables can configure the selected provider, model, chunking, retrieval, and storage settings. For example:

RAG_PROVIDER=groq
GROQ_MODEL=llama-3.3-70b-versatile
GROQ_API_KEY=gsk_...

The default client is lazy: construction does not download models or ingest files. Call ingest before ask.

CLI

rag ingest
rag ask "Which colleges offer MCA?"
rag stats
rag documents

Metadata

Release files for Rag-System 2.0.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 Rag-System 2.0.0
File Size Uploaded
rag_system-2.0.0.tar.gz 4.7 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for Rag-System 2.0.0
File Interpreter ABI Platform
rag_system-2.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 9.4 MB

Release files / rag_system-2.0.0.tar.gz

Download URL rag_system-2.0.0.tar.gz
Size 4.7 MB
Tags Source
SHA-256 checksum
How to use checksums
88fc02c8fa2ff27f440b4b6964fca429de96703bc708a8f6d6022beee657a65d
BLAKE2b-256 checksum
How to use checksums
dbaace49bcf876a2ab2cd3bf58ecc29a4b0b641706d2e7c0e4e3f5efc85f8126
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.14

Release files / rag_system-2.0.0-py3-none-any.whl

Download URL rag_system-2.0.0-py3-none-any.whl
Size 4.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
c6a9cb7e77ddc70f6e5a0709dada2fc3af0d6aede2cada3865a0e9a1120c7242
BLAKE2b-256 checksum
How to use checksums
16829956c2afc9b94ba2531b218311bb3fbfef24a2b6e4a382fe7a823fbf1e8b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files

1.0.1

2 release files

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