Skip to main content

Framework for benchmarking, evaluating, and orchestrating Retrieval-Augmented Generation pipelines.

Project description

MetaRAG SDK โ€” Intelligent Pipeline Selection Engine

Python PyPI Ollama License Status


MetaRAG is an open-source engine that takes the guesswork out of RAG pipeline design. Instead of manually tuning chunking strategies, retrieval backends, and rerankers โ€” MetaRAG benchmarks them all and routes every query to the configuration that actually performs best on your data.

Think of it as AutoML, but for RAG.



๐Ÿ“Œ Table of Contents


๐Ÿค” Why MetaRAG

Every team building a RAG system faces the same unsolved problem:

Which chunking strategy should I use?
Which retrieval method works best for my documents?
How do I know if my pipeline is actually good?
What happens when a different query type breaks everything?

Current tools make you answer these questions manually โ€” every time, for every project.

Tool Build RAG Evaluate Compare Auto-Select Learn
LangChain โœ… โŒ โŒ โŒ โŒ
LlamaIndex โœ… โŒ โŒ โŒ โŒ
RAGAS โŒ โœ… โŒ โŒ โŒ
MetaRAG โœ… โœ… โœ… โœ… โœ…

MetaRAG owns the entire RAG workflow โ€” from raw documents to evaluated, auto-selected, continuously improving answers. No LangChain dependency in the core โ€” the retrieval and chunking logic is hand-built on top of numpy, pandas, and rank-bm25 only.


๐Ÿ— Architecture

                        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                        โ”‚              USER INTERFACE              โ”‚
                        โ”‚   MetaRAG(docs, embeddings, generator)   โ”‚
                        โ”‚            .fit()  .ask()                โ”‚
                        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                          โ”‚
                 โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                 โ”‚                    METARAG CORE                  โ”‚
                 โ”‚                                                  โ”‚
                 โ”‚   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
    Documents โ”€โ”€โ–บโ”‚   โ”‚  Loader  โ”‚โ”€โ”€โ”€โ–บโ”‚ Chunker  โ”‚โ”€โ”€โ–บโ”‚ Embeddingsโ”‚   โ”‚
                 โ”‚   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ””โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚
                 โ”‚                                        โ”‚         โ”‚
                 โ”‚                              โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
                 โ”‚                              โ”‚  Vector Databaseโ”‚ โ”‚
                 โ”‚                              โ”‚ InMemoryโ”‚Chroma โ”‚ โ”‚
                 โ”‚                              โ”‚      โ”‚ FAISS   โ”‚ โ”‚
                 โ”‚                              โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
                 โ”‚                                        โ”‚         โ”‚
                 โ”‚                              โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
                 โ”‚                              โ”‚   Retrievers   โ”‚  โ”‚
                 โ”‚                              โ”‚ BM25 โ”‚ Dense   โ”‚  โ”‚
                 โ”‚                              โ”‚ Hybrid โ”‚ MMR   โ”‚  โ”‚
                 โ”‚                              โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
                 โ”‚                                        โ”‚         โ”‚
    Query โ”€โ”€โ”€โ”€โ”€โ”€โ–บโ”‚   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”               โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
                 โ”‚   โ”‚  Router  โ”‚โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ โ”‚   Pipelines  โ”‚   โ”‚
                 โ”‚   โ”‚ (cold-   โ”‚               โ”‚Straightโ”‚MQueryโ”‚   โ”‚
                 โ”‚   โ”‚  start โ†’ โ”‚               โ”‚Rerankedโ”‚Full  โ”‚   โ”‚
                 โ”‚   โ”‚  learned)โ”‚               โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚
                 โ”‚   โ””โ”€โ”€โ”€โ”€โ–ฒโ”€โ”€โ”€โ”€โ”€โ”˜                        โ”‚          โ”‚
                 โ”‚        โ”‚                     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
                 โ”‚        โ”‚                     โ”‚   Evaluator   โ”‚   โ”‚
                 โ”‚        โ”‚                     โ”‚  (5 metrics)  โ”‚   โ”‚
                 โ”‚        โ”‚                     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚
                 โ”‚        โ”‚                              โ”‚          โ”‚
                 โ”‚        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ benchmark() โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜          โ”‚
                 โ”‚              trains router from win-rates        โ”‚
                 โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                                          โ”‚
                                                    โ”Œโ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”
                                                    โ”‚   Answer   โ”‚
                                                    โ”‚textโ”‚score  โ”‚
                                                    โ”‚pipelineโ”‚ms โ”‚
                                                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿงฉ Components

๐Ÿ“‚ Document Loader

Loads any supported document type automatically โ€” no configuration needed. Optional-dependency formats are skipped gracefully with one summary line, not a crash.

from metarag import DocumentLoader

loader = DocumentLoader("./data")                # folder (recursive)
loader = DocumentLoader("./data/contract.pdf")   # single file
docs   = loader.load()
Format Support
PDF โœ… (pip install metarag-sdk[pdf])
TXT โœ…
DOCX โœ… (pip install metarag-sdk[docx])
HTML โœ… (pip install metarag-sdk[html])
CSV โœ…
JSON โœ…
Markdown โœ…
Nested directories โœ…

โœ‚๏ธ Chunker

Six strategies. One interface. All zero-dependency and free โ€” no embedding or LLM calls in any of them.

from metarag import Chunker

chunker = Chunker(strategy="recursive")      # sensible default
chunks  = chunker.chunk_documents(docs, cache_dir=".metarag/cache/chunks")
Strategy Best For
fixed Quick baseline
recursive General purpose โญ
sentence Conversational text
semantic Loosely topic-grouped text
sliding_window Overlap-heavy retrieval
markdown Structured docs โ€” splits on headers, keeps them in metadata

๐Ÿ—„ Vector Database

In-memory by default (zero dependencies). Chroma and FAISS as drop-in swaps.

from metarag import InMemoryVectorDB, ChromaVectorDB, FAISSVectorDB

db = InMemoryVectorDB()                              # zero-dep default
db = ChromaVectorDB(persist_directory=".metarag/index")
db = FAISSVectorDB()

db.build(chunks, embeddings)   # embeddings computed beforehand, once
db.search(query_embedding, k=4)
db.add(new_chunks, new_embeddings)

๐Ÿ” Retrievers

Four retrieval strategies, all returning (chunk, score) pairs directly โ€” no separate "with score" call needed.

from metarag import BM25Retriever, DenseRetriever, HybridRetriever, MMRRetriever

bm25   = BM25Retriever(chunks)                              # keyword
dense  = DenseRetriever(chunks, embeddings, vector_db)       # semantic
hybrid = HybridRetriever(chunks, embeddings, vector_db, alpha=0.5)  # combined
mmr    = MMRRetriever(chunks, embeddings, vector_db)          # diverse

results = hybrid.retrieve("your query", k=4)   # [(chunk, score), ...]

MMR is hand-implemented โ€” vectorized relevance scoring plus greedy diversity selection, no sklearn dependency.


โš™๏ธ Pipelines

fit() assembles pipelines automatically from your configured retrievers โ€” you don't wire these by hand for the default flow.

from metarag import MetaRAG

rag = MetaRAG(docs="./data", embeddings=embeddings, generator=generator)
rag.fit()

rag.pipeline_graph()   # prints the actual stage graph for every built pipeline
Pipeline What it does
straight Retrieve only โ€” one per built retriever (bm25, dense, hybrid, mmr)
multiquery Expand the query into variants, retrieve on all, merge
reranked Hybrid retrieval, then cross-encoder reranking (needs sentence-transformers)
full MultiQuery + Reranking combined

Every pipeline ends in a Deduplicator pass and returns a common result shape (query, chunks, pipeline).


๐Ÿค– Generator

Bring any object with a .generate(prompt) -> str method โ€” MetaRAG duck-types it, no base class required.

from metarag import OllamaGenerator   # built-in convenience wrapper

generator = OllamaGenerator(model="mistral")   # free, local
# or bring your own: any object exposing .generate(prompt)

answer = rag.ask("What is the main topic of this document?")
print(answer.text)          # the answer
print(answer.pipeline)      # which pipeline the router picked
print(answer.score)         # composite evaluation score
print(answer.latency_ms)    # end-to-end latency

๐Ÿ“Š Evaluator

Five metrics, one composite score. Zero LLM calls โ€” pure embedding similarity and lexical overlap, so it runs in milliseconds on whatever embedding model you're already using.

from metarag import Evaluator

evaluator = Evaluator(embedding_model=embeddings, preset="balanced")  # or "precision" / "recall"
result = evaluator.evaluate(answer)

print(result.faithfulness)   # cosine(answer, retrieved context) โ€” grounded?
print(result.relevancy)      # cosine(query, answer) โ€” on-topic?
print(result.precision_avg)  # avg cosine(query, each chunk) โ€” chunks useful?
print(result.coverage)       # query-term overlap in retrieved chunks
print(result.redundancy)     # avg pairwise chunk similarity (lower is better)
print(result.composite)      # preset-weighted combination โ€” drives the router

No OpenAI. No cloud API required โ€” evaluation runs entirely on your own embedding model.


๐Ÿ”€ Router

Two modes, one class. Cold-start rules from the moment fit() finishes; win-rate-driven learned thresholds once you've run benchmark().

from metarag import Router

router = Router()
pipeline_name = router.route(features)   # features = merged corpus + query + probe signals
# โ†’ "hybrid"

Cold-start signals (before any benchmark() run):

Signal Example condition Pipeline Selected
High similarity, low redundancy clean, well-matched corpus reranked
Numeric-heavy or short-doc corpus logs, FAQs, structured records straight / hybrid
Weak retrieval (low similarity) vague or under-specified query multiquery
High redundancy in top chunks repetitive corpus mmr
Noisy, OCR-heavy corpus scanned documents hybrid
Long or operator-heavy query "compare X and Y" multiquery

Once benchmark() trains the router, its default becomes whichever pipeline actually won the most queries, and refinement rules can only override that toward a different pipeline if it has real supporting win-rate evidence โ€” never a hardcoded guess.


โšก Quickstart

Installation

pip install metarag-sdk

Optional components install on top as needed โ€” see docs/installation.md for the full list ([pdf], [chroma], [faiss], [nltk], [rerank], [ollama], or [all]).

Setup Ollama (free, local โ€” optional)

# install from ollama.com, then pull models
ollama pull mistral             # generation
ollama pull nomic-embed-text    # embeddings

Build and Ask

from metarag import MetaRAG, CachedEmbeddings, OllamaGenerator

embeddings = CachedEmbeddings(...)

rag = MetaRAG(
    docs="./data",
    embeddings=embeddings,
    generator=OllamaGenerator(model="mistral"),
)

rag.fit()

Example output

Files Loaded        : 8
Documents Extracted : 101
Chunks Generated     : 333
Vector Index Built
Pipelines Built      : 7
answer = rag.ask("What is the main topic of this document?")
print(answer.text)

Benchmark Every Pipeline

queries = [
    "Summarize the document.",
    "What are the key findings?",
    "List important numbers.",
]

results = rag.benchmark(queries, retrieval_only=True)

Example output

Benchmark Rows      : 595
Benchmark CSV Saved
Router Thresholds Saved
rag.leaderboard()
rag.dashboard()
rag.report()

Example output

=========================================================================================
PIPELINE       PREC   COVER  REDUND  SCORE    LATENCY
=========================================================================================
reranked        0.84   0.79   0.12    0.84      1240ms
multiquery      0.81   0.76   0.15    0.82       890ms
hybrid          0.74   0.71   0.18    0.76       340ms
mmr             0.71   0.69   0.09    0.73       290ms
dense           0.69   0.65   0.21    0.68       230ms
bm25            0.63   0.60   0.24    0.61       120ms
straight        0.60   0.58   0.26    0.58       110ms
=========================================================================================

๐Ÿ† Best pipeline: reranked (score=0.84)
๐Ÿ”€ Router would pick: reranked
rag.save()

๐Ÿ” Pipeline Selection

MetaRAG does not commit to one pipeline. Every query gets routed to whichever configuration actually performs best on your data.

User asks a question
        โ”‚
        โ–ผ
Router extracts features
  (corpus profile + query profile + one cheap probe retrieval)
        โ”‚
        โ–ผ
   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
   โ”‚  Trained?                               โ”‚
   โ”‚   NO  โ†’ cold-start rule-based routing    โ”‚
   โ”‚   YES โ†’ win-rate-driven learned routing  โ”‚
   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
        โ”‚
        โ–ผ
  Selected pipeline retrieves chunks
        โ”‚
        โ–ผ
  Generator produces Answer
        โ”‚
        โ–ผ
  Evaluator scores it (composite)
        โ”‚
        โ–ผ
  benchmark() โ†’ train() feeds the router real win-rate evidence over time

๐Ÿ“ Evaluation

MetaRAG uses a single fast, zero-LLM-call evaluation tier by default โ€” every metric is either embedding cosine similarity or lexical overlap, so it costs milliseconds regardless of which embedding model you're using.

Faithfulness   โ†’  cosine(answer, retrieved context) โ€” is it grounded?
Relevancy      โ†’  cosine(query, answer) โ€” does it address the question?
Precision      โ†’  cosine(query, each chunk) โ€” max / avg / std
Coverage       โ†’  query-term overlap inside the retrieved chunks
Redundancy     โ†’  avg pairwise chunk similarity (lower is better)
Composite      โ†’  preset-weighted combination โ€” drives the router

Three built-in presets weight these differently:

Preset Best for
balanced General RAG, internal docs
precision Security logs, anomaly detection โ€” penalizes redundancy and latency harder
recall Research and summarization โ€” weights coverage highest

No OpenAI. No cloud API. Runs entirely on your own embedding model.


๐Ÿค– Supported Models

MetaRAG doesn't hardcode any specific model โ€” any object satisfying EmbeddingInterface (.embed_query() / .embed_documents()) or GeneratorInterface (.generate()) works. These are the options most commonly used in testing:

Embeddings

Model Provider Cost
nomic-embed-text Ollama (local) Free
all-MiniLM-L6-v2 HuggingFace Free
BAAI/bge-small-en HuggingFace Free
text-embedding-3-small OpenAI Paid

Generation

Model Provider Cost
mistral Ollama (local) Free
llama3 Ollama (local) Free
llama3-8b-8192 Groq API Free tier
gpt-4o-mini OpenAI Paid

CachedEmbeddings wraps any embedding model with a local disk cache automatically โ€” repeat runs against the same corpus skip re-embedding entirely.


๐Ÿ—บ Roadmap

v0.1 โ€” Foundation โœ…

  • Document loader โ€” PDF, HTML, DOCX, CSV, JSON, Markdown
  • 6 chunking strategies with a unified interface
  • Vector database โ€” InMemory, Chroma, FAISS
  • 4 retrieval strategies โ€” BM25, Dense, Hybrid, hand-coded MMR
  • Pipeline composition โ€” MultiQuery, Reranker, Full
  • 5-metric evaluator with preset weighting

v0.2 โ€” Intelligence โœ…

  • MetaRAG top-level class โ€” fit(), ask(), benchmark(), leaderboard()
  • Backend-agnostic core โ€” LangChain removed, hard deps reduced to numpy / pandas / rank-bm25
  • Corpus / Query / Probe profilers feeding a merged router feature dict
  • Trained router โ€” cold-start rules โ†’ win-rate-driven learned thresholds
  • benchmark() โ€” per-query winners across every built pipeline

v0.3 โ€” Toolkit & Observability (current)

  • Observability suite โ€” pipeline_graph(), dashboard(), report(), inspect(), trace()
  • Router persistence โ€” save() / load() / update_router_thresholds()
  • defaults.py single-source-of-truth config, with sweep-ready list values
  • SklearnRouterAdapter โ€” plug in any .predict()-style model as the router
  • Comprehensive test suite
  • pip install metarag-sdk โ€” packaged release
  • RAGTuner โ€” automated hyperparameter sweep across DEFAULTS list values
  • CLI โ€” metarag fit ./data, metarag ask "question"
  • Experiment-tracking view โ€” compare runs beyond raw benchmark.csv

๐Ÿ”ญ Future Scope

๐Ÿค– Agentic Workflow (v1.0)

MetaRAG will support agentic execution โ€” where the system can loop, retry with a different pipeline if confidence is low, and handle multi-hop questions that require multiple retrieval steps.

query โ†’ retrieve โ†’ evaluate
                      โ”‚
               score < 0.6?
                      โ”‚
              retry with different pipeline
                      โ”‚
               score >= 0.6?
                      โ”‚
                return answer

This turns MetaRAG from a pipeline selector into a self-correcting retrieval agent.

๐ŸŒ REST API (v1.5)

A FastAPI layer that exposes MetaRAG over HTTP โ€” enabling any platform or language to use it.

POST /upload       # index a document set
POST /ask          # get an answer
GET  /leaderboard  # pipeline scores
GET  /history       # query history

Designed for organisations that cannot install Python directly โ€” they just call the API.

๐Ÿข Platform Integrations (v2.0)

Native integrations with where organisations actually work:

MetaRAG for Notion       โ†’  query your Notion workspace
MetaRAG for Confluence   โ†’  search your team's knowledge base
MetaRAG for SharePoint   โ†’  enterprise document intelligence
MetaRAG for Slack        โ†’  answer questions from channel history

๐Ÿง  Continuous Learning (v2.5)

A full training pipeline that learns from real usage:

Every ask() + score  โ†’  training data
Periodic retraining   โ†’  smarter router
Domain adaptation     โ†’  legal, medical, code โ€” tuned per org
Human feedback loop    โ†’  thumbs up/down improves quality

The router goes from cold-start rules โ†’ win-rate thresholds โ†’ sklearn classifier โ†’ fine-tuned model, automatically, as data accumulates.

โ˜๏ธ MetaRAG Cloud (v3.0)

A hosted layer for organisations that don't want to manage infrastructure โ€” upload documents, ask questions via a chat interface, see the pipeline leaderboard, no terminal or Python setup required.


๐Ÿ“ Project Structure

metarag/
โ”‚
โ”œโ”€โ”€ metarag.py            High-level framework โ€” MetaRAG class
โ”œโ”€โ”€ defaults.py           Shared, single-source-of-truth configuration
โ”‚
โ”œโ”€โ”€ core/
โ”‚   โ”œโ”€โ”€ loader.py
โ”‚   โ”œโ”€โ”€ chunking.py
โ”‚   โ”œโ”€โ”€ embeddings.py
โ”‚   โ”œโ”€โ”€ vector_db.py
โ”‚   โ””โ”€โ”€ retriever.py
โ”‚
โ”œโ”€โ”€ pipelines/
โ”‚   โ”œโ”€โ”€ generator.py
โ”‚   โ””โ”€โ”€ pipeline.py
โ”‚
โ”œโ”€โ”€ Evaluator/
โ”‚   โ”œโ”€โ”€ evaluator.py
โ”‚   โ”œโ”€โ”€ scorer.py
โ”‚   โ””โ”€โ”€ metrics.py
โ”‚
โ”œโ”€โ”€ router/
โ”‚   โ”œโ”€โ”€ router.py
โ”‚   โ”œโ”€โ”€ router_interface.py
โ”‚   โ”œโ”€โ”€ query_profiler.py
โ”‚   โ”œโ”€โ”€ corpus_profiler.py
โ”‚   โ””โ”€โ”€ probe_profiler.py
โ”‚
โ”œโ”€โ”€ examples/
โ”‚   โ”œโ”€โ”€ loader_demo.py
โ”‚   โ”œโ”€โ”€ chunker_demo.py
โ”‚   โ”œโ”€โ”€ embeddings_demo.py
โ”‚   โ”œโ”€โ”€ retriever_demo.py
โ”‚   โ”œโ”€โ”€ vector_db_demo.py
โ”‚   โ”œโ”€โ”€ pipeline_demo.py
โ”‚   โ””โ”€โ”€ metarag_demo.py
โ”‚
โ”œโ”€โ”€ tests/
โ”‚
โ”œโ”€โ”€ docs/
โ”‚   โ”œโ”€โ”€ index.md
โ”‚   โ”œโ”€โ”€ installation.md
โ”‚   โ”œโ”€โ”€ quickstart.md
โ”‚   โ”œโ”€โ”€ architecture.md
โ”‚   โ”œโ”€โ”€ api.md
โ”‚   โ”œโ”€โ”€ contracts.md
โ”‚   โ”œโ”€โ”€ data_types.md
โ”‚   โ””โ”€โ”€ examples.md
โ”‚
โ”œโ”€โ”€ assets/
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ LICENSE
โ”œโ”€โ”€ pyproject.toml
โ””โ”€โ”€ requirements-dev.txt

๐Ÿค Contributing

MetaRAG is in active development. Contributions welcome in any of these areas:

  • New retrieval strategies
  • New chunking strategies
  • New evaluation metrics
  • RAGTuner โ€” hyperparameter sweep implementation
  • CLI tool
  • Integration connectors (Notion, Confluence, Slack)
  • Documentation and examples
git clone https://github.com/AnkitKumarxcodes/metarag-sdk.git
cd metarag-sdk

python -m venv .venv
source .venv/bin/activate      # Windows: .venv\Scripts\activate

pip install -e .
pip install -r requirements-dev.txt

Run the test suite before opening a PR:

pytest

๐Ÿ“„ License

MIT License โ€” free to use, modify, and distribute.


Built with the belief that RAG quality should be automatic, measurable, and continuously improving.

โญ Star this repo if MetaRAG saves you time

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_sdk-0.3.5.tar.gz (143.4 kB view details)

Uploaded Source

Built Distribution

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

metarag_sdk-0.3.5-py3-none-any.whl (61.6 kB view details)

Uploaded Python 3

File details

Details for the file metarag_sdk-0.3.5.tar.gz.

File metadata

  • Download URL: metarag_sdk-0.3.5.tar.gz
  • Upload date:
  • Size: 143.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.1

File hashes

Hashes for metarag_sdk-0.3.5.tar.gz
Algorithm Hash digest
SHA256 28bdf4d3296af5e76f430ba8f436611f1fe4622914973a0cb5793be5468e744b
MD5 73dbc1b3d6c808f996f1594e6f8abccd
BLAKE2b-256 58f9d942d787b48b92d2cbd609b8d208da1fac120af5ec29c76593a056a5c6a8

See more details on using hashes here.

File details

Details for the file metarag_sdk-0.3.5-py3-none-any.whl.

File metadata

  • Download URL: metarag_sdk-0.3.5-py3-none-any.whl
  • Upload date:
  • Size: 61.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.1

File hashes

Hashes for metarag_sdk-0.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 2422400ee22becc1fafe15a5cd9a96e50cd8732e9e5a7aee496cbf7588902877
MD5 878cd1859fab09613a48c5dcef954707
BLAKE2b-256 a448cfb5232f839da9fd0d2b5cb33fc221634728dc72c7a0ca8736e063f31615

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