Tired of Manually Tuning RAG? Open-Source Tool Muffakir Automates Your Experiments

Muffakir automates RAG pipeline experiments across key components and quantifies results by metrics, latency, and cost.
Muffakir is an open-source RAG experiment runner built by a developer fed up with manual pipeline tuning. It brings seven key dimensions — chunking, embeddings, retrieval, query transformation, reranking, top-k, and generation models — into a unified framework that automatically runs combinations as reproducible trials. Results are evaluated across retrieval metrics, generation metrics, latency, and cost. The best configuration can be exported directly to Python for production use. The project is early-stage and currently requires local installation from GitHub, with the author actively seeking feedback from real RAG developers.
The Pain of Manual RAG Tuning
Developers who build Retrieval-Augmented Generation (RAG) systems have probably all been through this loop: tweak the chunking strategy, run a test, switch the retrieval method, run it again, try a different embedding model, a reranker, a top-k value, a query transformation — and then struggle to track which change actually made a difference.
One developer shared his solution on Reddit. He openly admitted he was "tired of manually tuning RAG pipelines." He had previously asked the community how they experimented with different RAG configurations, only to find himself repeatedly stuck in the same trap — too many combinations, too fast an iteration cycle, and no systematic way to judge what worked. So he built an open-source experiment runner and called it Muffakir.

Retrieval-Augmented Generation (RAG) is an architectural pattern that combines external knowledge bases with large language models: the system first retrieves the most relevant passages from a document corpus based on the user's query, then feeds those passages as context — along with the question — into the generation model. This allows the model to answer domain-specific questions beyond its training data. RAG performance is highly dependent on the coordinated behavior of multiple pipeline components: how documents are split (chunking strategy) determines information granularity; the embedding model determines semantic similarity quality; the retrieval method (dense, sparse, or hybrid) affects recall; and the reranker further filters the most relevant results after initial retrieval. These components have complex interactions, and optimizing one component in isolation doesn't guarantee overall improvement — which is exactly why systematic experimentation is critical for RAG development.
What Is Muffakir
The idea behind the tool is straightforward: hand it your documents, define the RAG components you want to try, and let it automatically run all the combinations as reproducible trials.
Based on the author's description, Muffakir currently supports experimental comparison across the following dimensions:
- Chunking: different splitting strategies
- Embeddings: different vectorization approaches
- Retrieval: different recall methods
- Query transformation: rewriting and expanding user queries
- Reranking: secondary sorting of retrieved results
- top-k: the number of results to retrieve
- Models: different generation models
In other words, it brings the most common and impactful tunable parameters in a RAG pipeline into a single experimental framework, freeing developers from manually shuffling through combinations.
Metrics-Driven Comparison
Muffakir doesn't just run combinations — more importantly, it provides quantitative evaluation dimensions. It compares results across trials using retrieval metrics, generation metrics, latency, and cost.
This matters a lot in practice. RAG optimization is never a single-dimension problem — one configuration might have better recall but come with significantly higher latency and token costs. Putting performance, speed, and expense in the same table lets developers make trade-offs based on their specific use case.
After running experiments, users can inspect the results and export the chosen configuration back to Python code, ready for use in production. This path from "experiment" to "deployment" is designed with practical pragmatism in mind.
Commonly used retrieval metrics in RAG evaluation include Hit Rate, Mean Reciprocal Rank (MRR), and Normalized Discounted Cumulative Gain (NDCG), which measure whether the correct answer was retrieved and how highly it was ranked. Generation metrics cover Faithfulness (whether the answer is consistent with the retrieved context), Answer Relevancy, and others — often computed automatically using frameworks like RAGAS. Latency and cost are equally important engineering constraints: a stronger reranker or a larger top-k value can improve recall quality, but will significantly increase API costs and end-to-end response time. Comparing all four dimensions within the same experiment result is the key design intent that distinguishes Muffakir from a simple performance evaluation script.
Local-Only, Early Stage
The author is honest about the project's maturity. Muffakir currently runs locally and is still in early development. The GitHub version is usable, but a new package release hasn't yet been published to PyPI, so for now it can only be installed from the repository source.
- GitHub repository: github.com/Mohamed28112003/Muffakir
- Documentation: mohamed28112003.github.io/Muffakir
For developers willing to try it early, this means a slightly higher installation barrier — but also an earlier opportunity to shape the project's direction. The author has explicitly said he welcomes discussion on architecture, contributions, and ideas.
Does It Solve a Real Problem?
The author's main goal in posting was actually to gather feedback. He openly said he wants to hear from people who are actually building RAG systems: does this solve a problem you've encountered? Or have you already managed your experiments well enough with notebooks, scripts, or existing tools?
That's worth unpacking. There are currently two common approaches to RAG experiment management: one relies on Jupyter notebooks and hand-written scripts — flexible, but hard to reproduce and easy to lose control of; the other uses more general-purpose ML experiment tracking tools, which are mostly not designed specifically for RAG's component-based experimentation.
Muffakir sits between the two — it treats RAG-specific tuning dimensions (chunking, retrieval, reranking, etc.) as first-class citizens while preserving reproducibility and multi-dimensional comparison. If this abstraction fits real workflows well enough, it has a genuine chance to fill a gap.
What Would Make It Actually Usable?
The author also proactively raised another key question: if you've tried similar tools, what would it need to have for you to actually incorporate it into your workflow?
This is the common challenge facing many open-source developer tools. An experiment runner's adoption typically depends not only on feature coverage, but also on ease of installation (PyPI release), integration with existing vector databases and frameworks, quality of result visualization, and completeness of documentation. The author's current candor — acknowledging the tool is early-stage and seeking real-world requirements — is actually a healthy starting point for this kind of project.
For teams wrestling with RAG tuning, Muffakir at least offers an open-source option worth watching. Whether it becomes part of your toolkit may depend on whether it can fill in these practical details in the iterations ahead.
Related articles

ROCmFix and InferBench: Running Local LLMs on AMD GPUs — A Practical Look
ROCmFix simplifies AMD GPU ROCm setup for local LLMs, while InferBench benchmarks Vulkan vs. HIP backend performance — practical tools for AMD local inference users.

The AI Deployment Evaluation Challenge: Unpacking Accenture's Embedded Evaluation Partnership
Explore the significance of embedded evaluation in enterprise AI deployment, covering LLM-as-a-judge, hallucination monitoring, and why Accenture-style partnerships matter.

AI in Schools: What the Choice We Keep Making Really Means
AI is entering classrooms, but every adoption of an AI tool is a choice about education's essence. This article explores the trade-offs, decision-makers, and the deliberate caution educators need.