Open source · Flagship
Llama Agentic RAG: Open-Source, Citation-Grounded RAG
A self-correcting RAG system on local Llama models that grades retrieved chunks, rewrites weak queries, cites every claim and refuses when the documents don't support an answer.
LocalLlama 3.1 8B via Ollama
EvalsLLM-as-judge harness
MCPserver for Claude
CIoffline tests
The problem
Most RAG demos answer every question confidently, even when the documents say nothing about it.
What I built
- A LangGraph workflow: retrieve, grade each chunk, rewrite the query once if nothing is relevant, generate with [n] citations, then run a groundedness check.
- Unsupported or uncited answers become “I don't know” instead of a wrong answer.
- An evaluation suite measures retrieval hit rate, citation precision, refusal accuracy, false-refusal rate and judge correctness.
- Served through FastAPI and exposed as an MCP tool, so Claude and other MCP clients can query documents with citations.
Result
A reference implementation clients can inspect and run locally on an 8 GB GPU, so private documents never leave the machine.