Skip to main content

MetaRAG: A multi-LLM ensemble Retrieval-Augmented Generation framework with cosine similarity ranking.

Project description

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

Example Usage

from metarag import MetaRAG

rag = MetaRAG(["VectorDB_Paper.pdf"])
result = rag.query("Explain the abstract in simple terms")
print(result["aggregated_response"])

Requirements

Python 3.8+

License

MIT License - see LICENSE file for details.

Author

Nisharg Nargund
Founder @OpenRAG

Project details


Download files

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

Source Distribution

metarag-0.1.3.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

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

metarag-0.1.3-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file metarag-0.1.3.tar.gz.

File metadata

  • Download URL: metarag-0.1.3.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.7

File hashes

Hashes for metarag-0.1.3.tar.gz
Algorithm Hash digest
SHA256 2b0446300ba245add5f638caf1215baf625262badb8b7d9471314b429e05c5e9
MD5 723855941ea5831c5254e0306ce845a5
BLAKE2b-256 7692bdd2aa452bdbb21a21fcc24e3edc781a69f92e20588a7d6048155393fa08

See more details on using hashes here.

File details

Details for the file metarag-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: metarag-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.7

File hashes

Hashes for metarag-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 acd95d242979e07deafc909a2a7c7a147239123b7cebcf1dceaf7aa9db75a6d7
MD5 19b90615f6bfbbc6e7ab1e0a2bd244ba
BLAKE2b-256 b8997a8b863e3d3970d5fcac536ad7d64c55805389293537230799baf3be0021

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page