Local-first RAG + controllable agents — grounded, auditable, runnable on consumer hardware.
Proferio is a clean, auditable, notebook-first starter kit for local RAG + controllable agents with grounded answers, explicit source traces, and out-of-scope routing. It is designed for learning and rapid prototyping on consumer hardware, not as a drop-in production framework.
Most local RAG repos are either toy demos or fragmented snippets. This project is built to be:
- Runnable fast on consumer hardware
- Auditable by default (answer + source snippets + status)
- Modular (notebook UX + reusable
src/package) - Demo-ready with Gradio and smoke checks
- End-to-end local RAG pipeline (
notebooks/01_local_rag_pipeline.ipynb) - ReAct-style agent extension (
notebooks/02_agent_extension.ipynb) - Advanced tracks for reranker tuning, multimodal, and benchmarks (
03-05) - Local LLM backend support (
ollama,hf) with safe fallback - Retrieval stack: hybrid vector + BM25 fusion, multi-query expansion, lexical/semantic rerank, diversity penalty
- Guardrails:
grounded,out_of_scope,no_documents,no_retrieval_hits
See docs/ARCHITECTURE.md for full details.
High-level flow:
- Load docs
- Chunk + embed
- Retrieve + rerank
- Generate grounded answer with citations
- Return structured status + contexts
pip install -r requirements.txtor
conda env create -f environment.yml
conda activate proferioollama pull llama3.1:8bpython scripts/smoke_test.pypython scripts/launch_gradio.pyOpen http://localhost:7860.
grounded: answer is backed by retrieved corpus contextout_of_scope: question does not match corpus intent/coverageno_documents: corpus is emptyno_retrieval_hits: retrieval produced no usable contexts
Run:
python scripts/run_benchmarks.pyOutputs a quick markdown table for README/result sharing.
Run:
python scripts/evaluate_golden.pyThis executes a small labeled set and reports hit rate by status and basic answer/retrieval quality metrics.
notebooks/01_local_rag_pipeline.ipynbnotebooks/02_agent_extension.ipynbnotebooks/03_reranker_finetuning.ipynbnotebooks/04_multimodal_extension.ipynbnotebooks/05_hardware_benchmarks.ipynb
src/proferio/— reusable runtime modulessample_data/— sample corpus + synthetic generatorscripts/— smoke, demo launch, benchmarksdocs/— architecture and release guidance.github/— CI + issue templates
See docs/RELEASE_CHECKLIST.md.
See CONTRIBUTING.md.
MIT (LICENSE).
