MetaRAG is a Python framework for multi-model Retrieval-Augmented Generation. It queries multiple LLMs in parallel, scores the responses based on cosine similarity with the context, and aggregates the top responses for a more accurate and comprehensive answer.
Features
- 🔍 Multi-LLM querying using Groq's LLMs (LLaMA3, Gemma, etc.)
- 🤝 Cosine similarity scoring of responses
- 🧠 Top-k response aggregation
- 📄 Works with PDFs and plain text
- ⚡ Fast execution with thread pooling
Installation
pip install metarag
Pre-requisites
Load your GROQ_API_KEY to the project from https://console.groq.com/keys and follow the sample example shown below.
Example Usage (Local PC)
import metarag
from dotenv import load_dotenv
load_dotenv()
def test_metarag_functionality():
document_paths = ["VectorDB_Paper.pdf"]
rag_instance = metarag.MetaRAG(document_paths=document_paths)
query = "What is the methodology in 5 lines like a professor and extract 5 keywords?"
result = rag_instance.run(query)
print(f"Aggregated Response: {result}")
if __name__ == "__main__":
test_metarag_functionality()
On Google Colab
import metarag
import os
os.environ["GROQ_API_KEY"]="groq_api_key"
document_paths = ["/content/VectorDB_Paper.pdf"]
rag_instance = metarag.MetaRAG(document_paths=document_paths)
query = "What is the methodology in 5 lines like a professor and extract 5 keywords?"
result = rag_instance.run(query)
print(f"Aggregated Response: {result}")
Requirements
Python 3.8+
License
MIT License - see LICENSE file for details.
Author
Nisharg Nargund
Founder @OpenRAG
Metadata
Release files for metarag 0.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| metarag-0.1.7.tar.gz | 7.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| metarag-0.1.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.1 kB
Release files / metarag-0.1.7.tar.gz
| Download URL | metarag-0.1.7.tar.gz |
|---|---|
| Size | 7.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ad0a69a754b97861ff7eb6a097f7b87781bc9155204807a2eeb3ca463335f2c3
|
|
BLAKE2b-256 checksum How to use checksums |
866a5776c0efbbf8e7986f9c6ebf14ed1c3d45dd3390ce6c9bee5b59bf92fcc8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.7
|
Release files / metarag-0.1.7-py3-none-any.whl
| Download URL | metarag-0.1.7-py3-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
61c116f75eebe4727e3a92105b5b39da0ad01c259a80abd71af4a4024dbc3844
|
|
BLAKE2b-256 checksum How to use checksums |
ec14d8453f070b2fce9854fa2fd973f0e98dae0e62e7145a41d07f1757d984a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.7
|
Security for metarag 0.1.7
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.