If you’ve ever spent hours tweaking a Retrieval-Augmented Generation (RAG) pipeline—wondering whether BM25 or a vector index works better, or if duplicating a passage in your prompt helps—AutoRAGLearnings is here to save you time. This toolkit:
- Turns your docs into Q&A
- Chunks & embeds content (locally via PGVector or in your Azure Search index)
- Greedily tests each RAG step to lock in the best module by measuring context precision
- Lets you ask any question with one simple command
Grab the full code on GitHub:
https://github.com/jig21nesh/myautorag
Why Greedy Search?
Manually testing every combination of RAG modules is both tedious and time-consuming:
- Does BM25 outperform a dense vector store?
- Would reranking with an LLM beat a simple pass-through?
- Should I tweak my prompt builder or stick with f-strings?
Greedy search cuts straight to the chase. Instead of exploring all pipelines, it:
- Iterates node-by-node (query_expansion → retrieval → augmentation → reranker → prompt_maker → generator)
- Swaps in each candidate in isolation
- Measures context_precision on a ground-truth Q&A set
- Lock in the winner before moving on
That reduces tests from “all combinations” to the sum of candidates per node—orders of magnitude fewer runs, yet still near-optimal.
I hope AutoRAGLearnings helps you tune your RAG workflows in minutes instead of days. Give it a try, star the repo, and leave a comment