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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rag_system-2.0.0.tar.gz (4.7 MB view details)

Uploaded Source

Built Distribution

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

rag_system-2.0.0-py3-none-any.whl (4.7 MB view details)

Uploaded Python 3

File details

Details for the file rag_system-2.0.0.tar.gz.

File metadata

  • Download URL: rag_system-2.0.0.tar.gz
  • Upload date:
  • Size: 4.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.14

File hashes

Hashes for rag_system-2.0.0.tar.gz
Algorithm Hash digest
SHA256 88fc02c8fa2ff27f440b4b6964fca429de96703bc708a8f6d6022beee657a65d
MD5 c3b49a554978d2530394f16192a89df1
BLAKE2b-256 dbaace49bcf876a2ab2cd3bf58ecc29a4b0b641706d2e7c0e4e3f5efc85f8126

See more details on using hashes here.

File details

Details for the file rag_system-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: rag_system-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.7 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.14

File hashes

Hashes for rag_system-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c6a9cb7e77ddc70f6e5a0709dada2fc3af0d6aede2cada3865a0e9a1120c7242
MD5 4a757a60c026ad1a00469cd56624950e
BLAKE2b-256 16829956c2afc9b94ba2531b218311bb3fbfef24a2b6e4a382fe7a823fbf1e8b

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 files

1.0.1

2 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