Five years of production backend work — three owning Java/Spring Boot and Python/FastAPI services end to end, then a year and a half building retrieval-augmented generation and agent systems that ship.
The two demos below are not reimplementations. They load the actual
.py files from my repositories and run them in your browser through
Pyodide — no server, nothing to wake up, nothing to go
stale. Both packages were written with zero third-party dependencies, which is what makes
this possible.
Hybrid retrieval, side by side
hybrid-retrieval-pg ↗Type a query against a 20-document corpus of procedural law. Lexical search (BM25) and dense search run independently, then Reciprocal Rank Fusion combines their rankings — not their scores, which live on incomparable scales. Documents both retrievers rank highly rise above either one’s runner-up.
What the fusion step actually did
Catching a confident, wrong answer
rag-eval-harness ↗Edit the answer below and watch the metrics move. Faithfulness is the one that matters: it is the fraction of the answer’s claims the retrieved context actually supports. Add a fluent, plausible, unsupported sentence and it drops — which is exactly the failure users report as “the answers feel worse.”
Claim-by-claim verdict
The judge running here scores by token overlap, so it is blunter than the model-backed
judge the harness also ships. Watch answer relevancy sit at 0.20 on the fully
grounded example: the answer restates the question in different words, and overlap cannot
see that. Faithfulness and citation accuracy hold up well under this judge; relevancy is
the one you would hand to a real model.
The trade buys determinism, which is what a CI gate actually needs — a regression has to be
a real change, not sampling noise. Point the harness at an OpenAI-compatible endpoint and
the same metrics run against a model instead.
Repositories
es-scoring-engine
Java 17 · Spring Boot 3.3 · Elasticsearch 8.14
Elasticsearch narrows the candidate pool, a weighted rule engine in plain Java ranks it, and every result carries the per-rule breakdown behind its score.
rag-eval-harness
Python · zero dependencies
Faithfulness, citation accuracy and IR metrics behind a CI gate that fails the build on regression — turning a vague complaint into a named metric and a magnitude.
hybrid-retrieval-pg
Python · PostgreSQL · pgvector
BM25 and dense retrieval on one Postgres, fused by RRF and reranked. Ships a benchmark that reports its numbers as measured — including where hybrid loses.
llm-gateway
Python · FastAPI · SSE
One OpenAI-compatible endpoint over many backends: routing, token accounting, per-tenant quotas and streaming. Hosted APIs and self-hosted vLLM differ by a base_url.