2026 · jordimarsal/codebaserag
codebaserag
Hexagonal RAG over your own codebase, with a deterministic, eval-first core: ingest, query, and CI-gated retrieval evals.
Problem
RAG demos are easy; trustworthy RAG is not. This one pins retrieval quality with a golden Q/A set (≥40 pairs) and fails CI if mean recall@5 drops below its committed baseline.
Highlights
- Eval baseline gate in CI: recall@5 0.409 · MRR 0.231 · nDCG@5 0.277 (committed baseline, ADR-gated overrides).
- Ports & adapters: pgvector (default) or Qdrant; Ollama or Anthropic embeddings & LLM; Langfuse observability.
- Python 3.13 · Pydantic v2 · typer · FastAPI · ruff · black · mypy --strict.
Stack
- Python 3.13
- FastAPI
- pgvector
- Qdrant
- Ollama
- Langfuse
- mypy strict
Metrics
- 0.409
- mean recall@5
- ≥40
- golden Q/A pairs
- strict
- mypy