Independent open-source project · Active development

Modular RAG Engineering, Evaluation & Observability.

An open-source, Python-based RAG system I designed and implemented, covering ingestion, indexing, retrieval, configurable inference, structured logging, testing, and benchmark-driven evaluation.

Role
AI Systems Engineer · independent project
Period in CV
January–September 2026
Repository status
v0.2.0 · active development (README)

Problem

Connecting a language model to documents is not enough to understand whether a knowledge system is finding the evidence needed to answer a question. The project explores how to make document processing, retrieval behavior, evidence grounding, and failure analysis more measurable and maintainable.

Contribution

I designed and implemented an independent, modular RAG system. The implementation separates document ingestion, retrieval, language-model routing, logging, and evaluation, so changes can be investigated through component-level evidence.

It is an independent engineering project, not a claimed commercial or production deployment.

Architecture & data flow

01 / Ingestion

Documents into searchable evidence

  1. PDFs are loaded.
  2. Text is cleaned and chunked using configurable rules.
  3. Hugging Face embeddings are created.
  4. Vectors persist in Chroma.

02 / Query

Retrieve, ground, generate

  1. Embed the question and search the vector store.
  2. Use MMR and exact-text de-duplication to select context.
  3. Build a bounded context and grounded prompt.
  4. A unified client routes to Ollama (local) or Gemini (remote).
  5. Return an answer with model metadata.

03 / Evaluation

Inspect evidence and failures

  1. Compare retrieved chunks with labeled supporting facts.
  2. Apply deterministic lexical matching.
  3. Report Hit Rate@K, Recall@K, and MRR.
  4. Keep JSONL traces, latency/model metadata, and readable reports.
Responsive diagram reconstructed from repository architecture documentation and implementation. It includes current components only; proposed knowledge-graph and agent extensions are intentionally omitted. Editable Mermaid source is in docs/diagrams/llm-systems-architecture.mmd.

The code and documentation support PDF loading, text cleaning, configurable recursive chunking, Hugging Face embeddings, persistent Chroma storage, semantic search, MMR-based candidate selection, exact-text de-duplication, and bounded context assembly. A unified client routes generation to local Ollama or remote Gemini, based on configuration.

Evaluation & testing

Evaluation uses labeled questions and structured supporting facts. A deterministic lexical matcher checks whether the required text spans appear in retrieved context. The framework reports Hit Rate@K, Recall@K, and MRR and can generate sample-level reports for failure investigation. Repository unit tests cover retrieval metrics, reports, and JSONL logging.

In this project, Hit Rate@K is a strict answerability-style measure: all required facts for a sample must be present in the top-k context. Recall@K measures the fraction of supporting facts found, while MRR records how early the retrieved context becomes sufficient.

A sample LLM Systems Lab retrieval evaluation report showing one evaluation sample, expected supporting facts, and per-sample Hit@6, Recall@6, and MRR@6 values.
Repository-provided sample evaluation report. These are per-sample example values, not an aggregate benchmark result. Open full size ↗

Observability & engineering

Structured JSONL events preserve retrieval traces, evaluation-run details, latency, and model metadata. The repository also includes configuration and architecture documentation, a Python project manifest and lockfile, and focused unit tests. These choices support reproducible debugging and a measured improvement loop.

An example terminal query from LLM Systems Lab, displaying retrieved document chunks, a generated answer, latency, and model metadata.
Repository-provided example query output. It shows retrieved chunks, an answer, and associated model metadata; it is illustrative output, not a quality or speed benchmark. Open full size ↗

Limitations & next steps

The evaluator is a deterministic lexical baseline. It does not recognize paraphrases or semantic equivalence, and it can satisfy a multi-span fact using text found across unrelated chunks because locality is not enforced. Those limits are documented in the repository.

Knowledge-graph construction, entity and temporal modeling, graph retrieval, agent workflows/tool use, and semantic evaluation are described as future directions—not implemented features. Planned provider support beyond Ollama and Gemini is also not presented as available functionality.

Open the repository ↗ · Architecture documentation ↗ · Evidence-matching notes ↗


Back to selected projects