AI & ML

RAG vs. Closed-Book LLMs

A local RAG pipeline pairing 4-bit Llama-3-8B with FAISS retrieval over 21K passages. Benchmarked 4 retrieval strategies across 7 configurations, and built an EM/F1/MRR + LLM-as-a-judge evaluation harness.

PythonRAGFAISSLlama-3BM25HyDE
EM 22.8% → 69.0%
Flight recording

See it run

RAG — CLI and test suite
 

The test suite, run locally: 51 tests against a real FAISS index and a Lucene BM25 index, no GPU or LLM server needed. The question replay below shows logged answers from the project’s evaluation runs on 500 SQuAD questions.

Question replay

Same question, two ways

Logged answers from the evaluation runs: the 8B model on its own, then with retrieved passages.

Log photos

Frames from the run