Portable executable RAG artifacts for Python
Project description
RagBucket
Portable Executable RAG Artifacts for Python
Build Retrieval-Augmented Generation systems as reusable, shareable, and executable .rag artifacts.
PyPI • Installation • Quickstart • Core Idea
Why RagBucket?
Traditional machine learning models are portable.
model.pt
model.onnx
model.gguf
They can be:
- saved
- shared
- deployed
- reused anywhere
But Retrieval-Augmented Generation (RAG) systems are still fragmented.
A modern RAG pipeline usually depends on:
- vector databases
- embedding pipelines
- chunking systems
- retrievers
- metadata stores
- external infrastructure
This makes RAG systems:
- difficult to distribute
- tightly coupled to infrastructure
- hard to reproduce
- non-portable
Introducing .rag
RagBucket introduces:
.rag
A portable executable artifact format for Retrieval-Augmented Generation systems.
The .rag artifact packages:
- vector memory
- semantic embeddings
- chunked knowledge
- retrieval metadata
- FAISS indexes
- runtime configuration
into a single reusable file.
Core Idea
Documents
↓
RagBuilder
↓
model.rag
↓
RagRuntime
↓
Question Answering
The builder converts knowledge into a portable retrieval artifact.
The runtime loads the artifact and performs:
- semantic retrieval
- contextual augmentation
- LLM-powered generation
using an external model provider like Groq.
Installation
Using uv
uv add ragbucket
Using pip
pip install ragbucket
Quickstart
Step 1 — Build a .rag Artifact
from ragbucket import RagBuilder
builder = RagBuilder()
builder.build(
doc_path="docs",
op_path="artifacts/demo.rag"
)
This generates:
artifacts/demo.rag
Step 2 — Load and Use the Artifact
from ragbucket import RagRuntime
system_prompt = """
you are Anik's personal chatbot.
you know all things about anik.
If anyone asks about the resume of anik
please share the details as required.
keep the answers super simple and crisp.
"""
rag = RagRuntime(
rag_path="artifacts/demo.rag",
api_key="your_groq_api_key",
model="llama-3.1-8b-instant",
system_prompt=system_prompt
)
response = rag.ask(
"Can you tell me Anik's skills related to AIML?"
)
print(response)
Example Output
Anik's AI/ML skills include:
- Hugging Face
- LangChain
- Streamlit
- FastAPI
- Deep Learning
- Transformers
What a .rag File Contains
A .rag artifact stores everything required for retrieval:
- semantic embeddings
- FAISS vector index
- chunked document memory
- retrieval metadata
- artifact manifest
- runtime configuration
The only thing required during inference is:
- an LLM provider API key
Runtime Pipeline
User Query
↓
Query Embedding
↓
Semantic Vector Search
↓
Relevant Context Retrieval
↓
LLM Generation
↓
Final Response
Features
Portable RAG Artifacts
Serialize retrieval systems into reusable .rag files.
Built-in Semantic Search
Uses FAISS for efficient vector similarity retrieval.
Groq-Powered Generation
Use Groq-hosted LLMs for fast inference.
Lightweight Runtime
Load and execute .rag artifacts anywhere using Python.
Self-Contained Retrieval Memory
The artifact itself contains the retrieval system.
Simple Developer API
Minimal abstraction for building and querying RAG artifacts.
Extensible Design
Designed for future support of:
- hybrid retrieval
- metadata filtering
- reranking
- distributed vector stores
- multi-model runtimes
Technology Stack
| Component | Technology |
|---|---|
| Embeddings | Sentence Transformers |
| Vector Search | FAISS |
| Chunking | LangChain |
| Runtime | Python |
| Generation | Groq |
| Packaging | zipfile |
| Artifact Format | .rag |
Philosophy
RagBucket treats RAG systems as:
portable intelligence artifacts
instead of:
fragmented retrieval pipelines
This separates:
- knowledge retrieval from
- language generation
allowing:
- reusable semantic memory
- portable RAG execution
- simplified deployment
- infrastructure-independent retrieval systems
Current Scope
RagBucket currently supports:
- local
.ragartifact generation - FAISS vector indexing
- semantic retrieval
- Groq-powered response generation
The project is intentionally lightweight and focused on:
portable RAG execution
Future Roadmap
Planned features include:
- hybrid retrieval
- metadata-aware search
- artifact versioning
- reranking support
- Milvus integration
- multi-provider LLM runtime
- distributed retrieval
.ragregistries
Vision
RagBucket aims to become:
“The portable runtime layer for Retrieval-Augmented Generation systems.”
A future where RAG systems can be:
- built once
- shared anywhere
- executed everywhere
through standardized portable intelligence artifacts.
License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 ragbucket-0.2.0.tar.gz.
File metadata
- Download URL: ragbucket-0.2.0.tar.gz
- Upload date:
- Size: 11.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9dffa94fd1f88ce24ebe342f862f14c8a3aca396ecc52c88e16ff9b44ebbc91c
|
|
| MD5 |
e7c6463348dc33cdf6141bd903173bdb
|
|
| BLAKE2b-256 |
3101d7919222078c838f8358fb0777238a4b7191944ea7b3efaf56e977d24577
|
File details
Details for the file ragbucket-0.2.0-py3-none-any.whl.
File metadata
- Download URL: ragbucket-0.2.0-py3-none-any.whl
- Upload date:
- Size: 14.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4d399e157a3467e643ccb1fe115b2446ffc2dfc772cb20403340575327f173f8
|
|
| MD5 |
6a4df985672b6669e78badea2b9fddc3
|
|
| BLAKE2b-256 |
f601879f1d03032c82b8766d4f7a5f30bcc6a52d24362d582c0260a3c08c1e9a
|