AI · Evaluation
Citation-Backed Local RAG
A local RAG pipeline with a zero-GPU evaluation harness
- Year
- 2025–2026
- Role
- Solo builder — pipeline, harness, test suite
- Stack
- Python · Ollama · BM25 · pytest

Overview
A fully local, citation-backed RAG system served via Ollama — running on free Kaggle GPUs where needed. The part I'm proudest of is what surrounds it: a zero-GPU evaluation harness I wrote before trusting the system. Before building the eval, I had to define what 'correct' means, so I wrote explicit rubric definitions for two failure-prone behaviors — what counts as a supported citation (the cited source must actually contain the claim) and what counts as a justified abstention (refuse when the evidence doesn't support an answer, rather than confabulate). Then I measured retrieval quality, citation accuracy, and refusal behavior against those rubrics, instrumented performance (BM25 index build time, embedding-cache hit rate, fp16-vs-fp32 embedding agreement), and held the whole system together with a 225-test suite.
What's inside
Explicit rubrics before metrics
The harness defines — in writing — what a supported citation is and when abstention is justified, then scores against those definitions. Plausible-but-unsupported citations fail, by design.
Zero-GPU evaluation
Every measurement runs without inference hardware: deterministic retrieval metrics, agreement checks between fp16 and fp32 embeddings, cache-hit-rate accounting. Evaluation shouldn't need a datacenter.
Local-first serving
The pipeline serves local models through Ollama, including over a tunnel from free Kaggle GPUs — no paid inference in the loop.
225-test suite
Retrieval, citation, and refusal behavior are locked down by tests, so changes to prompts or retrievers can't silently regress correctness.
What it taught me
This project is the clearest statement of how I evaluate AI: define the rubric first, measure second, and treat 'the system always answers' as a bug, not a feature.